---
title: MCP connection issues
description: Fixing an agent that can't see or won't call Dike's MCP tools.
order: 2
---

Most MCP connection problems trace back to the config shape, not the server. Before assuming something's down, re-check against [Connecting via MCP](/docs/mcp-agents/connecting-via-mcp).

## Agent doesn't see the tools at all

- Config points at `https://api.dike.it.com/mcp` with `"type": "http"` — not `"type": "stdio"` or a local command. Dike's MCP server is remote-only; there's no npm package to install.
- The `Authorization` header is set on the MCP server entry itself, not passed some other way (env var, separate auth block) — different clients name this field differently, but it must end up as an actual `Authorization: Bearer ...` header on the connection.
- Restart/reload the client after editing its MCP config — most clients (including Claude Desktop) only read MCP server config on startup, not live.

## Agent sees the tools but calls fail

- Same failure modes as REST apply here, since the four MCP tools (`dike_search`, `dike_reason`, `dike_cite`, `dike_graph_traverse`) are thin wrappers over the matching endpoints — check [Common errors](/docs/troubleshooting/common-errors) for what a failing call's underlying `code` means.
- `dike_reason` (as `/v1/reason`) requires a Pay As You Go plan. If it's failing specifically for that tool and not the other three, that's very likely `plan_required`, not a connection issue.

## Agent picks the wrong tool, or never calls Dike at all

This isn't a Dike-side connection problem — it's the agent's own tool-selection behavior. Try asking a question that's unambiguously about MENA legal content (an Egyptian statute number, an Arabic legal term) rather than something generic; a vague question gives the agent no strong signal to reach for a legal-search tool over its other tools or general knowledge.

## Still stuck

Verify the server itself is reachable independent of any MCP client:

```bash
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"}'
```

A working response listing the four tools means the issue is client-side config, not the server.
