Dike logoDocs

Most Model Context Protocol (MCP) connection failures arise from client configuration syntax or missing bearer authentication headers.

Rendering diagram...

1. Verify Server Handshake via cURL

Run this terminal command to test whether Dike's remote MCP endpoint responds to your API key:

curl -X POST https://api.dike.it.com/mcp \
  -H "Authorization: Bearer $DIKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'
  • If you receive a JSON response with 4 tools: The Dike server is operating normally. The issue is in your local IDE config file or environment variables.
  • If you receive 401 unauthorized: Your DIKE_API_KEY is invalid, expired, or missing the Bearer prefix.

2. Common Client Configuration Errors

Claude Desktop

  • Incorrect Transport: Ensure the entry uses "type": "http". Dike is a remote HTTP MCP server and does not use "type": "stdio" or local node processes.
  • Config Path: Confirm you edited the correct file (claude_desktop_config.json) in your operating system's application support folder.
  • Full Restart Required: Claude Desktop only parses its configuration file at startup. Completely close the app and restart it.

Cursor / Windsurf

  • File Location: .cursor/mcp.json must be in the workspace root directory.
  • Header Key Syntax: Ensure headers are nested inside the "headers" object:
{
  "mcpServers": {
    "dike": {
      "type": "http",
      "url": "https://api.dike.it.com/mcp",
      "headers": {
        "Authorization": "Bearer dike_live_your_actual_key"
      }
    }
  }
}

3. The Agent Never Selects Dike Tools

If the tools are connected and visible in your client's tool inventory, but the LLM refuses to invoke them:

  1. Explicit Legal Keyword: The LLM chooses tools based on query intent. If you ask a generic question like "What is negligence?", the model may answer from general training data.
  2. Add Jurisdictional Context: Include country or statutory keywords:
    • "وفقاً للقانون المدني المصري، ما هي أركان المسؤولية التقصيرية؟"
    • "In Saudi Arabian commercial regulations, what are the conditions for bankruptcy filing?"

Next Steps

On this page