-
Notifications
You must be signed in to change notification settings - Fork 12
MCP Resources
Last Updated: 2025-10-23 | Status: ✅ Implemented in v1.12.0+
MCP Resources expose Cisco Support data as structured, URI-addressable resources that MCP clients can access directly without making tool calls. This provides faster access, reduced API overhead, and enables proactive data monitoring.
- Claude Desktop - Reference bug data in conversations without explicit queries
- VS Code - Show inline bug information and product specs
- MCP Inspector - Test and explore available resources
- Custom Clients - Build specialized interfaces for Cisco data
- Access Cisco bug data as context automatically
- Reference product specifications without user prompts
- Monitor security advisories proactively
- Build knowledge graphs from Cisco data
- IDE Integrations - Show bug information inline in code
- CI/CD Pipelines - Check for known issues during builds
- Documentation Generators - Pull product specifications
- Testing Frameworks - Validate against bug databases
- Alert Systems - Monitor critical bugs in real-time
- Compliance Checkers - Verify security patches are applied
- Inventory Systems - Track product EOL dates
- Upgrade Planners - Check version compatibility
| Aspect | MCP Tools | MCP Resources |
|---|---|---|
| Invocation | User explicitly calls tool | Client proactively fetches |
| Use Case | "Search for bugs about X" | Background monitoring, caching |
| Response Time | On-demand, may be slow | Can be pre-fetched, cached |
| Overhead | Full API call each time | Can reduce duplicate calls 50% |
| User Awareness | User knows it's happening | Transparent to user |
Pre-defined resources that return curated datasets:
GET resources/list
Response:
{
"resources": [
{
"uri": "cisco://bugs/recent/critical",
"name": "Recent Critical Bugs",
"description": "High-severity bugs from the last 7 days",
"mimeType": "application/json"
},
{
"uri": "cisco://bugs/recent/high",
"name": "Recent High-Severity Bugs",
"description": "Severity 1-3 bugs from the last 30 days",
"mimeType": "application/json"
},
{
"uri": "cisco://products/catalog",
"name": "Product Catalog",
"description": "Product catalog overview",
"mimeType": "application/json"
},
{
"uri": "cisco://security/advisories/recent",
"name": "Recent Security Advisories",
"description": "Latest 20 security advisories from Cisco PSIRT",
"mimeType": "application/json"
},
{
"uri": "cisco://security/advisories/critical",
"name": "Critical Security Advisories",
"description": "Critical severity security advisories",
"mimeType": "application/json"
}
]
}Dynamic URI patterns that accept parameters:
GET resources/templates/list
Response:
{
"resourceTemplates": [
{
"uriTemplate": "cisco://bugs/{bug_id}",
"name": "Cisco Bug Report",
"description": "Access any Cisco bug by its ID (e.g., CSCvi12345)",
"mimeType": "application/json"
},
{
"uriTemplate": "cisco://products/{product_id}",
"name": "Cisco Product Information",
"description": "Get product details by product ID (e.g., C9300-24P, ISR4431)",
"mimeType": "application/json"
},
{
"uriTemplate": "cisco://security/advisories/{advisory_id}",
"name": "Cisco Security Advisory",
"description": "Get security advisory by ID (e.g., cisco-sa-20180221-ucdm)",
"mimeType": "application/json"
},
{
"uriTemplate": "cisco://security/cve/{cve_id}",
"name": "Security Advisory by CVE",
"description": "Get security advisory by CVE identifier (e.g., CVE-2018-0101)",
"mimeType": "application/json"
}
]
}All Cisco Support resources use the cisco:// URI scheme:
cisco://{api}/{category}/{identifier}
Bug Resources:
-
cisco://bugs/recent/critical- Static: Last 7 days of critical bugs -
cisco://bugs/recent/high- Static: Last 30 days of high-severity bugs -
cisco://bugs/CSCvi12345- Template: Specific bug by ID
Product Resources:
-
cisco://products/catalog- Static: Product catalog overview -
cisco://products/C9300-24P- Template: Product by ID
Security Resources:
-
cisco://security/advisories/recent- Static: Latest 20 advisories -
cisco://security/advisories/critical- Static: Critical advisories -
cisco://security/advisories/cisco-sa-20180221-ucdm- Template: Specific advisory -
cisco://security/cve/CVE-2018-0101- Template: Advisory by CVE
POST /mcp
{
"jsonrpc": "2.0",
"id": 1,
"method": "resources/read",
"params": {
"uri": "cisco://bugs/CSCvi12345"
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"contents": [
{
"uri": "cisco://bugs/CSCvi12345",
"mimeType": "application/json",
"text": "{\"description\":\"Bug details for CSCvi12345\",\"data\":{...}}"
}
]
}
}// List static resources
const { resources } = await mcpClient.request({
method: 'resources/list'
});
// List resource templates
const { resourceTemplates } = await mcpClient.request({
method: 'resources/templates/list'
});
// Read a specific bug using template
const bugData = await mcpClient.request({
method: 'resources/read',
params: { uri: 'cisco://bugs/CSCvi12345' }
});
// Read a product using template
const productData = await mcpClient.request({
method: 'resources/read',
params: { uri: 'cisco://products/C9300-24P' }
});
// Read a CVE advisory
const cveData = await mcpClient.request({
method: 'resources/read',
params: { uri: 'cisco://security/cve/CVE-2018-0101' }
});Resources are automatically enabled based on your SUPPORT_API environment variable:
# Enable all resources (bug, product, security)
SUPPORT_API=all
# Enable only bug resources
SUPPORT_API=bug
# Enable bug and security resources
SUPPORT_API=bug,psirt
# Enable product resources
SUPPORT_API=productResource Availability:
-
SUPPORT_API=bug→ Bug resources available -
SUPPORT_API=product→ Product resources available -
SUPPORT_API=psirt→ Security resources available -
SUPPORT_API=all→ All resources available
Resources can be cached by clients, reducing redundant API requests for frequently accessed data.
Clients can fetch resources in the background without user prompts, enabling:
- Real-time monitoring dashboards
- Automatic context gathering
- Pre-caching frequently needed data
Resources support:
- Client-side caching
- Batch fetching
- Background updates
- Optimistic UI rendering
All resources follow the MCP specification, making them compatible with any MCP-compliant client.
// Client periodically fetches critical advisories
setInterval(async () => {
const critical = await mcpClient.request({
method: 'resources/read',
params: { uri: 'cisco://security/advisories/critical' }
});
updateDashboard(critical);
}, 60000); // Every minute// VS Code extension shows bug info when hovering over bug ID
async function showBugTooltip(bugId: string) {
const bugData = await mcpClient.request({
method: 'resources/read',
params: { uri: `cisco://bugs/${bugId}` }
});
return formatTooltip(bugData);
}# Check for critical bugs before deployment
curl -X POST http://mcp-server:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"method": "resources/read",
"params": {"uri": "cisco://bugs/recent/critical"}
}'// AI assistant automatically gathers context
async function analyzeUpgrade(product: string) {
// Fetch product info as context
const productInfo = await mcpClient.request({
method: 'resources/read',
params: { uri: `cisco://products/${product}` }
});
// Fetch recent bugs as context
const recentBugs = await mcpClient.request({
method: 'resources/read',
params: { uri: 'cisco://bugs/recent/high' }
});
return analyzeWithContext(productInfo, recentBugs);
}Resources are implemented using MCP request handlers:
// List static resources
server.setRequestHandler(ListResourcesRequestSchema, async () => {
return { resources: [...] };
});
// List resource templates (separate endpoint per spec)
server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => {
return { resourceTemplates: [...] };
});
// Read specific resource
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
const { uri } = request.params;
// Dynamic URI resolution based on pattern matching
if (uri.startsWith('cisco://bugs/')) {
const bugId = uri.replace('cisco://bugs/', '');
const bugData = await fetchBugDetails(bugId);
return { contents: [{ uri, mimeType: 'application/json', text: JSON.stringify(bugData) }] };
}
// ... handle other URI patterns
});Clients access resources using standard MCP protocol:
// MCP client automatically handles resource requests
const resource = await client.getResource('cisco://bugs/CSCvi12345');Resource templates follow RFC 6570 URI Template syntax:
Simple Variable Expansion:
cisco://bugs/{bug_id}
→ cisco://bugs/CSCvi12345
Multiple Variables:
cisco://products/{category}/{product_id}
→ cisco://products/switches/C9300-24P
Optional Variables:
cisco://bugs/{bug_id}{?severity,status}
→ cisco://bugs/CSCvi12345?severity=1&status=open
Current Implementation: We use simple variable expansion for clarity and ease of use. Future versions may support more complex templates.
Error: Unknown resource URI: cisco://bugs/INVALID
Solution: Verify the URI matches available resources/templates:
- Check
resources/listfor static resources - Check
resources/templates/listfor template patterns - Ensure resource requires enabled API (check
SUPPORT_API)
Error: MCP error -32601: Method not found
Solution: Ensure you're using the correct method:
-
resources/list- Lists static resources -
resources/templates/list- Lists resource templates (separate endpoint!) -
resources/read- Reads a specific resource
Problem: resources/list returns empty array
Solution: Check your SUPPORT_API configuration:
# Current setting
echo $SUPPORT_API
# Enable all resources
export SUPPORT_API=all
# Restart server
npm start✅ Good:
const bugData = await client.getResource(`cisco://bugs/${dynamicBugId}`);❌ Bad:
const bugData = await client.callTool('get_bug_details', { bug_ids: dynamicBugId });Static resources change infrequently - cache them:
const cache = new Map();
async function getCriticalBugs() {
if (cache.has('critical-bugs')) {
return cache.get('critical-bugs');
}
const data = await client.getResource('cisco://bugs/recent/critical');
cache.set('critical-bugs', data);
setTimeout(() => cache.delete('critical-bugs'), 300000); // 5 min TTL
return data;
}Fetch multiple resources in parallel:
const [bugs, advisories, products] = await Promise.all([
client.getResource('cisco://bugs/recent/critical'),
client.getResource('cisco://security/advisories/recent'),
client.getResource('cisco://products/catalog')
]);try {
const bugData = await client.getResource(`cisco://bugs/${bugId}`);
} catch (error) {
if (error.code === -32602) {
console.error('Invalid bug ID format');
} else if (error.code === 404) {
console.error('Bug not found');
} else {
console.error('Resource fetch failed:', error);
}
}| Feature | Purpose | When to Use |
|---|---|---|
| Resources | Structured data access | Background data, caching, monitoring |
| Tools | User-initiated actions | Interactive searches, complex queries |
| Prompts | Workflow templates | Guided user experiences |
| Sampling | Server requests AI | Intelligent processing, NLP tasks |
- MCP Specification - Resources
- MCP Specification - Resource Templates
- RFC 6570 - URI Template Syntax
- Available Tools Wiki
- Development Guide
Need Help? Report issues at https://github.com/sieteunoseis/mcp-cisco-support/issues