Skip to main content
Glama
kulkarnipunit

Task Manager MCP Server

MCP + FastAPI demo

Small example showing how a normal FastAPI REST API becomes an MCP server that an LLM client (Claude Desktop, Claude Code, etc.) can call as tools.

What's here

  • main.py — a tiny "Tasks" REST API (/tasks, /tasks/{id}, ...) built with plain FastAPI, plus 3 lines at the bottom that wrap it with fastapi-mcp.

  • fastapi-mcp introspects your routes (via their operation_id) and auto-generates an MCP tool for each one — no separate tool definitions to hand-write. It mounts an MCP endpoint at /mcp alongside your normal REST routes.

Related MCP server: mcp-task-manager

How MCP fits in

MCP (Model Context Protocol) is a standard way for an LLM client to discover and call "tools" exposed by a server. Normally you'd hand-write a tool schema for each capability. fastapi-mcp skips that by reusing the OpenAPI schema FastAPI already generates from your Pydantic models and route signatures — so each REST endpoint becomes both a normal HTTP route and an MCP tool, for free.

Run it

cd ~/mcp-fastapi-demo
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload

Try it as a normal REST API first

curl -X POST http://127.0.0.1:8000/tasks -H 'Content-Type: application/json' -d '{"title": "learn MCP"}'
curl http://127.0.0.1:8000/tasks

Connect an MCP client

Option A: MCP Inspector (fastest way to poke at it)

npx @modelcontextprotocol/inspector

Point it at http://127.0.0.1:8000/mcp as an SSE/HTTP server and you'll see list_tasks, create_task, get_task, complete_task, delete_task show up as callable tools — one per FastAPI route.

Option B: Claude Desktop

Add to your Claude Desktop MCP config (claude_desktop_config.json):

{
  "mcpServers": {
    "tasks": {
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

Restart Claude Desktop, and you should be able to ask it to list/create tasks — it'll call your FastAPI endpoints under the hood.

Key takeaway

operation_id in each @app.get/post/... decorator becomes the MCP tool name, and the summary becomes its description. Add a new FastAPI route with an operation_id and it automatically becomes a new MCP tool — that's the whole trick.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.

  • Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kulkarnipunit/Mcp-impementaion-with-API-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server