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 |
|
| [Claude Desktop App][Claude] | ✅ | ✅ | ✅ | ❌ | ❌ | Full support for all MCP features |
|
||||||
| [Zed][Zed] | ❌ | ✅ | ❌ | ❌ | ❌ | Prompts appear as slash commands |
|
| [Zed][Zed] | ❌ | ✅ | ❌ | ❌ | ❌ | Prompts appear as slash commands |
|
||||||
| [Sourcegraph Cody][Cody] | ✅ | ❌ | ❌ | ❌ | ❌ | Supports resources through OpenCTX |
|
| [Sourcegraph Cody][Cody] | ✅ | ❌ | ❌ | ❌ | ❌ | Supports resources through OpenCTX |
|
||||||
|
| [Firebase Genkit][Genkit] | ⚠️ | ✅ | ✅ | ❌ | ❌ | Supports resource list and lookup through tools. |
|
||||||
|
|
||||||
[Claude]: https://claude.ai/download
|
[Claude]: https://claude.ai/download
|
||||||
[Zed]: https://zed.dev
|
[Zed]: https://zed.dev
|
||||||
[Cody]: https://sourcegraph.com/cody
|
[Cody]: https://sourcegraph.com/cody
|
||||||
|
[Genkit]: https://github.com/firebase/genkit
|
||||||
|
|
||||||
[Resources]: https://modelcontextprotocol.io/docs/concepts/resources
|
[Resources]: https://modelcontextprotocol.io/docs/concepts/resources
|
||||||
[Prompts]: https://modelcontextprotocol.io/docs/concepts/prompts
|
[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
|
- Uses OpenCTX as an abstraction layer
|
||||||
- Future support planned for additional MCP features
|
- 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
|
## 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.
|
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>
|
<Note>
|
||||||
Resources are designed to be **application-controlled**, meaning that the client application can decide how and when they should be used.
|
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>
|
</Note>
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
|
||||||
|
|
@ -477,7 +477,7 @@ Let's build your first MCP server in Python! We'll create a weather server that
|
||||||
|
|
||||||
## Available transports
|
## 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)
|
### SSE (Server-Sent Events)
|
||||||
|
|
||||||
|
|
@ -638,18 +638,15 @@ uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||||
|
|
||||||
<Step title="Add resource templates">
|
<Step title="Add resource templates">
|
||||||
```python
|
```python
|
||||||
@self.list_resources()
|
@app.list_resource_templates()
|
||||||
async def list_resources(self) -> ListResourcesResult:
|
async def list_resource_templates() -> list[ResourceTemplate]:
|
||||||
return ListResourcesResult(
|
return [
|
||||||
resources=[...],
|
ResourceTemplate(
|
||||||
resourceTemplates=[
|
uriTemplate="weather://{city}/current",
|
||||||
ResourceTemplate(
|
name="Current weather for any city",
|
||||||
uriTemplate="weather://{city}/current",
|
mimeType="application/json"
|
||||||
name="Current weather for any city",
|
)
|
||||||
mimeType="application/json"
|
]
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
```
|
```
|
||||||
</Step>
|
</Step>
|
||||||
</Steps>
|
</Steps>
|
||||||
|
|
@ -751,7 +748,7 @@ uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def json(self):
|
def json(self):
|
||||||
return nock_forecast_response
|
return mock_forecast_response
|
||||||
|
|
||||||
class AsyncClient():
|
class AsyncClient():
|
||||||
def __aenter__(self):
|
def __aenter__(self):
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,10 @@ This guide uses the OpenWeatherMap API. You'll need a free API key from [OpenWea
|
||||||
```bash
|
```bash
|
||||||
OPENWEATHER_API_KEY=your-api-key-here
|
OPENWEATHER_API_KEY=your-api-key-here
|
||||||
```
|
```
|
||||||
|
Make sure to add your environment file to `.gitignore`
|
||||||
|
```bash
|
||||||
|
.env
|
||||||
|
```
|
||||||
</Step>
|
</Step>
|
||||||
</Steps>
|
</Steps>
|
||||||
|
|
||||||
|
|
@ -342,18 +346,18 @@ This guide uses the OpenWeatherMap API. You'll need a free API key from [OpenWea
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
content: {
|
content: [{
|
||||||
mimeType: "application/json",
|
type: "text",
|
||||||
text: JSON.stringify(forecasts, null, 2)
|
text: JSON.stringify(forecasts, null, 2)
|
||||||
}
|
}]
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (axios.isAxiosError(error)) {
|
if (axios.isAxiosError(error)) {
|
||||||
return {
|
return {
|
||||||
content: {
|
content: [{
|
||||||
mimeType: "text/plain",
|
type: "text",
|
||||||
text: `Weather API error: ${error.response?.data.message ?? error.message}`
|
text: `Weather API error: ${error.response?.data.message ?? error.message}`
|
||||||
},
|
}],
|
||||||
isError: true,
|
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">
|
<Step title="Build and test">
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
npm link
|
|
||||||
```
|
```
|
||||||
</Step>
|
</Step>
|
||||||
</Steps>
|
</Steps>
|
||||||
|
|
@ -383,7 +386,8 @@ This guide uses the OpenWeatherMap API. You'll need a free API key from [OpenWea
|
||||||
{
|
{
|
||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
"weather": {
|
"weather": {
|
||||||
"command": "weather-server",
|
"command": "node",
|
||||||
|
"args": ["/path/to/weather-server/build/index.js"],
|
||||||
"env": {
|
"env": {
|
||||||
"OPENWEATHER_API_KEY": "your-api-key",
|
"OPENWEATHER_API_KEY": "your-api-key",
|
||||||
}
|
}
|
||||||
|
|
@ -561,7 +565,7 @@ npm run build
|
||||||
Look for detailed error messages in the Claude Desktop logs:
|
Look for detailed error messages in the Claude Desktop logs:
|
||||||
```bash
|
```bash
|
||||||
# Monitor logs
|
# Monitor logs
|
||||||
tail -n 20 -f ~/Library/Application\ Support/Claude/mcp*.log
|
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
|
||||||
```
|
```
|
||||||
|
|
||||||
### Type errors
|
### Type errors
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue