FastHTML publishes AI-friendly documentation context, but it does not provide an MCP server. This project exists to bridge that gap with a public FastHTML docs MCP endpoint on Cloudflare Workers.
It lets MCP-compatible clients search FastHTML docs, read specific sections, and answer framework questions directly in the editor.
Important This public endpoint runs on Cloudflare's free plan. Please be mindful of shared usage and best-effort availability. If you expect heavier or sustained usage, self-host your own worker.
| Tool | Description |
|---|---|
search_fasthtml_docs |
Search the FastHTML docs context and return the most relevant sections |
read_fasthtml_section |
Read a section by heading or close heading match |
Source documentation is fetched from:
https://www.fastht.ml/docs/llms-ctx.txtUse this configuration in most MCP clients:
{
"servers": {
"FastHTML Docs MCP": {
"type": "http",
"url": "https://fasthtml-mcp.chief-575.workers.dev/mcp"
}
}
}VS Code
Follow the MCP install guide or add it from the CLI:
code --add-mcp '{"name":"FastHTML Docs MCP","type":"http","url":"https://fasthtml-mcp.chief-575.workers.dev/mcp"}'Cursor
Open Cursor Settings, go to MCP, then add a new server using the same HTTP URL from the standard configuration above.
Claude Code
claude mcp add FastHTML\ Docs\ MCP --url https://fasthtml-mcp.chief-575.workers.dev/mcpCodex
Create or edit ~/.codex/config.toml and add:
[mcp_servers."FastHTML Docs MCP"]
url = "https://fasthtml-mcp.chief-575.workers.dev/mcp"More details: Codex MCP documentation.
GitHub Copilot Coding Agent
{
"mcpServers": {
"FastHTML Docs MCP": {
"type": "remote",
"url": "https://fasthtml-mcp.chief-575.workers.dev/mcp",
"tools": [
"*"
]
}
}
}Add this under repository settings in Copilot > Coding agent.
Search the FastHTML docs for route handlers and path parametersRead the FastHTML section about formsWhat does FastHTML say about HTMX integration?Find examples related to table rendering in FastHTML
npm install
npm run devUseful commands:
npm run type-check
npm run deployLocal MCP endpoint:
http://localhost:8788/mcpThis project deploys to Cloudflare Workers.
Manual deploy options:
- Run
npm run deploy - Or use the
Deploy WorkerGitHub Actions workflow
- Public endpoint:
https://fasthtml-mcp.chief-575.workers.dev/mcp - No local install is required for end users
- Only connect MCP servers you trust
If you want better reliability or control, fork this repository and deploy your own worker.
Then replace the public endpoint in the examples above with your own:
https://your-worker.your-subdomain.workers.dev/mcp