docs-and-mcps #1

Merged
aetos merged 6 commits from docs-and-mcps into main 2026-01-22 11:28:24 +00:00
2 changed files with 30 additions and 0 deletions
Showing only changes of commit d0978cea99 - Show all commits

29
mcp_server.py Normal file
View File

@@ -0,0 +1,29 @@
from pathlib import Path
import json
from mcp.server.fastmcp import FastMCP
MCP_ROOT = Path(__file__).resolve().parent / "mcp"
mcp = FastMCP("aetoskia-mail-intake-docs")
@mcp.resource("docs://index")
def index():
return json.loads((MCP_ROOT / "index.json").read_text())
@mcp.resource("docs://nav")
def nav():
return json.loads((MCP_ROOT / "nav.json").read_text())
@mcp.resource("docs://module/{module}")
def module(module: str):
path = MCP_ROOT / "modules" / f"{module}.json"
if not path.exists():
raise FileNotFoundError(module)
return json.loads(path.read_text())
if __name__ == "__main__":
mcp.run()

View File

@@ -2,6 +2,7 @@ beautifulsoup4==4.12.0
google-api-python-client==2.187.0 google-api-python-client==2.187.0
google-auth-oauthlib==1.2.3 google-auth-oauthlib==1.2.3
types-beautifulsoup4 types-beautifulsoup4
mcp==1.25.0
# Test Packages # Test Packages
pytest==7.4.0 pytest==7.4.0