From b6b103a20d93e8e2621931ac9e3345638480ec91 Mon Sep 17 00:00:00 2001 From: ehhuang Date: Wed, 19 Mar 2025 15:45:53 -0700 Subject: [PATCH] docs: update for mcp tools (#1705) # What does this PR do? ## Test Plan read --- docs/source/building_applications/tools.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/source/building_applications/tools.md b/docs/source/building_applications/tools.md index 2d7313cb8..d5354a3da 100644 --- a/docs/source/building_applications/tools.md +++ b/docs/source/building_applications/tools.md @@ -110,10 +110,18 @@ MCP tools are special tools that can interact with llama stack over model contex Refer to [https://github.com/modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers) for available MCP servers. +```shell +# start your MCP server +mkdir /tmp/content +touch /tmp/content/foo +touch /tmp/content/bar +npx -y supergateway --port 8000 --stdio 'npx -y @modelcontextprotocol/server-filesystem /tmp/content' +``` + +Then register the MCP server as a tool group, ```python -# Register MCP tools client.toolgroups.register( - toolgroup_id="builtin::filesystem", + toolgroup_id="mcp::filesystem", provider_id="model-context-protocol", mcp_endpoint=URL(uri="http://localhost:8000/sse"), )