3.0 KiB
3.0 KiB
icon
| icon |
|---|
| lucide/server |
Runtime And Static Docs Layout
Purpose
The project serves native MCP content and a pre-built documentation site from one FastAPI process. Markdown is authored once under docs/; runtime providers and Zensical consume that same packaged tree for different purposes.
Repository Layout
---
config:
treeView:
rowIndent: 32
lineThickness: 2
---
treeView-beta
"project-root"
"docs"
"prompts/<prompt-id>/PROMPT.md"
"skills/<skill-id>/SKILL.md"
"skills/<skill-id>/<supporting-files>"
"<general-pages>.md"
"site"
"static build output"
"src/personal_mcp"
"mcp.py"
"prompts/components/*.py"
"prompts/content.py"
"prompts/provider.py"
"registry/"
"skills/provider.py"
"web/"
Ownership rules:
docs/skills/is owned exclusively bySkillsDirectoryProviderat runtime.docs/prompts/owns prompt prose; Python components own prompt metadata and argument schemas.- The docs registry owns only general Markdown resources and explicitly excludes skills.
site/is generated output.- The deleted custom
catalog/package is not part of the runtime.
Runtime Composition
flowchart TD
A[Packaged Skills] --> B[SkillsDirectoryProvider]
C[Prompt Components] --> D[FileSystemProvider]
E[Packaged Markdown] --> F[Docs Registry]
B --> G[FastMCP]
D --> G
F --> G
G --> H[MCP Transport]
H --> K[FastAPI Application]
L[Pre-built site] --> M[Static /docs Mount]
K --> M
Runtime guarantees:
- Providers are installed before serving requests.
- Production provider discovery uses
reload=False. - Duplicate components fail according to FastMCP's configured duplicate policy.
- Skills and prompts use native FastMCP component surfaces.
- General docs path parsing rejects traversal, backslashes, non-Markdown paths, and the skill namespace.
Build And Publish Flow
- Author Markdown under
docs/and typed prompts undersrc/personal_mcp/prompts/components/. - Run
uv run zensical buildto producesite/. - Build the wheel, which packages the authored docs under
personal_mcp/docs/. - Start the app and serve MCP plus the static site.
No runtime Markdown-to-HTML conversion occurs.
Machine-Facing Mapping
docs/skills/<skill-id>/SKILL.mdmaps toskill://<skill-id>/SKILL.md.- Skill supporting files map to
skill://<skill-id>/<path>. - Typed prompt components map to native MCP prompt names.
- General
docs/<path>.mdmaps toresource://docs/{path*}.
The server publishes no tool projections of resources or prompts.
Public Surface Policy
Canonical provider and protocol surfaces are the only public interfaces.
Static Mount Expectations
The FastAPI app mounts the Zensical output, serves index and asset files, and returns a clear unavailable response when the static output is absent. The site directory is immutable for a given build and remains separate from packaged authored Markdown.