{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_5vpt2y8d5r6q","handle":"fastapi-mcp-router","url":"https://wellknown.network/agents/fastapi-mcp-router","links":{"self":"https://wellknown.network/agents/fastapi-mcp-router/record.json","html":"https://wellknown.network/agents/fastapi-mcp-router","markdown":"https://wellknown.network/agents/fastapi-mcp-router/record.md","api":"https://wellknown.network/api/v1/agents/fastapi-mcp-router","status":"https://wellknown.network/api/v1/agents/fastapi-mcp-router/status","claim":"https://wellknown.network/agents/fastapi-mcp-router/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/fastapi-mcp-router/claim.json","badge":"https://wellknown.network/agents/fastapi-mcp-router/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/fastapi-mcp-router/history","tools":"https://wellknown.network/api/v1/agents/fastapi-mcp-router/tools"},"ard":{"identifier":"urn:air::server:fastapi-mcp-router","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"fastapi-mcp-router","summary":"Lightweight FastAPI integration for Model Context Protocol (MCP)","description":"# fastapi-mcp-router\n\n[![CI](https://github.com/rcrsr/fastapi-mcp-router/actions/workflows/ci.yml/badge.svg)](https://github.com/rcrsr/fastapi-mcp-router/actions/workflows/ci.yml)\n[![PyPI version](https://img.shields.io/pypi/v/fastapi-mcp-router)](https://pypi.org/project/fastapi-mcp-router/)\n[![Python versions](https://img.shields.io/pypi/pyversions/fastapi-mcp-router)](https://pypi.org/project/fastapi-mcp-router/)\n[![License](https://img.shields.io/pypi/l/fastapi-mcp-router)](https://github.com/rcrsr/fastapi-mcp-router/blob/main/LICENSE)\n\nAdd MCP to your existing FastAPI app. Register tools, resources, and prompts with decorators. Use `Depends()`, `Request`, and `BackgroundTasks` the same way you already do.\n\n## Why fastapi-mcp-router\n\n- **It's just an `APIRouter`.** Mount it like any other router. No separate framework, no new server process.\n- **Your DI still works.** `Depends()`, `Request`, `BackgroundTasks` — same patterns, same middleware.\n- **2 dependencies.** FastAPI and Pydantic. Nothing else.\n- **No lock-in.** Tools are regular async functions. Call them from tests, CLI scripts, or other endpoints without MCP.\n- **Lambda-ready.** Stateless mode + Mangum. No adapter layer.\n\n**Use FastMCP instead** if you need STDIO transport, OpenAPI spec imports, or managed hosting.\n\n## Install\n\n```bash\npip install fastapi-mcp-router\n```\n\n## Quick Start\n\n```python\nfrom fastapi import FastAPI\nfrom fastapi_mcp_router import MCPRouter\n\napp = FastAPI()\nmcp = MCPRouter()\n\n@mcp.tool()\nasync def write_message(payload: str) -> dict:\n    \"\"\"Write coordination message.\"\"\"\n    return {\"success\": True, \"message_id\": \"msg-123\"}\n\n@mcp.resource(\"project://{project_id}/config\")\nasync def project_config(project_id: str) -> dict:\n    return {\"project_id\": project_id, \"env\": \"production\"}\n\n@mcp.prompt()\nasync def review_code(file_path: str, language: str = \"python\") -> list[dict]:\n    return [{\"role\": \"user\", \"content\": f\"Review {file_path} ({language})\"}]\n\napp.include_router(mcp, prefix=\"…","publisher":null,"homepage":"https://github.com/rcrsr/fastapi-mcp-router","repository":"https://github.com/rcrsr/fastapi-mcp-router","version":"0.4.0","license":null,"protocols":["mcp"],"tags":["ai","fastapi","llm","mcp","model-context-protocol"],"pricing":null,"endpoints":[{"url":"pypi:fastapi-mcp-router","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi"}},"derived":{"capabilities":[{"slug":"dev.package-management","name":"Packages & Dependencies","confidence":0.825,"provenance":"derived"}],"categories":["dev"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"fastapi-mcp-router","registry":"pypi","observedAt":"2026-11-09T04:26:56.607Z","publishedAt":"2026-09-09T06:02:52.002041Z","latestVersion":"0.4.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"fastapi-mcp-router","url":"https://pypi.org/project/fastapi-mcp-router/","firstSeenAt":"2026-09-09T15:22:26.578Z","fetchedAt":"2026-11-09T04:26:05.175Z","normalizedAt":"2026-11-09T04:26:05.175Z"}]},"firstSeenAt":"2026-09-09T15:22:26.578Z","updatedAt":"2026-11-09T04:26:56.607Z"}