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

# MCP server

> Connect Bridgly to Claude, Cursor, Codex, and any Model Context Protocol client.

The Bridgly MCP server exposes every LinkedIn, X (Twitter), and Reddit endpoint
as a [Model Context Protocol](https://modelcontextprotocol.io) tool, so an AI
client can pull structured social data on its own. It also exposes a
`billing_get_info` tool so the model can read your remaining credit balance.

The server speaks **Streamable HTTP** — the standard transport for remote MCP
servers — over a single endpoint:

```
https://mcp.bridgly.app/mcp
```

You authenticate with your Bridgly API key (`bgly_…`) as a bearer token, exactly
like the REST API. Every tool call deducts credits from the account the key
belongs to.

<Note>
  Need a key? Create one on the **API Keys** page of your
  [dashboard](https://bridgly.app/dashboard). Keep it server-side — anyone with
  the key can spend your credits.
</Note>

## Connect your client

<Tabs>
  <Tab title="Claude Code">
    Add the server from the CLI:

    ```bash theme={"dark"}
    claude mcp add --transport http bridgly https://mcp.bridgly.app/mcp \
      --header "Authorization: Bearer bgly_YOUR_KEY"
    ```

    Then start a session and ask it to pull a profile — the Bridgly tools appear
    automatically.
  </Tab>

  <Tab title="Cursor">
    Add the server to your `mcp.json` (Cursor Settings → MCP → Add):

    ```json theme={"dark"}
    {
      "mcpServers": {
        "bridgly": {
          "url": "https://mcp.bridgly.app/mcp",
          "headers": { "Authorization": "Bearer bgly_YOUR_KEY" }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Desktop">
    Open **Settings → Developer → Edit Config** and add the server:

    ```json theme={"dark"}
    {
      "mcpServers": {
        "bridgly": {
          "url": "https://mcp.bridgly.app/mcp",
          "headers": { "Authorization": "Bearer bgly_YOUR_KEY" }
        }
      }
    }
    ```

    Restart Claude Desktop and the Bridgly tools show up in the tools menu.
  </Tab>

  <Tab title="Codex">
    Add the server to `~/.codex/config.toml`:

    ```toml theme={"dark"}
    [mcp_servers.bridgly]
    url = "https://mcp.bridgly.app/mcp"
    http_headers = { Authorization = "Bearer bgly_YOUR_KEY" }
    ```
  </Tab>
</Tabs>

## Available tools

Tools mirror the API's endpoints one-to-one, named after their path — `/x/get-user`
becomes `x_get_user`, `/linkedin/search/jobs` becomes `linkedin_search_jobs`, and
so on. Each tool's input schema is the endpoint's request schema, so your client
autocompletes every field with its description.

<CardGroup cols={3}>
  <Card title="X (Twitter)" icon="x-twitter">
    `x_get_tweet_detail`, `x_search`, `x_search_users`, `x_get_user`,
    `x_get_user_tweets`, `x_get_followers`, and more.
  </Card>

  <Card title="Reddit" icon="reddit">
    `reddit_get_post`, `reddit_get_subreddit`, `reddit_get_user`,
    `reddit_list_subreddit_posts`, `reddit_search_*`, and more.
  </Card>

  <Card title="LinkedIn" icon="linkedin">
    `linkedin_get_profile_from_url`, `linkedin_get_job`,
    `linkedin_search_people`, `linkedin_search_jobs`, and more.
  </Card>
</CardGroup>

Plus one account tool:

* **`billing_get_info`** — the account's current spendable credit balance and
  billing settings. No input required.

<Tip>
  Browse the full request and response shape for every tool in the [API
  Reference](/api-reference) — each MCP tool takes the same input as its
  matching endpoint.
</Tip>

## How results come back

Each call returns the API response as-is — the `{ timeMs, creditsCost, data }`
envelope for scrapes, the billing snapshot for `billing_get_info` — as JSON text
the model can read directly.

If a call fails, the tool returns the error message (for example, an invalid key
or an out-of-credits response) so the model can react instead of silently
retrying.

## Security notes

<CardGroup cols={2}>
  <Card title="Stateless by design" icon="shield-halved">
    Each request is handled in isolation and bound only to the key you send. No
    session state is shared between callers.
  </Card>

  <Card title="Your key, your credits" icon="key">
    Calls are billed to the account the key belongs to. Rotate or revoke a key
    anytime from the dashboard without affecting your other integrations.
  </Card>
</CardGroup>
