md2star.mcp module

md2star — Model Context Protocol (MCP) surface.

Adapter that exposes the FastAPI app defined in md2star.api as MCP tools, so an MCP-aware client (Claude Desktop, custom agents, IDE integrations, …) can call health / doctor / convert as first-class tools. Uses fastapi_mcp (https://github.com/tadata-org/fastapi_mcp) — one line wraps the whole existing HTTP surface, so the route definitions are never duplicated.

Install the extra to pull in fastapi-mcp:

pip install 'md2star[api,mcp]'

Then run the MCP server:

md2star-mcp                     # entry point (see pyproject)
# or, equivalently:
python -m md2star.mcp

Usage Example

>>> # Register the MCP endpoint in your client. It publishes every route
>>> # defined in md2star.api (health / doctor / convert) with the same
>>> # argument names as the FastAPI endpoints.

Author

Warith Harchaoui, Ph.D. — https://linkedin.com/in/warith-harchaoui/

md2star.mcp.main()[source]

Entry point for the md2star-mcp console script.

Boots the FastAPI app (which now serves both the /… HTTP routes and the MCP endpoint) with uvicorn in single-worker mode. Meant for local / container usage; behind a real load balancer, run uvicorn / gunicorn directly against md2star.api.app.

Return type:

None