Help required | mcp-agent #67
-
I am trying to,
Help in this regard since the example code only uses |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @adeel-shahzad, thanks for getting in touch! It should be pretty easy to do both 1 and 2, and use with mcp-agent. For 1, if you use the FastMCP syntax, you can just add a tool with For 2, again you can use FastMCP syntax to quickly create an MCP server. The README of Python SDK for MCP has details on this: In order to use this MCP server with mcp-agent, you can use the same approach as the examples with "fetch" or "filesystem". If you look at this example, it does create an MCP server and then uses it in an mcp-agent application: |
Beta Was this translation helpful? Give feedback.
Hey @adeel-shahzad, thanks for getting in touch! It should be pretty easy to do both 1 and 2, and use with mcp-agent.
For 1, if you use the FastMCP syntax, you can just add a tool with
@mcp.tool
decorator to a function you want to expose as a tool inside the MCP server.For 2, again you can use FastMCP syntax to quickly create an MCP server. The README of Python SDK for MCP has details on this:
In order to use this MCP server with mcp-agent, you can use the same approach as the examples with "fetch" or "filesystem".
If you look at this example, it does create an MCP server and then uses it in an mcp-agent application:
https://github.com/lastmile-ai/mcp-agent/blob/main/examples/mcp_root_t…