anthropics / anthropics/claude-ai-mcp
Allow model to programmatically access prompts and resources
- 主要言語
- 言語のデータがありません
- スター
- 471
- フォーク
- 76
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### What happened?
# Bug Report: Incomplete MCP Protocol Support in Claude
## Summary
Claude's MCP integration only exposes **tools** as callable functions, but does not provide access to **resources** and **prompts** — two of the three core MCP capabilities.
## Environment
- **Product**: Claude.ai (Web, Desktop, Mobile)
- **Claude Version**: Claude Sonnet 4.5 (claude-sonnet-4-5-20250929)
- **MCP Server**: Federated MCP Gateway (https://deno-mcp-gateway.deno.dev)
- **Date Reported**: 2026-01-23
## Expected Behavior
According to the [[Model Context Protocol specification](https://spec.modelcontextprotocol.io/)](https://spec.modelcontextprotocol.io/), MCP servers expose three first-class capabilities:
1. **Tools** — Functions the LLM can invoke
2. **Resources** — Static data sources (URIs) the LLM can read
3. **Prompts** — Templated workflows the LLM can use
A complete MCP integration should provide access to all three via:
- `tools/list` → Exposed ✅
- `tools/call` → Exposed ✅
- `resources/list` → **Missing** ❌
- `resources/read` → **Missing** ❌
- `prompts/list` → **Missing** ❌
- `prompts/get` → **Missing** ❌
## Actual Behavior
Claude only receives MCP **tools** as callable functions. Resources and prompts are invisible to Claude, even when properly exposed by the MCP server.
### Reproduction Steps
1. Connect Claude to an MCP server that exposes all three capabilities (tools, resources, prompts)
2. Verify the server works correctly:
```bash
# Resources are available
curl https://deno-mcp-gateway.deno.dev/mcp/resources/list
# Returns: {"resources": [...]} with 22 resources
# Prompts are available
curl https://deno-mcp-gateway.deno.dev/mcp/prompts/list
# Returns: {"prompts": [...]}
```
3. Ask Claude to list available resources or prompts
4. **Result**: Claude has no functions to call for these operations
### What Claude Sees
```
Available functions: 30+ domain-specific tools
- Federated MCP-Gateway:journey-service-mcp__journey__find_trips
- Federated MCP-Gateway:swiss-tourism-mcp__tourism__search_sights
- Federated MCP-Gateway:open-meteo-mcp__meteo__get_weather
- ... (27 more tools)
Missing functions:
- list_resources() ❌
- read_resource(uri) ❌
- list_prompts() ❌
- get_prompt(name, args) ❌
```
## Impact
### Current Limitations
1. **No resource discovery** — Claude cannot enumerate available static data sources
2. **No resource reading** — Claude cannot access reference data like:
- Station databases (126+ Swiss transport hubs)
- Weather code mappings (28 WMO codes)
- Tourism categories (24 sight types, 60 tags)
- Fare types, travel classes, product catalogs
3. **No prompt workflows** — Claude cannot discover or use curated prompt templates
4. **Manual workarounds required** — Users must manually fetch and paste resource data
### Real-World Example
**Scenario**: User asks "What are the top Swiss attractions?"
**With full MCP support**:
```typescript
const attractions = await read_resource("tourism://top-attractions")
// Returns: 20 iconic sights with prominence scores, ready to use
```
**Current workaround**:
```bash
# User must manually run:
curl https://deno-mcp-gateway.deno.dev/mcp/resources/read?uri=swiss-tourism-mcp__tourism://top-attractions
# Then paste the JSON into the conversation
```
## Business Impact
This limitation affects:
- **MCP server developers** — Cannot leverage resources/prompts in Claude integrations
- **Enterprise users** — Cannot build knowledge-based MCP workflows
- **Anthropic's ecosystem** — Incomplete MCP implementation vs competitors
## Proposed Solution
### Option 1: Expose MCP Primitives as Functions
Add four new functions to Claude's MCP integration:
```typescript
// Resource operations
{
name: "mcp_list_resources",
description: "List all available MCP resources",
parameters: {}
}
{
name: "mcp_read_resource",
description: "Read content of a specific MCP resource",
parameters: { uri: string }
}
// Prompt operations
{
name: "mcp_list_prompts",
description: "List all available MCP prompt templates",
parameters: {}
}
{
name: "mcp_get_prompt",
description: "Get a prompt template with arguments",
parameters: { name: string, arguments?: object }
}
```
### Option 2: Auto-inject Resources at Conversation Start
When connecting to an MCP server, automatically:
1. Call `resources/list`
2. Inject resource metadata into Claude's context
3. Allow Claude to call `resources/read` when needed
### Option 3: Prefix-based Tool Naming
Reserve tool name prefixes for MCP operations:
- `mcp.resources.list()`
- `mcp.resources.read(uri)`
- `mcp.prompts.list()`
- `mcp.prompts.get(name, args)`
## Related Context
### Test Server Details
- **Gateway**: https://deno-mcp-gateway.deno.dev
- **Servers**: 6 federated MCP servers
- **Tools**: 30 exposed ✅
- **Resources**: 22 exposed (not accessible to Claude) ❌
- **Prompts**: Multiple exposed (not accessible to Claude) ❌
### Resource Examples
```json
{
"uri": "sbb://journey-service/stop-places",
"description": "126+ Swiss transport hubs with UIC codes, coordinates, importance rankings"
}
{
"uri": "tourism://top-attractions",
"description": "Top 20 iconic Swiss attractions with prominence scores"
}
{
"uri": "weather://swiss-locations",
"description": "Major Swiss cities, ski resorts, tourist destinations with GPS coordinates"
}
```
## Additional Notes
- This bug affects **all Claude interfaces** (Web, Desktop, Mobile, API)
- Other MCP clients (VS Code, Zed, etc.) have full protocol support
- Workarounds exist but require manual data extraction
- This is blocking advanced MCP orchestration use cases
## References
- MCP Specification: https://spec.modelcontextprotocol.io/
- Claude MCP Documentation: https://docs.claude.com/en/docs/build-with-claude/mcp
- Test Server: https://github.com/modelcontextprotocol/servers
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。