-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
area/adaptersProtocol adapters: MCP, A2AProtocol adapters: MCP, A2Aarea/routingRouting engine: catalog, graph, router, cardsRouting engine: catalog, graph, router, cardscomplexity/averageStandard effort, moderate familiarity neededStandard effort, moderate familiarity neededenhancementNew feature or requestNew feature or requestmilestone/v0.3v0.3 — Production readinessv0.3 — Production readinesspriority/highHigh priority — closes a critical gapHigh priority — closes a critical gap
Description
Problem
FastMCP is the dominant MCP framework, powering ~70% of MCP servers and downloaded a million times a day. Currently, there is no direct way to load a FastMCP server's tool list into contextweaver's Catalog — users must manually convert each tool definition. This friction blocks adoption among FastMCP users.
Related: #87 tracks a narrower FastMCP CodeMode adapter; this issue covers the broader catalog bridge.
Proposal
Add adapters/fastmcp.py with utilities to bridge FastMCP servers and contextweaver Catalogs:
fastmcp_tools_to_catalog(tools)— Convert a list of FastMCP tool definitions toSelectableItems and register in aCatalog, preserving namespaces (FastMCP usesnamespace_toolnameconvention)load_fastmcp_catalog(server_url_or_config)— Connect to a running FastMCP server via MCPtools/list, convert all tools, and return a populatedCatalog- Namespace inference — Detect FastMCP namespace prefixes (e.g.,
github_search_repos→ namespace=github, name=search_repos) - Tag mapping — Map FastMCP tool tags to
SelectableItem.tagsfor tag-based filtering
Dependency strategy
- Core conversion functions work with plain dicts (no FastMCP import needed)
- Add
contextweaver[fastmcp]optional extra for live server discovery - Keep the adapter usable without the extra by accepting tool definitions as dicts
Acceptance Criteria
-
fastmcp_tools_to_catalog()converts FastMCP tool definitions to Catalog items - Namespace prefixes correctly inferred from FastMCP naming convention
- Tags, descriptions, and schemas preserved during conversion
-
contextweaver[fastmcp]optional extra defined inpyproject.toml - Live server discovery works when FastMCP is installed (via
tools/list) - Core dict-based conversion works without FastMCP installed
- Tests cover namespace inference, tag mapping, and schema preservation
- Example recipe added (or cross-referenced from cookbook issue)
Implementation Notes
- FastMCP composition docs: https://gofastmcp.com/servers/composition
- Namespace convention:
{namespace}_{tool_name}(underscore-delimited) - Reuse
mcp_tool_to_selectable()internally — add namespace extraction on top - Consider
#43(MCP namespace inference) overlap — this issue supersedes it for FastMCP
File Paths
src/contextweaver/adapters/fastmcp.py(new)src/contextweaver/adapters/__init__.py(edit — re-export)pyproject.toml(edit — addfastmcpoptional extra)tests/test_adapters.py(edit — add FastMCP tests)examples/(edit or new — FastMCP integration example)
Cross-references
- Related to [adapters] FastMCP CodeMode custom-discovery-tool adapter + example #87 (FastMCP CodeMode adapter — narrower scope)
- Related to [adapters] Add MCP namespace inference to mcp_tool_to_selectable() #43 (MCP namespace inference — subsumed for FastMCP case)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/adaptersProtocol adapters: MCP, A2AProtocol adapters: MCP, A2Aarea/routingRouting engine: catalog, graph, router, cardsRouting engine: catalog, graph, router, cardscomplexity/averageStandard effort, moderate familiarity neededStandard effort, moderate familiarity neededenhancementNew feature or requestNew feature or requestmilestone/v0.3v0.3 — Production readinessv0.3 — Production readinesspriority/highHigh priority — closes a critical gapHigh priority — closes a critical gap