MCP server proxy endpoint
MCP
MCP server proxy endpoint
Proxies MCP JSON-RPC requests to third-party servers with automatic authentication.
This endpoint supports both regular HTTP requests and Server-Sent Events (SSE) streaming for real-time MCP protocol communication.
Usage
- JSON-RPC: Send MCP protocol requests as JSON
- SSE Streaming: Use
Accept: text/event-streamfor real-time communication - Session Management: Include
x-mcp-session-idheader for session tracking
Authentication Flow
- User must first connect to the server via
/api/servers/{server_id}/connect - Complete OAuth flow for the third-party service
- Use this endpoint to proxy MCP requests with automatic credential injection
GET
MCP server proxy endpoint
Authorizations
JWT token obtained through Barndoor's OAuth 2.0 authorization-code flow with PKCE.
The token should be included in the Authorization header:
Authorization: Bearer <your-jwt-token>
Use the Barndoor SDK's loginInteractive() function to obtain tokens automatically.
Headers
MCP session identifier for request tracking
Path Parameters
MCP server name identifier
Pattern:
^[a-z0-9-]+$Body
application/json
MCP JSON-RPC request payload