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

# Setup

> Connect LeadMagic MCP with OAuth in Cursor, Claude, ChatGPT, VS Code, and other MCP clients

Connect LeadMagic MCP by adding the hosted server URL to your AI client. OAuth-capable clients will open a LeadMagic sign-in flow and store the resulting token for future tool calls.

<Note>
  The hosted MCP server runs at `https://mcp.leadmagic.io/mcp` using Streamable HTTP. Do not paste OAuth client secrets into config files, source code, docs, or chats.
</Note>

## Server URLs

| Use case                    | URL                                                             |
| --------------------------- | --------------------------------------------------------------- |
| Most MCP clients            | `https://mcp.leadmagic.io/mcp`                                  |
| Claude remote connector     | `https://mcp.leadmagic.io`                                      |
| Server catalog              | `https://mcp.leadmagic.io/`                                     |
| Protected resource metadata | `https://mcp.leadmagic.io/.well-known/oauth-protected-resource` |

## Setup flow

<Steps>
  <Step title="Add the server URL">
    In your AI client, add `https://mcp.leadmagic.io/mcp` as a remote MCP server. For Claude remote connectors, use `https://mcp.leadmagic.io`.
  </Step>

  <Step title="Complete OAuth sign-in">
    When your client prompts you, sign in with LeadMagic and approve the connection.
  </Step>

  <Step title="Test the connection">
    Ask your AI assistant to check your LeadMagic credits. The `check_credit_balance` tool is free.
  </Step>
</Steps>

## Client notes

<AccordionGroup>
  <Accordion title="Cursor" icon="code">
    Add a remote MCP server using `https://mcp.leadmagic.io/mcp`. If Cursor opens a browser sign-in flow, complete the OAuth authorization and restart Cursor if needed.
  </Accordion>

  <Accordion title="Claude" icon="message">
    For Claude remote connectors, use the origin URL `https://mcp.leadmagic.io`. The MCP worker also accepts `POST /mcp` for clients that require a path-scoped endpoint.
  </Accordion>

  <Accordion title="ChatGPT" icon="comment">
    ChatGPT-compatible MCP setup should use OAuth. Add the remote server URL and complete the LeadMagic sign-in flow when prompted.
  </Accordion>

  <Accordion title="VS Code and Copilot" icon="window">
    Use the remote HTTP MCP server URL `https://mcp.leadmagic.io/mcp` when your client supports OAuth for remote MCP servers.
  </Accordion>

  <Accordion title="Other MCP clients" icon="plug">
    Use `https://mcp.leadmagic.io/mcp` with Streamable HTTP. If your client does not support OAuth for remote MCP servers, use a supported client or the REST API.
  </Accordion>
</AccordionGroup>

## Verify the connection

After setup, ask:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Check my LeadMagic credit balance
```

If the server is connected, your assistant will call `check_credit_balance` and return your current balance.

## Next steps

<CardGroup cols={2}>
  <Card title="Tool reference" icon="wrench" href="/docs/mcp/tools">
    See all MCP tools with parameters and example prompts.
  </Card>

  <Card title="Authentication" icon="key" href="/docs/mcp/authentication">
    Learn how OAuth works for LeadMagic MCP.
  </Card>
</CardGroup>
