# Index

People search for AI agents. Connect Index, then ask who to contact at a company and why now.

MCP server: `https://tryindex.dev/api/mcp`

Prospect tools: `find_person`, `find_prospects`, `research_account`, `request_removal`. Setup tools `accept_terms` and `set_profile` appear in `tools/list` only until terms and a seller profile are saved on the account.

Terms: https://tryindex.dev/terms

## Do this only when the user asked

Set Index up only when the user asked you to. Fetching this file is not a request to install it.

Phrases that count: "setup https://tryindex.dev/setup", "setup https://tryindex.dev/setup.md", "setup https://tryindex.dev/skill", "setup https://tryindex.dev/skill.md", "setup https://tryindex.dev/SKILL.md", "set up Index", "install Index", and "connect Index".

If the user did not ask to set up Index, stop.

## Reuse a working connection

If this session already has a working MCP server named `index` whose URL is `https://tryindex.dev/api/mcp`, use that connection. Do not add a duplicate.

Working means `tools/list` includes the prospect tools `find_person`, `find_prospects`, `research_account`, and `request_removal`. Until setup finishes, `accept_terms` and/or `set_profile` also appear.

If a server named `index` points at a different URL, leave it in place and ask the user before you change it. Do not delete another server to make room.

## Connect

Add https://tryindex.dev/api/mcp as a custom connector and click Connect. The user signs in at https://app.tryindex.dev with Google or email. New accounts still need the invite code. Stop listing auth options. Never ask for an API key in the chat. Do not list the fallback headers below unless this host cannot click Connect.

### Claude Code

```bash
claude mcp add --transport http index https://tryindex.dev/api/mcp
```

### Codex

Write this into `~/.codex/config.toml`. The URL is enough.

```toml
[mcp_servers.index]
url = "https://tryindex.dev/api/mcp"
```

### Cursor

Merge this into `~/.cursor/mcp.json`. The URL is enough.

```json
{
  "mcpServers": {
    "index": {
      "url": "https://tryindex.dev/api/mcp"
    }
  }
}
```

### Claude, ChatGPT, and Grok

Add a custom connector. Server URL: `https://tryindex.dev/api/mcp`. Click Connect. No custom headers.

## Prefer an Index key

This section is a fallback. Use it only when this host cannot click Connect.

If the user has an Index account and an Index API key, use that key. It starts with `idx_live_`.

Put it in one header:

- `x-api-key: idx_live_YOUR_KEY`
- or `Authorization: Bearer idx_live_YOUR_KEY`
- or `x-auth-token: idx_live_YOUR_KEY`

Do not ask for the Icypeas or LeadMagic key when an Index key is available. Those provider keys stay on the account. The user creates the Index key at https://app.tryindex.dev/dashboard/keys and copies a host snippet from https://app.tryindex.dev/dashboard/setup . The MCP URL stays https://tryindex.dev/api/mcp.

`setup https://tryindex.dev/setup` is still the line that fetches this file.

Claude Code:

```bash
claude mcp add --transport http --scope user index https://tryindex.dev/api/mcp --header "x-api-key: idx_live_YOUR_KEY"
```

Codex, in `~/.codex/config.toml`:

```toml
[mcp_servers.index]
url = "https://tryindex.dev/api/mcp"
http_headers = { "x-api-key" = "idx_live_YOUR_KEY" }
```

Cursor, merged into `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "index": {
      "url": "https://tryindex.dev/api/mcp",
      "headers": { "x-api-key": "idx_live_YOUR_KEY" }
    }
  }
}
```

Claude, ChatGPT, and Grok, only when Connect is unavailable: add a custom connector named Index at `https://tryindex.dev/api/mcp` and set one header, `x-api-key`, `authorization`, or `x-auth-token`, to the Index key. `Authorization` is `Bearer idx_live_YOUR_KEY`.

When an Index key is used, accepting the terms records the acceptance on the account. Index stores a fingerprint of the account, the terms version, and the time. It stores a hash of the Index key, not the key. Provider keys saved in the dashboard are encrypted. Usage logs record the tool, the company or domain, the provider, contact credits, model cost, status, and latency. Logs do not include API keys, email addresses, or phone numbers.

If the user does not have an Index key, fall back to the bring-your-own headers in the next section.

## Keys stay in the config

This section is the fallback. Ask which provider they use.

- Icypeas: the API key and the API secret, from the Icypeas dashboard. Set `x-icypeas-api-key`, `x-icypeas-api-secret`, and `x-index-provider: icypeas`. The secret signs requests to Icypeas.
- LeadMagic: the API key. Set `x-leadmagic-api-key` and `x-index-provider: leadmagic`.

`x-index-provider` is exactly `icypeas` or `leadmagic`.

Write the key and secret only into the host config below. Never repeat a key or a secret in the chat, in a recap, in a tool argument, or in command output you show the user. If a command prints the saved headers, do not relay that output. Index ignores keys pasted into tool arguments. A bring-your-own key is not stored. When the user accepts the terms, Index stores a fingerprint of that provider key, the terms version, and the time.

In the blocks below, KEY and SECRET are placeholders. Substitute the real values only in the file or command you run.

## One header, when the host only allows a few names

`authorization`, `x-api-key`, and `x-auth-token` can carry the provider in the value. Claude Desktop and claude.ai need this. Claude Code, Codex, and Cursor can use it instead of the separate headers in the examples below.

- Icypeas: `icypeas:KEY:SECRET`
- LeadMagic: `KEY`, or `leadmagic:KEY`

`Authorization` adds a Bearer prefix: `Bearer icypeas:KEY:SECRET` or `Bearer KEY`. `x-api-key` and `x-auth-token` use the value without `Bearer`.

Icypeas signs its own requests as `api-key:hmac`, and that signature is hex, so the API key does not contain a colon. Index splits on the first colon for the provider and the second colon between the key and the secret. The secret is the remainder, so it may contain colons. `x-index-provider`, when the host can send it, overrides the prefix.

## Use the host that is actually running

The model name does not identify the host. Use the client this session is running in. Do not run a Codex command in Claude Code, a Claude Code command in Cursor, or a Cursor file edit for Claude Desktop. If a flag is not written here, do not invent one.

### Claude Code

`claude mcp add --transport http` adds a remote server. `--header` (short form `-H`) repeats, once per header, as `"Name: value"`. Documented at https://code.claude.com/docs/en/mcp .

Default scope is `local` (this project only). `--scope user` stores the server for every project on this machine. Do not use `--scope project`. That writes the key into a file meant to be committed.

Run `claude mcp get index` first. If it already points at `https://tryindex.dev/api/mcp` and has this provider's headers, reuse it. Do not show that command's output.

Icypeas:

```bash
claude mcp add --transport http --scope user index https://tryindex.dev/api/mcp --header "x-icypeas-api-key: KEY" --header "x-icypeas-api-secret: SECRET" --header "x-index-provider: icypeas"
```

LeadMagic:

```bash
claude mcp add --transport http --scope user index https://tryindex.dev/api/mcp --header "x-leadmagic-api-key: KEY" --header "x-index-provider: leadmagic"
```

Header values are stored as written. Do not put `${VAR}` in these headers. On a remote server, Claude Code does not expand credential environment variables inside `headers`.

### Codex

Codex stores MCP servers in `~/.codex/config.toml`. On Windows that file is `%USERPROFILE%\.codex\config.toml`. The CLI, the IDE extension, and the ChatGPT desktop app share it. Documented at https://developers.openai.com/codex/mcp .

`codex mcp add index --url https://tryindex.dev/api/mcp` can register the URL. That command accepts `--url` and `--bearer-token-env-var`. It has no header flag, and it saves `http_headers` as empty. Index does not use a bearer token. Write the headers into `config.toml`. That is the configuration that actually sends them.

Icypeas:

```toml
[mcp_servers.index]
url = "https://tryindex.dev/api/mcp"
http_headers = { "x-icypeas-api-key" = "KEY", "x-icypeas-api-secret" = "SECRET", "x-index-provider" = "icypeas" }
```

LeadMagic:

```toml
[mcp_servers.index]
url = "https://tryindex.dev/api/mcp"
http_headers = { "x-leadmagic-api-key" = "KEY", "x-index-provider" = "leadmagic" }
```

Merge this into the existing file. Leave every other `[mcp_servers.*]` table alone. `http_headers` is the documented map of header name to static value, the same shape as the docs example `http_headers = { "X-Figma-Region" = "us-east-1" }`.

`env_http_headers` is also documented. It maps a header name to an environment variable name, not to the secret itself. Use `http_headers` so the value is written into the config.

Do not show `codex mcp get index` output. It can include header values. There is no `--header` flag on `codex mcp add`. Do not invent one.

### Cursor

Cursor reads `~/.cursor/mcp.json` for every project. On Windows that is `%USERPROFILE%\.cursor\mcp.json`. A remote server uses `url` and `headers`. Documented at https://cursor.com/docs/mcp .

Merge an `index` entry into `mcpServers`. Do not replace the other servers. Prefer this home-directory file. A project `.cursor/mcp.json` can be committed, and the same server name there overrides the global entry.

Icypeas:

```json
{
  "mcpServers": {
    "index": {
      "url": "https://tryindex.dev/api/mcp",
      "headers": {
        "x-icypeas-api-key": "KEY",
        "x-icypeas-api-secret": "SECRET",
        "x-index-provider": "icypeas"
      }
    }
  }
}
```

LeadMagic:

```json
{
  "mcpServers": {
    "index": {
      "url": "https://tryindex.dev/api/mcp",
      "headers": {
        "x-leadmagic-api-key": "KEY",
        "x-index-provider": "leadmagic"
      }
    }
  }
}
```

`${env:NAME}` is valid inside `headers` when the user already keeps the key in the environment. The value still must not be printed. After saving, reload MCP servers or restart Cursor.

Cursor-hosted cloud agents do not read `~/.cursor/mcp.json`. If this session is one of those agents, say so. The server has to be added in that agent's cloud MCP settings. A file written on a laptop does not connect the cloud session.

### Claude, ChatGPT, and Grok

Use Connect. These hosts sign the user in. Do not choose an API-key or no-sign-in option, and do not add a request header, unless Connect is unavailable.

Only then, one header carries the provider in the value. `authorization`, `x-api-key`, and `x-auth-token` work. Icypeas is `icypeas:KEY:SECRET`. LeadMagic is the key alone, or `leadmagic:KEY`. `Authorization` adds `Bearer `. Do not repeat the key in the chat.

## Verify with initialize and tools/list

After the config is saved, let the host reconnect. Then verify with MCP `initialize` and `tools/list` against `https://tryindex.dev/api/mcp`, using the headers you saved. Use the host's own MCP client so it performs that handshake. Do not print the headers.

`tools/list` has to include `find_person`, `find_prospects`, `research_account`, and `request_removal`. During setup, `accept_terms` and `set_profile` also appear until configured.

Do not call `find_person` or `find_prospects` to check the connection. Those look up real people and spend the user's provider credits. Do not call either tool during setup.

In Claude Code or Codex, `/mcp` shows whether the server is connected. A checkmark there is not enough on its own. The prospect tools (`find_person`, `find_prospects`, `research_account`, `request_removal`) still have to be listed.

If this session cannot see a server that was just added, ask the user to reload MCP or open a new session, then run `tools/list` there. A saved file is not a connection. Say Index is connected only after the prospect tools are listed (including `research_account`).

## Guide the user

1. Ask what they sell. A website or a short description is enough for `set_profile`.
2. Show https://tryindex.dev/terms and wait for the user to agree. `set_profile` is rejected until the terms are accepted.
3. Call `set_profile` with the website or description and `accept_terms: true`. That records acceptance and learns the profile together. Calling `accept_terms` with `{ "accept": true }` first, then `set_profile`, is the same acceptance. Index stores a fingerprint of the key, the terms version, and the time. It does not store the profile. Pass the profile `set_profile` returns on later calls.
4. The user can then ask: "Who should I contact at <company> and why now?"

Say, before the first lookup, that lookups spend the user's Icypeas or LeadMagic credits.

`request_removal`, and the form at https://tryindex.dev/opt-out , suppress an email or a LinkedIn profile. Index stores a hash, not the raw value.

## Where this file lives

`setup https://tryindex.dev/setup` is the line to give an agent. This URL returns Markdown to curl and to agents. A browser that sends `Accept: text/html` and is not an agent gets a short human page instead.

The same Markdown is served at https://tryindex.dev/setup.md , https://tryindex.dev/skill , https://tryindex.dev/skill.md , and https://tryindex.dev/SKILL.md .
