web package

This commit is contained in:
John Lancaster
2026-06-18 21:15:54 -05:00
parent 4b1a261b2d
commit b6010775ad
11 changed files with 277 additions and 28 deletions
+28
View File
@@ -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()