Developers & AI

Tutorial: Test MCP with JSON-RPC

Call initialize, tools/list, and get_context with curl to verify your Bearer token.

  1. This tutorial verifies the MCP endpoint outside Claude/Cursor — useful when debugging auth.

  2. Step 1: Get a Bearer token (OAuth access token eta_… or API key etsk_live_…).

  3. Step 2: POST https://www.ettajer.com/api/v1/mcp with Content-Type: application/json and Authorization: Bearer …

  4. Step 3 — initialize: body {"jsonrpc":"2.0","id":1,"method":"initialize","params":{}} . Expect a result, not an auth error.

  5. Step 4 — tools/list: {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}} . Confirm theme tools appear.

  6. Step 5 — resources/list: id 3, method resources/list. Expect ettajer://store and related URIs.

  7. Step 6 — Call a tool via tools/call for get_context (follow your client’s MCP tools/call shape) or use REST GET /api/v1/context with the same Bearer.

  8. Step 7: If you get 401, regenerate or regenerate credentials. If tools are missing scopes, expand the OAuth grant scopes and reconnect.

  9. Step 8: Never log the Authorization header. Rotate the key after shared debugging sessions.

  10. Reference: /developers/mcp and /developers/ai-integration § Test connection.

Was this article helpful?

Contact support