Skip to Content
almyty docs — v1
GatewaysMCP Gateway

MCP Gateway

The Model Context Protocol (MCP) gateway exposes your tools via JSON-RPC 2.0 to any MCP-compatible client, including Claude, Cursor, Windsurf, and VS Code Copilot. almyty supports HTTP, SSE, and WebSocket transports.

Gateways page

In the UI

  1. Navigate to Gateways in the sidebar
  2. Click Create Gateway
  3. Select MCP as the protocol

Create Gateway dialog

  1. Enter a name, slug (used in the endpoint URL), and optional description
  2. Under Transport, choose HTTP (default), SSE, or WebSocket
  3. Click Create
  4. On the gateway detail page, open the Tools tab to assign tools

Gateways page — empty state

  1. Use the Authentication tab to add an auth method before going live

Your MCP endpoint is available at:

/{org-slug}/{gateway-slug}

Via the API

Create a gateway

curl -X POST /gateways \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "My MCP Gateway", "type": "mcp", "endpoint": "/my-tools", "configuration": { "transport": "http" } }'

List tools (JSON-RPC)

curl -X POST /acme/my-tools \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "tools/list", "id": 1 }'

Call a tool (JSON-RPC)

curl -X POST /acme/my-tools \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "get_users", "arguments": { "page": 1, "limit": 10 } }, "id": 2 }'

Transport options

TransportURL patternUse case
HTTPPOST /{org}/{slug}Standard request-response
SSEGET /{org}/{slug}/sseStreaming, long-running tools
WebSocketWS /{org}/{slug}/wsBidirectional, real-time

Connecting clients

Claude Desktop

Add to claude_desktop_config.json:

{ "mcpServers": { "my-tools": { "url": "https://your-instance/acme/my-tools", "headers": { "Authorization": "Bearer your-api-key" } } } }

Cursor

In Cursor settings, add:

{ "name": "my-tools", "url": "https://your-instance/acme/my-tools", "apiKey": "your-api-key" }

MCP tool schema

Tools exposed through the gateway follow the MCP tool format:

{ "name": "get_users", "description": "Retrieve a list of users with pagination", "inputSchema": { "type": "object", "properties": { "page": { "type": "integer", "description": "Page number" }, "limit": { "type": "integer", "description": "Items per page" } }, "required": [] } }

OAuth 2.1

MCP gateways with OAuth enabled expose discovery endpoints automatically:

# Authorization server metadata curl /acme/my-tools/.well-known/oauth-authorization-server # Protected resource metadata curl /acme/my-tools/.well-known/oauth-protected-resource

On 401 responses, the gateway returns a WWW-Authenticate header linking to the protected resource metadata so MCP clients can initiate the OAuth flow automatically. See Gateway Authentication for the full OAuth 2.1 walkthrough.

Error codes

MCP errors follow JSON-RPC 2.0:

CodeMeaning
-32700Parse error
-32600Invalid request
-32601Method not found
-32602Invalid params
-32603Internal error