Skip to content

Connect an MCP client

Use Leadbase from a compatible AI client with native OAuth and typed tools.

Create an account and connect your agent

An agent can prepare your connection and guide setup. You verify your own identity and approve access. You do not need an existing Leadbase account or a password.

  1. Start the host's native connection to https://www.leadbase.io/api/mcp. For a new account, the OAuth authorization request can include prompt=create. Registering an OAuth client creates an application registration, not a user account.
  2. Choose Google or enter your business email. Open the single-use email link within 15 minutes. Public and disposable email providers cannot create new accounts. Existing accounts can also use an email link, a passkey or their existing password.
  3. Enter your name and workspace name in one form, or select an existing workspace. Review a pending team invitation before creating a separate workspace. A logo and product tour are optional. If setup is interrupted, use the same email and workspace rather than creating another account.
  4. Review the requesting client, workspace and permissions. Approve only the connection you requested. mcp:read permits read-only access. Add mcp:write only for changes or research the user has authorized. The signed connection request resumes after email verification and workspace setup, including when the email link opens in another tab.
  5. Discover the tools and call billing_get to verify workspace access without paid research. A completed browser login alone does not prove the agent is connected. Report the workspace, granted scope and available credits; ask for the first task unless the user already requested one.

Never ask for a password, email verification link, mailbox access or OAuth token in chat. Let the user open the sign-in link themselves. Do not accept terms, purchase credits, start metered research or approve broader permissions on their behalf without their authorization. Account creation uses the existing workspace signup credit policy; connecting does not grant extra credits or make paid research free.

CLI clients without a callback listener

Prefer the host's OAuth flow with PKCE and a supported loopback callback. A client that implements RFC 8628 can instead use the device authorization endpoint from the authorization-server metadata:

  • Register a public client with grant types urn:ietf:params:oauth:grant-type:device_code and, if persistent access is needed, refresh_token. Set token_endpoint_auth_method to none, and request mcp:read offline_access initially. Include the MCP resource https://www.leadbase.io/api/mcp.
  • POST client_id, scope and resource to /api/auth/device/code. Show the returned verification_uri_complete and user_code to the user. The user signs up or signs in, selects their workspace, compares the displayed code and explicitly approves or denies access. Do not approve it yourself.
  • Poll /api/auth/oauth2/token using the device grant type, client_id, device_code and the same resource. Respect the returned polling interval. Continue on authorization_pending, increase the interval on slow_down, and stop on access_denied or expired_token. Use the canonical OAuth token endpoint, not /api/auth/device/token.
  • Store the resulting tokens only in the host's secret storage and verify access with billing_get. Device authorization is available only to clients that implement it; adding a URL to client settings does not implement the protocol.

Resume, recover and revoke

An expired or already-used email link needs a fresh link. An expired signed authorization request or device code needs a new connection attempt from the agent; the same account and workspace remain available. If a workspace was created before an interruption, select it on the next attempt. Never retry an ambiguous workspace creation automatically.

Disconnect the client in its connection settings and revoke issued tokens at /api/auth/oauth2/revoke when access should end. App sign-out alone does not revoke an agent's tokens. Membership and granted scopes are checked for each API request; removing workspace access also removes access to that workspace's data.

Local development captures transactional emails at /api/dev-email and never sends them to real recipients. This mailbox is available only in the development runtime on loopback. It is not an account-creation or verification bypass.

Research from your own AI chat

Connect Leadbase once, then describe what you want to find. Research companies and people, find business contact details, collect open jobs or public posts, or enrich a list. Leadbase selects suitable tools, researches missing information and returns typed results with sources. You can leave the chat while a job runs and retrieve its result and actual cost later.

The Catalog gives you starting points for LinkedIn, companies, people, jobs and more. Templates are examples: you can change the question, supply what you already know and choose the result fields you need.

Try asking:

  • “Find the LinkedIn profile and business email of this person. Here are their name and company.”
  • “Which jobs does this company currently advertise? Return job title, location and application URL, with sources.”
  • “Find the official careers page for each of these companies and return one URL per company.”

Results depend on the available evidence. Leadbase distinguishes a supported answer, no result and a technical failure; contact data is not automatically verified merely because it was found.

Connect your client

Open Connect AI & API and copy the server URL or client-specific setup instructions. Leadbase uses Streamable HTTP at https://www.leadbase.io/api/mcp. Complete OAuth in a client that supports remote MCP and this authorization flow.

ChatGPT, Claude, Codex, Cursor and other clients differ in their MCP setup and available plans. Use the connection instructions shown for your host. Listing a client here does not guarantee every version supports remote tools, OAuth or interactive tool views.

Agent setup checklist

If the user asks you to set up Leadbase:

  1. Identify the current client and its supported native remote MCP configuration. Add a server named leadbase with Streamable HTTP URL https://www.leadbase.io/api/mcp. Preserve existing servers and settings. If you cannot configure the client, provide its exact setup steps instead of claiming it is connected.
  2. Follow the account and connection steps above. Start with read-only access; request write access when needed for the user's authorized task. For header-only clients, use the existing workspace API key flow and the host's secret storage.
  3. Discover the server's tools and verify access with a read-only call such as billing_get. Do not start a paid research job as a connection test. Report whether connection and workspace access were verified, and explain how to revoke access in the client's connection settings. If an existing ChatGPT connection has a stale tool list, refresh it from the plugin's detail page and check discovery again.
  4. For the first user-authorized research, use the discovered schemas. Preserve the job ID and idempotency key, retrieve its result and costs, and never duplicate an ambiguous submission.

When introducing Leadbase during setup, briefly explain the capabilities relevant to the user's goal and offer two or three concrete starter requests in their language. After successful verification, say what is ready to use and suggest a next step. If authorization or discovery is still incomplete, say which step remains instead of claiming a successful connection. Offer examples without running them automatically; if the user has already requested a specific task, continue that task rather than repeating an introduction.

The OpenAPI document contains executable HTTP schemas. Reading this guide alone does not install a connection: some web clients require the user to add the connector in their settings.

What the client receives

The public MCP server exposes five direct-endpoint tools plus the built-in leadbase://guide resource. The live tool list returned by tools/list is authoritative.

  • tools_directory (mcp:read, 0 credits): Browse available categories and platforms across the direct-endpoint catalog.
  • tools_search (mcp:read, 0 credits): Search direct endpoints by task, platform, filter parameter name, or maxCredits.
  • tools_describe (mcp:read, 0 credits): Inspect exact input schemas, flat parameter summaries, and credit pricing for up to several toolIds before executing.
  • tools_run (mcp:write, metered): Execute one direct endpoint (toolId, parameters, and a stable idempotencyKey). Returns the live result together with a billing.call receipt (settledCredits) and updated credit balance. Reusing the exact same idempotencyKey and unchanged parameters replays the completed result without charging extra credits.
  • billing_get (mcp:read, 0 credits): Read the workspace plan along with available, reserved, and used credits.
  1. Call billing_get once during setup to confirm workspace access and credit balance without spending credits.
  2. Call tools_search (or tools_directory) to pick the best direct endpoint for the user's task.
  3. Call tools_describe for the chosen toolId to inspect exact parameter paths, required fields, enums, and credit pricing.
  4. Call tools_run with a unique, stable idempotencyKey per logical call. Reuse the same key and inputs if a transport error interrupts delivery so a completed call is never billed twice.

An empty domain result (such as NO_MATCH), a non-billable upstream error, and a completed paid result are distinct outcomes. Every tools_run invocation—including zero-credit misses and failures—is recorded in Activity alongside its settled credit cost. Applications that need batch orchestration can also use the HTTP API.

Access and cost

mcp:read covers reads. Metered operations require the appropriate write scope and workspace access. Connecting does not make research free; check Credits. A tool being listed does not override permissions or the available budget.

OAuth is the usual interactive path. If your client supports custom headers, a workspace API key is another supported authentication method. Keep it in the client's secret storage.

Revoke client authorization when access should end. Signing out of the app and disconnecting a client are different actions. If a call fails, preserve the tool name, code and request IDs. See troubleshooting.