Witnium logo
WITNIUM. Chain.
Guide

How to set up a Model Context Protocol (MCP) server for Claude and Cursor

The Model Context Protocol (MCP) is an open standard that lets AI assistants like Claude, Cursor and Windsurf call external tools through a single JSON-RPC interface. This guide walks through configuring an MCP server end-to-end in under ten minutes.

What is the Model Context Protocol?

The Model Context Protocol (MCP) is an open JSON-RPC protocol introduced by Anthropic for connecting AI models to external tools, data sources and services. An MCP server exposes a typed list of tools; an MCP host — Claude Desktop, Cursor, Windsurf, or any compatible agent runtime — discovers those tools at startup and makes them available to the model on every turn.

Witniumchain ships a hosted MCP server at https://mcp.witniumchain.com that exposes three tools for tamper-evident AI evidence: witness, verify and bind. The setup steps below apply to any Streamable HTTP MCP server, not just Witniumchain.

Prerequisites

  • An MCP host installed: Claude Desktop (macOS/Windows), Cursor, or Windsurf.
  • An MCP server endpoint URL (or an npm-published stdio server package).
  • A bearer token if the server requires auth — for Witniumchain, mint one from Credentials.
  • Node.js 18+ on your machine (Claude Desktop uses npx to launch stdio servers).

Connect an MCP server to Claude Desktop

Claude Desktop reads MCP servers from a JSON config file. Open or create it:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Paste the following, replacing the token and contract placeholders:

{
  "mcpServers": {
    "witniumchain": {
      "command": "npx",
      "args": ["-y", "@witnium-tech/mcp-server"],
      "env": {
        "WITNIUM_TOKEN": "wc_live_••••••••••••••••••••••",
        "WITNIUM_CONTRACT": "0x••••••••••••••••••••••••••••••••••••••••"
      }
    }
  }
}

Save the file and fully quit Claude Desktop (⌘Q on macOS), then reopen it. The hammer icon in the input box should now list the MCP tools.

Connect an MCP server to Cursor and Windsurf

Cursor and Windsurf both support Streamable HTTP MCP servers via a JSON config:

  • Cursor: ~/.cursor/mcp.json
  • Windsurf: ~/.codeium/windsurf/mcp_config.json
# ~/.cursor/mcp.json
{
  "mcpServers": {
    "witniumchain": {
      "url": "https://mcp.witniumchain.com",
      "headers": {
        "Authorization": "Bearer wc_live_••••••••••••••••••••••",
        "X-Witnium-Contract": "0x••••••••••••••••••••••••••••••••••••••••"
      }
    }
  }
}

Restart the editor. Cursor surfaces MCP tools in Settings → MCP; Windsurf shows them in the Cascade panel.

Verify the MCP server connection

Before pointing a model at the server, confirm it is reachable and that tools/list returns the expected primitives. MCP Streamable HTTP requires the Accept: application/json, text/event-stream header:

curl -fsS -X POST https://mcp.witniumchain.com \
  -H "Authorization: Bearer wc_live_••••••••••••••••••••••" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

A healthy server returns a JSON-RPC response with a result.tools array. If you get HTTP 406, the Accept header is missing.

Troubleshooting

  • 401 Unauthorized — bearer token is missing, malformed, or revoked. Re-issue it.
  • 403 Forbidden — token is valid but the scope for the tool is missing.
  • 404 Not Found — wrong endpoint URL (most MCP servers live at the root path, not /mcp).
  • 406 Not Acceptable — add Accept: application/json, text/event-stream.
  • No tools appear in Claude — fully quit and relaunch; check the host's MCP log file for stderr from npx.

Next steps

Read the Witniumchain MCP reference for the full tool schemas, OAuth scopes and error codes, or jump into the live API reference.