Different tools for different paths (similar to routes) #1391
Replies: 1 comment
-
|
Hi @am-akash1309! You can have tools separated in form of different modules (example: https://github.com/the-momentum/apple-health-mcp-server/tree/main/app/mcp/v1/tools), with each of them being defined with its own FastMCP server instance. Then you can merge them all into one MCP Server in the main module (using If you want to split tools for agentic usage, the best way to go is probably to have separate MCP Servers. Here is an example of pydantic ai agents with MCP integration: https://ai.pydantic.dev/mcp/client/#tool-call-customisation. You just register each MCP server as a specific toolset. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I been wondering if I can have the tools grouped under different routes.
mcp.run( transport="http", port=8000, log_level="debug", path="/db_tools", )I have noticed that all the tools from the object
mcpcan be accessed through /db_tools.So, let's say I have different agent for reading and writing in a database. Will it be possible to create two different paths in the same port as
/db_writeand/db_read? So that I can access only the particular tools that an agent needs and not all in the server.Beta Was this translation helpful? Give feedback.
All reactions