web package
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
from pathlib import Path
|
||||
|
||||
from pydantic import Field
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
_REPO_ROOT = Path(__file__).resolve().parents[3]
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Runtime settings for the HTTP MCP and docs server."""
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env",
|
||||
env_prefix="PERSONAL_MCP_",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
host: str = "127.0.0.1"
|
||||
port: int = 8000
|
||||
debug: bool = False
|
||||
log_level: str = "info"
|
||||
docs_route: str = "/docs"
|
||||
mcp_route: str = "/mcp"
|
||||
site_dir: Path = Field(default=_REPO_ROOT / "site")
|
||||
|
||||
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
Reference in New Issue
Block a user