MCP Markdown Template

MCP Markdown Template

Automatically transforms markdown templates (like GitHub Issue templates) into MCP tools and FastAPI endpoints. Load templates from local files, directories, or URLs to create typed API endpoints with Swagger UI documentation.

Category
Visit Server

README

<div align="center">

<h1> MCP Markdown Template </h1>

</div>

šŸš€ Core Idea

Transform markdown templates (like GitHub Issue templates) into MCP tools automatically. Write a template once, get both a FastAPI endpoint and an MCP tool.

šŸ—ļø Architecture

mcp_tools/
ā”œā”€ā”€ models.py      # Data models (Template, TemplateVariable)
ā”œā”€ā”€ loader.py      # Load templates from files, directories, URLs
ā”œā”€ā”€ parser.py      # Extract variables & render with Jinja2
ā”œā”€ā”€ generator.py   # Create FastAPI endpoints dynamically
└── server.py      # FastMCP server with CORS

How it works:

  1. Load - Fetch templates from local files, directories, or URLs
  2. Parse - Extract <variables> and metadata from YAML frontmatter
  3. Generate - Create typed FastAPI endpoints with Pydantic models
  4. Serve - Expose as both REST API (/api/docs) and MCP tools (/mcp)

🌟 Features

  • Auto-generate MCP tools from markdown templates
  • Multiple sources - Load from local files, directories, or URLs
  • Swagger UI - Test endpoints at /api/docs
  • Docker ready - Production-ready container setup
  • CI/CD - GitHub Actions for automated workflows

šŸ› ļø Getting Started

Local Development

Install dependencies:

uv sync

Run the MCP server:

uv run uvicorn mcp_tools.main:starlette_app --host 127.0.0.1 --port 8000

Docker

Build the Docker image:

docker build -t docker.io/username/mcp-markdown-template:latest .

Run the container with various template sources:

# Mount local templates directory
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
# Load from URL (GitHub raw URL)
docker run -i --rm -p 8000:8000 \
  -e MCP_TEMPLATES_SOURCE=https://raw.githubusercontent.com/hsiangjenli/mcp-markdown-template/refs/heads/main/.github/ISSUE_TEMPLATE/demo.md \
  docker.io/hsiangjenli/mcp-markdown-template:latest
# Multiple sources (comma-separated)
docker run -i --rm -p 8000:8000 \
  -e MCP_TEMPLATES_SOURCE="/app/templates,https://raw.githubusercontent.com/owner/repo/main/template.md" \
  -v /path/to/local/templates:/app/templates \
  docker.io/hsiangjenli/mcp-markdown-template:latest

MCP Server configuration (for Claude Desktop, etc.):

{
	"servers": {
		"markdown-template": {
			"url": "http://localhost:8000/mcp",
			"type": "http"
		}
	},
	"inputs": []
}

Template Sources

Format Example
Local directory /path/to/templates/
Local file /path/to/template.md
URL https://raw.githubusercontent.com/.../template.md
Multiple source1,source2 (comma-separated)

Environment Variables

Variable Default
MCP_TITLE Python MCP Template
MCP_DESCRIPTION A template for creating MCP-compliant FastAPI
MCP_TEMPLATES_SOURCE .github/ISSUE_TEMPLATE

šŸ“š Documentation

Build docs locally:

scripts/build_docs.sh && uv run mkdocs build

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured