Merge branch 'main' of github.com:modelcontextprotocol/docs into zack-lee/thumbs-up-feedback-and-contributing
This commit is contained in:
commit
76fd80a244
4 changed files with 40 additions and 24 deletions
11
clients.mdx
11
clients.mdx
|
|
@ -12,10 +12,12 @@ This page provides an overview of applications that support the Model Context Pr
|
|||
| [Claude Desktop App][Claude] | ✅ | ✅ | ✅ | ❌ | ❌ | Full support for all MCP features |
|
||||
| [Zed][Zed] | ❌ | ✅ | ❌ | ❌ | ❌ | Prompts appear as slash commands |
|
||||
| [Sourcegraph Cody][Cody] | ✅ | ❌ | ❌ | ❌ | ❌ | Supports resources through OpenCTX |
|
||||
| [Firebase Genkit][Genkit] | ⚠️ | ✅ | ✅ | ❌ | ❌ | Supports resource list and lookup through tools. |
|
||||
|
||||
[Claude]: https://claude.ai/download
|
||||
[Zed]: https://zed.dev
|
||||
[Cody]: https://sourcegraph.com/cody
|
||||
[Genkit]: https://github.com/firebase/genkit
|
||||
|
||||
[Resources]: https://modelcontextprotocol.io/docs/concepts/resources
|
||||
[Prompts]: https://modelcontextprotocol.io/docs/concepts/prompts
|
||||
|
|
@ -53,6 +55,15 @@ The Claude desktop application provides comprehensive support for MCP, enabling
|
|||
- Uses OpenCTX as an abstraction layer
|
||||
- Future support planned for additional MCP features
|
||||
|
||||
### Firebase Genkit
|
||||
[Genkit](https://github.com/firebase/genkit) is Firebase's SDK for building and integrating GenAI features into applications. The [genkitx-mcp](https://github.com/firebase/genkit/tree/main/js/plugins/mcp) plugin enables consuming MCP servers as a client or creating MCP servers from Genkit tools and prompts.
|
||||
|
||||
**Key features:**
|
||||
- Client support for tools and prompts (resources partially supported)
|
||||
- Rich discovery with support in Genkit's Dev UI playground
|
||||
- Seamless interoperability with Genkit's existing tools and prompts
|
||||
- Works across a wide variety of GenAI models from top providers
|
||||
|
||||
## Adding MCP support to your application
|
||||
|
||||
If you've added MCP support to your application, we encourage you to submit a pull request to add it to this list. MCP integration can provide your users with powerful contextual AI capabilities and make your application part of the growing MCP ecosystem.
|
||||
|
|
|
|||
|
|
@ -7,8 +7,12 @@ Resources are a core primitive in the Model Context Protocol (MCP) that allow se
|
|||
|
||||
<Note>
|
||||
Resources are designed to be **application-controlled**, meaning that the client application can decide how and when they should be used.
|
||||
Different MCP clients may handle resources differently. For example:
|
||||
- Claude Desktop currently requires users to explicitly select resources before they can be used
|
||||
- Other clients might automatically select resources based on heuristics
|
||||
- Some implementations may even allow the AI model itself to determine which resources to use
|
||||
|
||||
For example, one application may require users to explicitly select resources, while another could automatically select them based on heuristics or even at the discretion of the AI model itself.
|
||||
Server authors should be prepared to handle any of these interaction patterns when implementing resource support. In order to expose data to models automatically, server authors should use a **model-controlled** primitive such as [Tools](./tools).
|
||||
</Note>
|
||||
|
||||
## Overview
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ Let's build your first MCP server in Python! We'll create a weather server that
|
|||
|
||||
## Available transports
|
||||
|
||||
While this guide uses stdio transport, MCP supports additonal transport options:
|
||||
While this guide uses stdio transport, MCP supports additional transport options:
|
||||
|
||||
### SSE (Server-Sent Events)
|
||||
|
||||
|
|
@ -638,18 +638,15 @@ uvicorn.run(app, host="0.0.0.0", port=8000)
|
|||
|
||||
<Step title="Add resource templates">
|
||||
```python
|
||||
@self.list_resources()
|
||||
async def list_resources(self) -> ListResourcesResult:
|
||||
return ListResourcesResult(
|
||||
resources=[...],
|
||||
resourceTemplates=[
|
||||
ResourceTemplate(
|
||||
uriTemplate="weather://{city}/current",
|
||||
name="Current weather for any city",
|
||||
mimeType="application/json"
|
||||
)
|
||||
]
|
||||
)
|
||||
@app.list_resource_templates()
|
||||
async def list_resource_templates() -> list[ResourceTemplate]:
|
||||
return [
|
||||
ResourceTemplate(
|
||||
uriTemplate="weather://{city}/current",
|
||||
name="Current weather for any city",
|
||||
mimeType="application/json"
|
||||
)
|
||||
]
|
||||
```
|
||||
</Step>
|
||||
</Steps>
|
||||
|
|
@ -751,7 +748,7 @@ uvicorn.run(app, host="0.0.0.0", port=8000)
|
|||
pass
|
||||
|
||||
def json(self):
|
||||
return nock_forecast_response
|
||||
return mock_forecast_response
|
||||
|
||||
class AsyncClient():
|
||||
def __aenter__(self):
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@ This guide uses the OpenWeatherMap API. You'll need a free API key from [OpenWea
|
|||
```bash
|
||||
OPENWEATHER_API_KEY=your-api-key-here
|
||||
```
|
||||
Make sure to add your environment file to `.gitignore`
|
||||
```bash
|
||||
.env
|
||||
```
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
|
|
@ -342,18 +346,18 @@ This guide uses the OpenWeatherMap API. You'll need a free API key from [OpenWea
|
|||
}
|
||||
|
||||
return {
|
||||
content: {
|
||||
mimeType: "application/json",
|
||||
content: [{
|
||||
type: "text",
|
||||
text: JSON.stringify(forecasts, null, 2)
|
||||
}
|
||||
}]
|
||||
};
|
||||
} catch (error) {
|
||||
if (axios.isAxiosError(error)) {
|
||||
return {
|
||||
content: {
|
||||
mimeType: "text/plain",
|
||||
content: [{
|
||||
type: "text",
|
||||
text: `Weather API error: ${error.response?.data.message ?? error.message}`
|
||||
},
|
||||
}],
|
||||
isError: true,
|
||||
}
|
||||
}
|
||||
|
|
@ -368,7 +372,6 @@ This guide uses the OpenWeatherMap API. You'll need a free API key from [OpenWea
|
|||
<Step title="Build and test">
|
||||
```bash
|
||||
npm run build
|
||||
npm link
|
||||
```
|
||||
</Step>
|
||||
</Steps>
|
||||
|
|
@ -383,7 +386,8 @@ This guide uses the OpenWeatherMap API. You'll need a free API key from [OpenWea
|
|||
{
|
||||
"mcpServers": {
|
||||
"weather": {
|
||||
"command": "weather-server",
|
||||
"command": "node",
|
||||
"args": ["/path/to/weather-server/build/index.js"],
|
||||
"env": {
|
||||
"OPENWEATHER_API_KEY": "your-api-key",
|
||||
}
|
||||
|
|
@ -561,7 +565,7 @@ npm run build
|
|||
Look for detailed error messages in the Claude Desktop logs:
|
||||
```bash
|
||||
# Monitor logs
|
||||
tail -n 20 -f ~/Library/Application\ Support/Claude/mcp*.log
|
||||
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
|
||||
```
|
||||
|
||||
### Type errors
|
||||
|
|
|
|||
Loading…
Reference in a new issue