# Connect an MCP host (/deploy/scenarios/agents/connect-mcp-host)



<Callout type="info">
  KubeMQ must be running — see the [Quickstart](/deploy/quickstart#get-your-key) (steps
  1–2 get you there; instant if it's already up).
</Callout>

KubeMQ's MCP gateway is already live on `:9090` the moment the broker starts — there's no
connector to enable and no flag to flip. Point any MCP host at the endpoint and it can
discover and call KubeMQ's tools right away.

## 1 · Point your MCP host at KubeMQ [#1--point-your-mcp-host-at-kubemq]

Add a server entry to your MCP host's config. For Claude Desktop this is
`claude_desktop_config.json` (Claude Desktop → Settings → Developer → Edit Config); Cursor
and other hosts use an equivalent MCP server list:

```json title="claude_desktop_config.json"
{
  "mcpServers": {
    "kubemq": {
      "url": "http://localhost:9090/mcp"
    }
  }
}
```

The `url` must include the `/mcp` path — it's the only required field for an
unauthenticated server. Restart the host so it picks up the new entry.

## 2 · Verify [#2--verify]

Cross-check from both ends:

* **From the server** — `kmq mcp list` prints every MCP tool KubeMQ has registered.
* **From the host** — start a new conversation and ask it what tools it has; KubeMQ's
  tools (for example `queue_send`) should be in the list.

Then make one call as proof: ask the host to send a message to a queue channel — for
example, "send `hello` to the `orders` queue." A successful call returns the tool's result
text with no error.

## Didn't work? [#didnt-work]

<Callout type="warn">
  * **Wrong endpoint/URL** — confirm the `url` is exactly `http://localhost:9090/mcp` (the
    `/mcp` path is required) and that port `9090` is reachable.
  * **Host config** — most MCP hosts need a full restart, not just a reload, to pick up a
    new or changed server entry; check the host's developer/logs panel for a connection
    error.
  * **Auth mismatch** — if the server has JWT auth enabled, add an `Authorization: Bearer <jwt>` header to the host's server entry; without it, calls fail even though the
    endpoint is reachable.
</Callout>

## Go deeper [#go-deeper]

<Cards>
  <Card title="Getting Started with MCP" href="/aiway/mcp/getting-started" description="The full JSON-RPC handshake, the tool catalog, and the MCP SDK in nine languages." />

  <Card title="KubeMQ Aiway: MCP" href="/aiway/mcp" description="How the MCP connector maps tools to KubeMQ operations, session management, and authentication." />
</Cards>
