forked from phoenix-oss/llama-stack-mirror
docs: update for mcp tools (#1705)
# What does this PR do? ## Test Plan read
This commit is contained in:
parent
d117bfe597
commit
b6b103a20d
1 changed files with 10 additions and 2 deletions
|
@ -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.
|
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
|
```python
|
||||||
# Register MCP tools
|
|
||||||
client.toolgroups.register(
|
client.toolgroups.register(
|
||||||
toolgroup_id="builtin::filesystem",
|
toolgroup_id="mcp::filesystem",
|
||||||
provider_id="model-context-protocol",
|
provider_id="model-context-protocol",
|
||||||
mcp_endpoint=URL(uri="http://localhost:8000/sse"),
|
mcp_endpoint=URL(uri="http://localhost:8000/sse"),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue