Client setup

Connect apphub-mcp from Claude Desktop and Cursor, and try tools/list · tools/call right away.

Before you start

  • MCP server: https://api.jocodingax.ai/mcp
  • Auth: Authorization: Bearer <access_token> (see Auth & permissions)
  • Protocol: JSON-RPC 2.0, version 2025-11-25
  • Session: pass the sessionId from initialize in the Mcp-Session-Id header on every follow-up

Connect Claude Desktop

Add the server to mcp.json

In Claude Desktop's config folder (~/Library/Application Support/Claude/) open mcp.json and register the server. Transport is HTTP + SSE, so use "type": "sse".

mcp.json
{
  "mcpServers": {
    "apphub": {
      "type": "sse",
      "url": "https://api.jocodingax.ai/mcp",
      "authentication": {
        "type": "oauth",
        "resource_metadata": "https://api.jocodingax.ai/.well-known/oauth-protected-resource"
      }
    }
  }
}

Claude Desktop reads resource_metadata, discovers the authorization server, and runs the OAuth flow to fetch a token for you.

Restart Claude and check

Restart Claude Desktop. When apphub shows a green dot, tools/list exposes all 26 tools grouped by App · Deploy · GitHub · Table · API.

Connect Cursor

Cursor uses the same shape in ~/.cursor/mcp.json. The only difference is "type": "http".

~/.cursor/mcp.json
{
  "mcpServers": {
    "apphub": {
      "type": "http",
      "url": "https://api.jocodingax.ai/mcp",
      "auth": {
        "strategy": "oauth_bearer",
        "resource_metadata": "https://api.jocodingax.ai/.well-known/oauth-protected-resource"
      }
    }
  }
}

Just want to curl it?

Want to poke the server without a client? curl works fine.

initialize — create a session

Terminal
$ curl -sS -X POST https://api.jocodingax.ai/mcp \
    -H "Authorization: Bearer $AX_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc":"2.0","id":1,"method":"initialize",
      "params":{"protocolVersion":"2025-11-25"}
    }'

Grab result.sessionId and pass it as Mcp-Session-Id on every subsequent request.

tools/list — see what you can use

Terminal
$ curl -sS -X POST https://api.jocodingax.ai/mcp \
    -H "Authorization: Bearer $AX_ACCESS_TOKEN" \
    -H "Mcp-Session-Id: $SESSION_ID" \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

The result is scope-filtered — a read-only token won't see deploy_app, for example.

tools/call — actually invoke one

Terminal
$ curl -sS -X POST https://api.jocodingax.ai/mcp \
    -H "Authorization: Bearer $AX_ACCESS_TOKEN" \
    -H "Mcp-Session-Id: $SESSION_ID" \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc":"2.0","id":3,"method":"tools/call",
      "params":{
        "name":"deploy_app",
        "arguments":{"app_id":42,"strategy":"canary"}
      }
    }'

Long-running tools like deploy_app can run asynchronously — add arguments.task:

run async
{
  "name": "deploy_app",
  "arguments": {
    "app_id": 42,
    "task": { "ttl": 900, "pollInterval": 3 }
  }
}

Then poll tasks/get / tasks/result, or listen on the SSE stream for updates.

Subscribe to resource changes

Want live updates when apps or deployments change? Use resources/subscribe:

resources/subscribe
{
  "jsonrpc":"2.0","id":10,"method":"resources/subscribe",
  "params":{ "uri": "apphub://apps/42/deployments" }
}

Requires Mcp-Session-Id + OAuth. Once subscribed, resources/updated events flow in through the GET /mcp SSE stream.