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

# MCP Server

> Connect the OpenFunnel Primitives MCP to Claude, Cursor, or any MCP client and call the agent primitives as tools.

<Info>
  Endpoint: `https://agents.openfunnel.dev/mcp` — a remote MCP server that exposes the [Agent Primitives](/agent-primitives/introduction) as tools. Authentication is handled automatically over OAuth; no API key to copy.
</Info>

The **OpenFunnel Primitives MCP** is a hosted [Model Context Protocol](https://modelcontextprotocol.io) server. Point any MCP client at it and your agent can call OpenFunnel's primitives directly — lookalike search, technography search, deep research, and the supporting helpers — scoped to your account.

It's the same building blocks as the [Agent Primitives API](/agent-primitives/introduction), wrapped as MCP tools so you don't have to write any HTTP glue.

## Authentication

The server is a standard OAuth 2.1 resource server, so connecting is a one-time browser sign-in — the client discovers the flow, you approve access, and it stores the token. There is no `X-API-Key` header to manage; the server resolves your OpenFunnel key from your account after you consent.

<Steps>
  <Step title="Add the server">
    Add `https://agents.openfunnel.dev/mcp` as a remote/HTTP MCP server in your client (see below).
  </Step>

  <Step title="Sign in">
    The client opens a browser window. Sign in with your OpenFunnel account and approve the connection on the consent screen.
  </Step>

  <Step title="Call tools">
    Your agent can now call the tools listed below. Tokens refresh automatically.
  </Step>
</Steps>

## Connect a client

<Tabs>
  <Tab title="Claude">
    In Claude (Settings → Connectors → Add custom connector), add a remote MCP server with URL:

    ```
    https://agents.openfunnel.dev/mcp
    ```

    Claude will walk you through the OAuth sign-in the first time you use it.
  </Tab>

  <Tab title="Cursor">
    Add the server to your MCP config (`~/.cursor/mcp.json`):

    ```json theme={"dark"}
    {
      "mcpServers": {
        "openfunnel": {
          "url": "https://agents.openfunnel.dev/mcp"
        }
      }
    }
    ```

    Reload, then authenticate when prompted.
  </Tab>
</Tabs>

## Available tools

Each tool maps to an Agent Primitive or helper — follow the links for full parameter and response details.

| Tool                             | Description                                                                                                                              |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `search-lookalikes`              | Find companies similar to seed domains and/or a description. See [Lookalike search](/agent-primitives/search-lookalikes).                |
| `search-companies-by-tech-stack` | Find companies using a technology, inferred from job posts. See [Technography search](/agent-primitives/search-companies-by-tech-stack). |
| `deep-research`                  | Answer a natural-language question about a single company. See [Deep research](/agent-primitives/deep-research).                         |
| `lookup-companies`               | Resolve up to 100 companies by name, domain, or LinkedIn URL. See [Lookup companies](/helpers/lookup-companies).                         |
| `list-country-codes`             | ISO alpha-3 country codes accepted by search filters. See [Country codes](/helpers/list-country-codes).                                  |
| `list-firmographic-options`      | Valid firmographic filter values. See [Firmographic options](/helpers/list-firmographic-options).                                        |
| `get-credit-balance`             | Your remaining credit balance. See [Credits](/agent-primitives/credits).                                                                 |
| `get-user-info`                  | The authenticated account's identity.                                                                                                    |

## Credits

Tool calls consume credits exactly like the underlying API. See [Credits](/agent-primitives/credits) for per-primitive costs.
