> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryhikoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting the MCP

> Generate an API key and wire up Claude Desktop, Claude Code, or any MCP client to your Hikoo account.

Setup is two steps: create an API key, then plug it into your MCP client.

<Steps>
  ### Generate an API key

  Your key identifies you as a user and can reach every website in the workspaces you belong to. You create it at the account level, not per website.

  1. Open **Settings**, then the **API keys** section.
  2. Click **Create API key**.
  3. Give it a descriptive name such as `Claude Desktop` or `Analyst workflow`, and an optional expiry.
  4. **Copy the key immediately.** It starts with `hk_` and is shown only once.

  <Warning>
    Keys inherit your access. Treat them like passwords, never commit them, and revoke a key if it leaks.
  </Warning>

  See [API keys](/guides/api-keys) for managing keys and the REST API.

  ### Point your MCP client at Hikoo

  The Hikoo MCP endpoint is:

  ```
  https://mcp.tryhikoo.com/mcp
  ```

  It uses the streamable HTTP transport. Pass your API key in the `Authorization` header.

  <Tabs>
    <Tab title="Claude Desktop">
      Edit `claude_desktop_config.json`:

      ```json theme={null}
      {
        "mcpServers": {
          "hikoo": {
            "type": "http",
            "url": "https://mcp.tryhikoo.com/mcp",
            "headers": {
              "Authorization": "Bearer hk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            }
          }
        }
      }
      ```

      Restart Claude Desktop. The **Hikoo** server appears in the tools menu.
    </Tab>

    <Tab title="Claude Code">
      Use `claude mcp add` (or edit `.mcp.json`):

      ```bash theme={null}
      claude mcp add hikoo --transport http \
        --url https://mcp.tryhikoo.com/mcp \
        --header "Authorization: Bearer hk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      ```
    </Tab>

    <Tab title="Other MCP clients">
      Any client that supports the **streamable HTTP** transport works. Configure:

      * **URL**: `https://mcp.tryhikoo.com/mcp`
      * **Header**: `Authorization: Bearer hk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`

      Check your client's documentation for how to supply custom headers.
    </Tab>
  </Tabs>

  ### Pick a website

  Because one key can reach several websites, most questions start by choosing one. Your client handles this for you with the discovery tools:

  1. `hk_list_workspaces_with_websites` returns your workspaces and the websites inside each, each with its `has_active_subscription` status.
  2. If you have not said which site to use, the client asks.
  3. The chosen `website_id` is passed to every data tool.

  <Note>
    Data tools return `403` for a website without an active subscription. Discovery tools always work.
  </Note>

  ### Try it out

  Start a new chat and ask something like:

  > *"For my main website, what are the top AI platforms citing me this month?"*

  The client discovers your site, calls a Hikoo tool, and answers with live data.
</Steps>

## Managing keys

* **List your keys** in **Settings**, then **API keys**.
* **Revoke** a key to deactivate it immediately. Clients using it receive a `401 Unauthorized`.
* **Expiration** is optional. Set it when creating a key if you want automatic rotation.

## Troubleshooting

| Symptom                          | Likely cause                                                                                   |
| -------------------------------- | ---------------------------------------------------------------------------------------------- |
| `401 Invalid or expired API key` | The key was revoked, expired, or typed incorrectly. Create a fresh one.                        |
| `403` on a data tool             | The chosen website has no active subscription, or you lack access to it.                       |
| Tools do not appear in Claude    | Confirm the client restarted after editing the config, and the transport is `http`, not `sse`. |

See the [tools reference](/guides/mcp/tools) for what you can ask once connected.
