mcp-research

nspady's avatarfrom nspady

Expert research tool for Model Context Protocol implementations. PROACTIVELY use when reviewing MCP server code, planning new MCP tools/resources/prompts, investigating protocol compliance issues, or validating architecture. Specializes in protocol compliance (JSON-RPC 2.0), security patterns, transport layers, and production best practices. Current spec: 2025-06-18.

⭐804stars🔀243forks📁View on GitHub🕐Updated Dec 9, 2025

When & Why to Use This Skill

The mcp-research skill is a specialized expert utility designed for developers building and maintaining Model Context Protocol (MCP) implementations. It streamlines the development lifecycle by providing real-time protocol compliance checks (JSON-RPC 2.0), security pattern auditing, and architectural guidance based on the latest 2025-06-18 specifications, ensuring MCP servers are production-ready and secure.

Use Cases

  • 1. Automated Code Review: Proactively audit MCP server implementations to identify protocol violations, security gaps, and non-compliant JSON-RPC 2.0 message structures.
  • 2. Architecture & Feature Planning: Plan the design of new MCP tools, resources, and prompts using standardized protocol patterns and best practices for transport layers like stdio and SSE.
  • 3. Security & Consent Validation: Ensure implementation workflows correctly handle user consent, input sanitization, and sensitive data protection according to official MCP security standards.
  • 4. Protocol Troubleshooting: Rapidly investigate and resolve complex initialization errors or transport layer issues by cross-referencing the latest official specifications and community-proven solutions.
namemcp-research
descriptionExpert research tool for Model Context Protocol implementations. PROACTIVELY use when reviewing MCP server code, planning new MCP tools/resources/prompts, investigating protocol compliance issues, or validating architecture. Specializes in protocol compliance (JSON-RPC 2.0), security patterns, transport layers, and production best practices. Current spec: 2025-06-18.
allowed-toolsRead, Grep, Glob, WebFetch, WebSearch

MCP Implementation Research

Quick Start

What are you doing?

  • 📝 Reviewing MCP server → references/implementation-checklist.md
  • 🚀 Planning MCP feature → references/protocol-patterns.md
  • 🐛 Protocol issue → references/common-pitfalls.md
  • ✅ Architecture validation → All references + latest spec

Research Workflow

  1. Understand implementation - What MCP capabilities? Which transport? What security requirements?
  2. Consult references - Load relevant reference files progressively
  3. Check latest spec - WebFetch https://modelcontextprotocol.io/specification/2025-06-18
  4. Search community - WebSearch for "MCP [specific-issue] 2025"
  5. Validate compliance - Protocol compliance, security, best practices
  6. Report findings - Structured format (see examples/)

Critical MCP Requirements

Protocol Compliance (JSON-RPC 2.0)

  • All messages MUST include jsonrpc: "2.0"
  • Responses include result OR error, never both
  • Initialization: initialize → response → initialized notification
  • Use standard error codes (-32xxx)
  • User consent MUST be obtained before data access
  • Tool execution requires explicit approval
  • No hardcoded credentials
  • Input/output sanitization required

Capability Advertisement

  • Declare all capabilities in initialize response
  • Types: tools, resources, prompts, logging, experimental
  • Protocol version: "2025-06-18" (latest)

Transport Layers

stdio:

  • Newline-delimited JSON-RPC messages
  • Use stderr for logging (not stdout)
  • Flush after each message

HTTP/SSE:

  • POST /mcp for JSON-RPC requests
  • GET /mcp/sse for server-sent events
  • CORS configured for browser clients

Key Reference Files

implementation-checklist.md - Protocol compliance, capabilities, security, production readiness protocol-patterns.md - Tool/resource/prompt patterns, best practices, code examples common-pitfalls.md - Known issues, edge cases, gotchas

Research Sources

Official Spec: https://modelcontextprotocol.io/specification/2025-06-18 Best Practices: https://modelcontextprotocol.info/docs/best-practices/ Examples: https://github.com/modelcontextprotocol/servers

Search Patterns

# Protocol issues
WebSearch("MCP JSON-RPC [specific-error] 2025")

# Implementation patterns
WebSearch("MCP server [capability-type] best practices site:github.com")

# Security
WebSearch("MCP consent workflow implementation 2025")

Output Format

BE EXTREMELY CONCISE. Senior engineers with limited time.

MAX 400 words. Focus on critical issues only:

  • Protocol violations (file:line)
  • Security gaps (specific CVE/exploit)
  • 3 max actionable fixes

Code Review Template

**Protocol:** [compliant/non-compliant + critical issue]
**Security:** [ok/issue + specific vulnerability]
**Critical Fixes:** [1-3 items max, file:line references]

Feature Planning Template

**Approach:** [tool/resource/prompt]
**Requirements:** [1-2 critical constraints]
**Security:** [specific consent/privacy needs]

DO NOT:

  • Write long explanations
  • Create documentation files
  • Provide code examples (unless critical fix)
  • Explain basic MCP concepts

Success Criteria

✅ Protocol compliance (JSON-RPC 2.0 + MCP spec) ✅ Security requirements met (consent + privacy) ✅ Best practices followed ✅ Production ready (monitoring + scaling)