What is MCP?
Model Context Protocol is a standardized interface for:- Tool discovery - List available capabilities
- Tool execution - Call tools with parameters
- Resource access - Read/write files and data
- Prompt templates - Access agent instructions
Gateway Connection
Connect to your MCP gateway:Supported Transports
| Transport | URL | Use Case |
|---|---|---|
| Streamable HTTP | /sse (GET) + /messages (POST) | Stateful sessions, streaming |
| HTTP | / (POST) | Stateless, firewall-friendly |
Authentication
All requests require OAuth token or API key:Protocol Methods
Tool Discovery
Tool Execution
Resource Access
Prompt Templates
Request-Response Flow
Tool Availability
Tools are automatically exposed from capabilities: Tool names follow pattern:{plugin}__{tool_name} or {builtin}_{tool_name}
Example: Complete Flow
1. Connect and List Tools
2. Call a Tool
3. Handle Errors
Error Handling
MCP uses JSON-RPC 2.0 error codes:| Code | Meaning |
|---|---|
| -32700 | Parse error |
| -32600 | Invalid Request |
| -32601 | Method not found |
| -32602 | Invalid params |
| -32603 | Internal error |
Gateway Features
Session State
Streamable HTTP maintains session state:Resource Files
Access files uploaded to the gateway:Timeouts
Tool execution timeout: Default 30 seconds (configurable per plugin)Limits
| Resource | Limit |
|---|---|
| Request size | 1MB |
| Response size | 10MB |
| Tool timeout | 30s (configurable) |
| Concurrent requests | 10 per session |
SDKs and Libraries
Official SDKs for MCP integration:- Python:
mcp-python-sdk - TypeScript:
@modelcontextprotocol/sdk - Rust:
mcp-rust