Skip to content

Add a recipe wiring MCPTool to a live MCP server #2306

Open

Description

@AmirF194

Add a docs/recipes entry showing MCPTool wired up to a live MCP server end to end: server, tool discovery, and a tool call, wrapped in an Agent the same way the other recipes are.

There isn't one yet, MCPTool has good tests but the recipes directory only covers RagTool-style data sources (webpage, pdf, audio, video, redshift). I built and ran it against a small stdio server (a FastMCP instance with one tool) since that keeps the recipe self-contained and doesn't add a Node/npx dependency to the docs test suite:

$ python3 mcp_tool_demo2.py
activities discovered from the live server:
  - get_weather

get_weather result:
  type: ListArtifact
  value: [TextArtifact(..., value="It's sunny and 72F in Boston.", ...)]

That's the tool layer (session handshake, discovery, the call itself) exercised directly against a real running process, no mocks. I didn't run the Agent/Chat half against a live model key locally, so the full recipe as it'd read in the docs is untested past the point where MCPTool hands the result back.

Two files feels right for this one, a tiny demo server plus the client, similar to how talk-to-an-audio.md splits into _1/_2. Does that match what you'd want, or would you rather point the recipe at a real published MCP server instead of a demo one?

Happy to open the PR with both files and the doc page.

Activity

  1. modelpath-dev commented on Sep 10, 2026

    @modelpath-dev

    I will take this task. Please assign it to me.

    The issue is about adding a new recipe for wiring MCPTool to a live MCP server. The existing recipes do not cover this tool yet. I will start by creating a small demo server using FastMCP and a client script to demonstrate the tool's functionality. This will ensure the recipe is self-contained and doesn't introduce new dependencies. I will also draft a documentation page similar to the existing ones in docs/recipes. This will include both the server and client scripts. Let me know if you prefer pointing to a real published MCP server instead.

  2. modelpath-dev commented on Sep 13, 2026

    @modelpath-dev

    I'll proceed with creating the demo server and client script as planned. This will keep the recipe self-contained. I'll also draft the documentation page. If there's any preference for using a real published MCP server instead, please let me know.

  3. collindutter commented on Sep 14, 2026

    @collindutter
    Member

    Hey @modelpath-dev thanks for wanting to take this. I'd prefer to avoid creating a new MCP server. I suggest we use something like this https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem

  4. modelpath-dev commented on Sep 15, 2026

    @modelpath-dev

    Got it, I'll use the existing MCP server from the link you provided instead of creating a new one. Thanks for the suggestion!

  5. modelpath-dev commented on Oct 14, 2026

    @modelpath-dev

    @collindutter opened #2377 for this. It points MCPTool at the reference filesystem server instead of a new one, limits it to a temp folder of notes, and has an Agent read them and write a summary file back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions