- Home
- MCP servers
- MCP Markdown Template
MCP Markdown Template
- python
0
GitHub Stars
python
Language
2 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You build and run an MCP server that converts markdown templates into MCP tools and a FastAPI backend. This enables you to author a single template and automatically expose a typed HTTP API plus MCP tools for easy integration with your workflows.
How to use
You run the MCP server and point your MCP client to the provided MCP endpoint. The server loads templates from local files, directories, or URLs, parses them to extract variables, and then generates typed endpoints and MCP tools based on the templates. You interact with the server through the MCP URL to manage and test the tools, and you can render templates with the included variables in your client.
Typical usage flow you will follow: load your Markdown templates, start the MCP server, and then use your MCP client to browse, generate, and test the MCP tools derived from those templates.
How to install
Prerequisites you need before installing:
- Python 3.8+ (for FastAPI-based server) or your preferred runtime that supports FastAPI.
- Docker (optional, for containerized deployment).
- Command-line access with permission to expose ports.
Install and run steps when using a Python-based approach:
- Install dependencies
- Run the server
- Verify the API is reachable at the MCP endpoint.
uv sync
uv run uvicorn mcp_tools.main:starlette_app --host 127.0.0.1 --port 8000
Notes and examples
You can load templates from multiple sources and expose them via the MCP endpoint. The server also supports running in Docker with environment variables to specify where to load templates from.
# Docker example: mount local templates and expose the MCP endpoint
docker run -i --rm -p 8000:8000 \
-v /path/to/your/templates:/app/templates \
-e MCP_TEMPLATES_SOURCE=/app/templates \
docker.io/hsiangjenli/mcp-markdown-template:latest
Security and configuration notes
Limit exposure of the MCP endpoint to trusted networks when running in production. Use environment controls and, if needed, reverse proxies or API gateways to manage access. Ensure templates sourced from URLs are trusted and scanned for sensitive content before exposing them as MCP tools.
Available tools
load_templates
Load templates from local files, directories, or URLs to start the processing pipeline.
parse_variables
Extract template variables and metadata from YAML frontmatter and markdown content.
render_templates
Render extracted templates using Jinja2 to produce finalized outputs.
generate_endpoints
Create typed FastAPI endpoints with Pydantic models based on templates.
serve_mcp
Expose both REST API endpoints and MCP tooling at the designated paths, including /api/docs and /mcp.