Gal-Gilor/markdown-mcp
If you are the rightful owner of markdown-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server designed to intelligently process and split Markdown documents while maintaining their structural integrity.
The Markdown MCP server is a specialized tool that processes Markdown documents by splitting them into hierarchical sections. It preserves the parent-child relationships and sibling connections between headers, ensuring that the document's structure is maintained. This server is built using FastAPI, providing high-performance asynchronous capabilities. It is compliant with the Model Context Protocol, making it a versatile tool for developers who need to manage and manipulate Markdown content programmatically. The server is designed to be code-aware, meaning it can differentiate between Markdown headers and comments within code blocks, ensuring accurate document parsing. With its hierarchical splitting feature, the server can identify and maintain the relationships between different header levels, such as H1, H2, and H3, and detect sibling headers at the same level. This makes it an ideal solution for applications that require detailed document analysis and manipulation.
Features
- Hierarchical splitting: Maintains header relationships (H1 → H2 → H3...).
- Sibling detection: Identifies headers at the same level.
- Code-aware: Ignores `#` comments in code blocks.
- MCP compliant: Standard Model Context Protocol interface.
- FastAPI powered: High-performance async server.
Usages
local integration stdio
python mcp.run(transport='stdio') # Tools defined via @mcp.tool() decorator
remote integration sse
python mcp.run(transport='sse', host="0.0.0.0", port=8080) # Specify SSE endpoint
remote integration streamable http
yaml paths: /mcp: post: x-ms-agentic-protocol: mcp-streamable-1.0 # Copilot Studio integration
development framework fastmcp
python from mcp.server import FastMCP app = FastMCP('demo') @app.tool() async def query(): ...
Tools
split_text
Splits the input Markdown text into a list of Section objects.