feat(marketplace): command consolidation + 8 new plugins (v8.1.0 → v9.0.0) [BREAKING]
Phase 1b: Rename all ~94 commands across 12 plugins to /<noun> <action> sub-command pattern. Git-flow consolidated from 8→5 commands (commit variants absorbed into --push/--merge/--sync flags). Dispatch files, name: frontmatter, and cross-reference updates for all plugins. Phase 2: Design documents for 8 new plugins in docs/designs/. Phase 3: Scaffold 8 new plugins — saas-api-platform, saas-db-migrate, saas-react-platform, saas-test-pilot, data-seed, ops-release-manager, ops-deploy-pipeline, debug-mcp. Each with plugin.json, commands, agents, skills, README, and claude-md-integration. Marketplace grows from 12→20. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
131
plugins/debug-mcp/skills/mcp-protocol.md
Normal file
131
plugins/debug-mcp/skills/mcp-protocol.md
Normal file
@@ -0,0 +1,131 @@
|
||||
# MCP Protocol Skill
|
||||
|
||||
Model Context Protocol (MCP) specification reference for debugging and development.
|
||||
|
||||
## Protocol Overview
|
||||
|
||||
MCP uses JSON-RPC 2.0 over stdio (standard input/output) for communication between Claude Code and MCP servers.
|
||||
|
||||
### Transport Types
|
||||
|
||||
| Transport | Description | Use Case |
|
||||
|-----------|-------------|----------|
|
||||
| **stdio** | JSON-RPC over stdin/stdout | Default for Claude Code |
|
||||
| **SSE** | Server-Sent Events over HTTP | Remote servers |
|
||||
|
||||
## Tool Definitions
|
||||
|
||||
Tools are the primary way MCP servers expose functionality.
|
||||
|
||||
### Tool Registration
|
||||
|
||||
```python
|
||||
@mcp.tool()
|
||||
def list_issues(state: str = "open", labels: list[str] = None) -> str:
|
||||
"""List issues from the repository.
|
||||
|
||||
Args:
|
||||
state: Issue state filter (open, closed, all)
|
||||
labels: Filter by label names
|
||||
"""
|
||||
# implementation
|
||||
```
|
||||
|
||||
### Tool Schema (JSON)
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "list_issues",
|
||||
"description": "List issues from the repository",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"state": {
|
||||
"type": "string",
|
||||
"enum": ["open", "closed", "all"],
|
||||
"default": "open",
|
||||
"description": "Issue state filter"
|
||||
},
|
||||
"labels": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Filter by label names"
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Resource Definitions
|
||||
|
||||
Resources expose data that can be read by the client.
|
||||
|
||||
```python
|
||||
@mcp.resource("config://settings")
|
||||
def get_settings() -> str:
|
||||
"""Return current configuration."""
|
||||
return json.dumps(config)
|
||||
```
|
||||
|
||||
## Prompt Definitions
|
||||
|
||||
Prompts provide reusable prompt templates.
|
||||
|
||||
```python
|
||||
@mcp.prompt()
|
||||
def analyze_issue(issue_number: int) -> str:
|
||||
"""Generate a prompt to analyze a specific issue."""
|
||||
return f"Analyze issue #{issue_number} and suggest solutions."
|
||||
```
|
||||
|
||||
## JSON-RPC Message Format
|
||||
|
||||
### Request
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
"method": "tools/call",
|
||||
"params": {
|
||||
"name": "list_issues",
|
||||
"arguments": {"state": "open"}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Response (Success)
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
"result": {
|
||||
"content": [{"type": "text", "text": "..."}]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Response (Error)
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
"error": {
|
||||
"code": -32600,
|
||||
"message": "Invalid Request"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Error Codes
|
||||
|
||||
| Code | Meaning |
|
||||
|------|---------|
|
||||
| -32700 | Parse error (invalid JSON) |
|
||||
| -32600 | Invalid request |
|
||||
| -32601 | Method not found |
|
||||
| -32602 | Invalid params |
|
||||
| -32603 | Internal error |
|
||||
Reference in New Issue
Block a user