Protocol Versions
SDK Version
Poke uses MCP TypeScript SDK v1.17.3Supported Protocol Versions
- 2025-06-18 (latest) - Primary support
- 2024-11-05 - Backward compatibility fallback
Default Negotiated Version
2025-03-26Version Negotiation
During the initialization handshake, Poke and your server negotiate the highest mutually supported protocol version. Negotiation flow:- Client sends
initializerequest with supported versions - Server responds with its supported versions
- Highest common version is selected
- All subsequent communication uses negotiated version
Capabilities Matrix
Poke declares these capabilities during initialization:| Capability | Support | Implementation Details |
|---|---|---|
tools | ✅ Full | Supports tools/list and tools/call |
prompts | ❌ None | Not called, safe to expose |
resources | ❌ None | Not called, safe to expose |
roots | ❌ None | Not implemented |
elicitation | ❌ None | Not implemented |
sampling | ❌ None | Not implemented |
Tools Capability
Poke implements the complete Tools capability: Supported Operations:tools/list- Discovery of available toolstools/call- Execution of tools with parameters
- Tools are discovered once during initial connection
- Tool schemas are cached for the session lifetime
- No automatic re-discovery (users must disconnect/reconnect for updates)
- See Tool Lifecycle for caching details
Transport Layer
Supported Transports
Poke implements two MCP transport protocols:1. Streamable HTTP (Primary)
Specification: MCP Streamable HTTP Behavior:- Attempted first on all new connections
- Uses HTTP POST to server endpoint
- Supports streaming responses
- Recommended for all new integrations
2. SSE (Server-Sent Events)
Specification: MCP SSE Behavior:- Automatic fallback if HTTP fails for non-authentication reasons
- Used for backward compatibility
- One-way server-to-client streaming
Transport Selection
Poke uses this algorithm to select transport: Key Behaviors:- Transport is detected once during initial connection
- Selected transport is stored and reused for all future calls
- No per-call transport fallback after initial detection
- Authentication failures prevent fallback to SSE
- Connection failures clear stored transport preference
Unsupported Transports
stdio - Not supported. For local development, use:- MCP Inspector - Web-based testing tool
- Claude Desktop - Desktop app with stdio support
Server Metadata
During initialization, Poke extracts these metadata fields from your server’s response:Required Fields
| Field | Type | Description | Usage in Poke |
|---|---|---|---|
name | string | Server identifier | Shown to agents during tool execution |
version | string | Semantic version | Logged for debugging, not shown to users |
Optional Fields
| Field | Type | Description | Usage in Poke |
|---|---|---|---|
title | string | Human-readable name | Displayed in integration settings UI |
instructions | string | Agent guidance | Critical: Passed to execution agent for tool usage decisions |
Instructions Field
Theinstructions field is the most important metadata for integration quality.
Purpose:
- Guides Poke’s execution agent on when and how to use your tools
- Acts as the “system prompt” for your integration
- Dramatically impacts agent performance
Connection Lifecycle
Initialization Sequence
Tool Discovery
Poke callstools/list immediately after initialization:
Request:
- Tools are cached in-memory for the connection lifetime
- Cache persists across multiple conversations
- Cache is cleared when user disconnects or connection fails
- No automatic refresh mechanism
- To update tools, users must disconnect and reconnect
Tool Execution
When an agent decides to use a tool, Poke callstools/call:
Request:
- Called by Poke’s execution agent (not user-facing agents)
- Agent decides when to call tools based on:
- Tool descriptions
- Server instructions
- Conversation context
- User intent
- Multiple tools can be called in sequence
- Results are passed to user-facing agent for response generation
Authentication
Supported Methods
Poke implements three authentication patterns:1. No Auth
Use case: Public integrations without user credentials Implementation:- No authentication header sent
- Server must allow unauthenticated access
- User adds integration with URL only
2. API Key
Use case: Simple token-based authentication Implementation:- User provides API key during setup
- Poke stores key securely (encrypted at rest)
- Key sent in Authorization header:
- Validate token on every request
- Return 401 for invalid/expired tokens
- Support key rotation (users can update key in settings)
3. OAuth 2.0
Use case: Delegated access to user accounts Implementation:- Authorization Code flow with PKCE
- User redirects to your OAuth page
- User authorizes integration
- Poke exchanges code for access token
- Tokens stored securely (encrypted at rest)
- Automatic token refresh using refresh token
- Authorization URL: Where users authorize
- Token URL: For code exchange and refresh
- Supports PKCE (RFC 7636)
- Automatic when access token expires
- Uses refresh token to obtain new access token
- If refresh fails, user must re-authorize
Error Handling
Standard Error Codes
Poke handles these JSON-RPC error codes:| Code | Meaning | Poke Behavior |
|---|---|---|
| -32700 | Parse error | Log error, show connection failed |
| -32600 | Invalid Request | Log error, retry with corrected request |
| -32601 | Method not found | Log error, mark capability as unsupported |
| -32602 | Invalid params | Log error, show tool execution failed |
| -32603 | Internal error | Show error to user, allow retry |
| 401 | Unauthorized | Prompt user to re-authenticate |
| 403 | Forbidden | Show permission error to user |
| 404 | Not Found | Show “Integration not found” error |
| 429 | Rate Limited | Exponential backoff, show rate limit message |
| 500-599 | Server Error | Show error to user, allow retry |
Authentication Errors
401 Unauthorized:- API Key: Prompt user to update key
- OAuth: Attempt token refresh, then prompt re-authorization if refresh fails
- No Auth: Show error (misconfigured server)
- Show “Insufficient permissions” error
- For OAuth: Suggest re-authorization with additional scopes
Connection Errors
Network timeout:- Default timeout: 30 seconds
- Show “Connection timeout” error
- Allow retry
- Show “Cannot reach server” error
- Suggest checking server URL and network
- Require valid SSL certificate
- Show certificate error details
- Do not allow insecure connections
Rate Limiting
Poke does not implement client-side rate limiting. Your server should: Implement rate limits:- Return 429 status code with
Retry-Afterheader - Include error message describing limit
- Respects
Retry-Afterheader - Shows rate limit message to user
- Prevents further calls until retry time
Implementation Checklist
Use this checklist to ensure MCP compliance:Protocol
- Implement protocol version 2025-06-18 or 2024-11-05
- Support version negotiation during initialization
- Handle
initializeandinitializedmessages
Transport
- Expose HTTPS endpoint (not HTTP)
- Implement Streamable HTTP transport
- Optionally support SSE for backward compatibility
Capabilities
- Respond to
tools/listwith tool schemas - Implement
tools/callfor tool execution - Return valid JSON-RPC responses
Metadata
- Provide
nameandversionin server info - Optionally provide
titlefor UI display - Include
instructionswith guidance for agents
Authentication
- Choose authentication pattern (No Auth, API Key, or OAuth)
- Validate credentials on every request
- Return 401 for authentication failures
Error Handling
- Return standard JSON-RPC error codes
- Include descriptive error messages
- Implement rate limiting with 429 responses
Tools
- Provide clear, descriptive tool names
- Write comprehensive tool descriptions
- Define complete JSON schemas for parameters
- Return structured, informative results
Testing Your Integration
Local Testing
-
Use MCP Inspector:
Web-based tool for testing MCP servers
-
Use Claude Desktop:
- Supports stdio for local testing
- Test tool discovery and execution
- Validate server instructions
Deployment Testing
- Deploy to HTTPS endpoint
- Add integration in Poke:
- Go to Settings → Integrations
- Enter your server URL
- Complete authentication if required
- Test in conversations:
- Ask questions that should trigger your tools
- Verify agent uses tools appropriately
- Check tool results are accurate
Debugging
Check connection logs:- Initialization handshake
- Protocol version negotiation
- Tool discovery response
- Authentication success/failure
- Tools not being called: Review server instructions, improve tool descriptions
- Authentication failures: Verify token/OAuth implementation
- Connection timeouts: Check server response time (<30s)
- Transport failures: Ensure HTTPS endpoint is accessible
Related Documentation
MCP in Poke
High-level concepts and overview
Tool Lifecycle
Tool caching and update behavior
Authentication
Authentication implementation guide
Server Instructions
Writing effective agent instructions