Connector guide7-minute read13 MCP tools7 languages

How to Connect Clay to ChatGPT via MCP

Clay GTM data from any AI agent: search Clay's people and company database, run Clay-managed and custom enrichment functions on up to 100 items, query Clay tables on Enterprise plans, search Workflow runs and check the credit balance. Works with a personal Clay API key; privacy deletion installs switched off.

HCBy HelpCode teamUpdated 7 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Clay

Clay

Clay GTM data from any AI agent: search Clay's people and company database, run Clay enrichment and custom functions, query Clay tables, search Workflow runs and check credits. Clay Public API with a personal API key.

tools

13

Region

INTL

Category

Data Enrichment

Authentication

API Key

Required env vars

CLAY_API_KEY
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Clay in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Clay GTM data from any AI agent: search Clay's people and company database, run Clay-managed and custom enrichment functions on up to 100 items, query Clay tables on Enterprise plans, search Workflow runs and check the credit balance. Works with a personal Clay API key; privacy deletion installs switched off.

Try asking

Example prompts for Clay

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Clay · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Clay, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Clay + ChatGPT

Clay GTM data from any AI agent: search Clay's people and company database, run Clay-managed and custom enrichment functions on up to 100 items, query Clay tables on Enterprise plans, search Workflow runs and check the credit balance. Works with a personal Clay API key; privacy deletion installs switched off.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

CLAY_API_KEY

Step 1 — Get credentials

Setting up takes about 2 minutes. You need a Clay account.

  1. In Clay open API and CLI, tab API keys (https://app.clay.com/workspaces/~/api-and-cli?tab=api-keys), and create a key. The key acts as your user, with your workspace access.
  2. Paste it into CLAY_API_KEY. It is sent in the clay-api-key header.
  3. For custom functions, open the function in Clay, then Details, and enable API access; copy its t_... id.
  4. Install the connector and run clay_get_me: it returns your user and workspace and confirms the key. clay_get_credit_balance shows the credits left; reading balances costs no credits.

Searching the people and company database:

  1. clay_get_search_query_reference once per session gives the queryable people and company fields, operators and grammar.
  2. clay_create_search starts a search with a query that begins with select from people or select from companies, for example select from companies where people.exists(is_current = true and job_title is_similar_to ("VP Sales")), and returns a search_id. Count queries and job searches are not supported.
  3. clay_get_search_results with that id is a stateful iterator: each call returns the next page, and the AI calls again while has_more is true. People come with name, location and matched experiences; companies with domain, industry, size, revenue and LinkedIn URL.

Search results count against the result limits of your plan: on free, 50 per search and 100 per 30 days; on paid plans, 500 per request. Over a limit Clay answers 402 naming the limit.

Enriching with a function:

  1. clay_run_routine runs a Clay-managed function, or a custom one with API access, on 1 to 100 items: the routine id (function:t_...) and items like {"id": "row-1", "inputs": {"domain": "clay.com"}}. The id (at most 64 characters) is yours and comes back with the result. A webhook_id can notify a registered Clay webhook when the run ends. Runs spend Clay credits, so the AI tells you which function and how many items before it starts one.
  2. clay_get_run_results with the routine_run_id: HTTP 202 and status: in_progress while it runs, then 200 with status: complete and data. Results are matched to inputs by id, not by order; a complete run can contain failed items, and finished includes failures. The AI polls every few seconds, not in a tight loop.
  3. clay_get_batch_run_results follows a batch run started from the Clay CLI or API; a finished batch returns result_url for its results file.

Tables (Enterprise plans): clay_query_tables reads rows of known tables with selected fields, filters, ordering, grouping and joins; the table id is in the table URL (.../tables/t_...). Each cell comes back with a status: success (with value), empty, error (with error), or a pending state (running, queued, retry, rate_limited, awaiting_callback). A scan can return a row twice when it changes mid-scan, so the AI deduplicates by id.

Workflows (beta): clay_get_runs_query_reference gives the run query grammar, then clay_query_workflow_runs finds runs (a select query returns them newest first, a count query returns the number). Queries are at most 2000 characters; data can lag a few seconds.

Switched off at install: clay_privacy_delete_people deletes people from Clay Audiences for a privacy request such as a GDPR erasure, matched by email, LinkedIn slug (the part after /in/, not the URL) or phone, 1 to 100 identifiers per call. It cannot be undone, so a workspace admin turns it on when needed; then run it with dry_run: true first to count the matches, and follow the job with clay_get_privacy_deletion_status, which stays available up to five days after the job ends.

Paging: collections return data and a cursor while more pages exist; the AI passes the cursor back. Table queries return 50 rows per page by default (at most 100), run results 20 (at most 100), search pages 20 (at most 500 on paid plans, 50 on free and trial).

Common errors: errors carry a message. 401 or 403 means a wrong key or no access, 402 a search result limit reached, 404 an unknown id or a function without API access, 409 or 422 an invalid request state or input. 429 is the workspace rate limit: wait for the seconds in Retry-After.

What it does not do: the Clay Public API has no endpoints to list tables or functions, create tables or write rows. Rows still reach a table through its inbound webhook, and function and table ids are copied from the Clay app.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in ChatGPT

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

ChatGPT adds MCP servers as plugins on its Plugins page, on the web and on paid plans. Developer mode is no longer needed. In a Business workspace only admins and owners can add one; in Enterprise and Edu an admin can grant the Create plugins with MCPs permission.

  1. Go to chatgpt.com/plugins, click +, then Add custom MCP server.
  2. Enter a name, e.g. Name: Clay.
  3. Under Connection, enter the Server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID and keep Authentication on OAuth.
  4. Select I understand and want to continue, then Create as a plugin. When ChatGPT asks, sign in to AnythingMCP and allow access.
  5. Install the new plugin from your personal plugins, then type @ in a chat and pick it.

Available tools

ToolWhat it does
clay_get_meGet the Clay user and workspace the API key belongs to
clay_get_credit_balanceGet the current credit balances of the workspace
clay_get_search_query_referenceGet the reference of the Clay search query language (markdown): the queryable people and company fields, operators and grammar
clay_create_searchStart a search of Clay's people or company database with a Clay search query, e.g. select from people where experiences.any(is_current =…
clay_get_search_resultsFetch the next page of records of a search
clay_query_tablesRead rows of known Clay tables (Enterprise plans) with selected fields, filters, ordering, grouping and joins
clay_run_routineRun a Clay function (Clay-managed or a custom function with API access enabled) on 1 to 100 input items, for example to find work emails or…
clay_get_run_resultsGet the progress and results of a routine run
clay_get_batch_run_resultsGet the progress of a batch routine run started from the Clay CLI or API, and when complete the download URL of its results file
clay_get_runs_query_referenceGet the reference of the workflow-run query language (markdown): queryable run fields, node predicates, content search and grammar
clay_query_workflow_runsSearch Clay Workflow runs with a run query: a select query returns matching runs newest first with a cursor, a count query returns the…
clay_get_privacy_deletion_statusCheck a privacy deletion job from clay_privacy_delete_people, including its cascading cleanup
clay_privacy_delete_peopleDelete people from Clay Audiences for a privacy request (for example a GDPR erasure), matched by email, LinkedIn slug or phone

Example prompts

  • "How many Clay credits do we have left?"
  • "Find VPs of Sales at software companies in Germany with 50 to 200 employees and show me the first 20."
  • "Run our company enrichment function function:t_abc123 on these five domains and show me the results when the run is complete."
  • "From table t_0te9i4tZEHwc9hihBXu, show the companies with a domain filled in, sorted by domain."
  • "Which of our Clay Workflow runs failed in the last 24 hours?"

FAQ

Does the free ChatGPT plan work with custom MCP servers? OpenAI documents custom MCP servers for paid plans only; the Free plan is not on its list.

Next steps

Was this guide helpful?

Your Clay agent is one click away.

Install the connector, paste the key, prompt ChatGPT. Free for 7 days, no credit card.

Related guides

Connectors

Clay to MCP: People and Company Search, Enrichment Functions, Table Queries and Credits in any AI Agent

Clay GTM data from any AI agent: search Clay's people and company database, run Clay-managed and custom enrichment functions on up to 100 items, query Clay tables on Enterprise plans, search Workflow runs and check the credit balance. Works with a personal Clay API key; privacy deletion installs switched off.

Connectors

How to Connect Clay to Claude via MCP

Clay GTM data from any AI agent: search Clay's people and company database, run Clay-managed and custom enrichment functions on up to 100 items, query Clay tables on Enterprise plans, search Workflow runs and check the credit balance. Works with a personal Clay API key; privacy deletion installs switched off.

Connectors

How to Connect Clay to Cursor via MCP

Clay GTM data from any AI agent: search Clay's people and company database, run Clay-managed and custom enrichment functions on up to 100 items, query Clay tables on Enterprise plans, search Workflow runs and check the credit balance. Works with a personal Clay API key; privacy deletion installs switched off.

Connectors

How to Connect Clay to Gemini via MCP

Clay GTM data from any AI agent: search Clay's people and company database, run Clay-managed and custom enrichment functions on up to 100 items, query Clay tables on Enterprise plans, search Workflow runs and check the credit balance. Works with a personal Clay API key; privacy deletion installs switched off.

Connectors

How to Connect Clay to Meta Muse via MCP

Clay GTM data from any AI agent: search Clay's people and company database, run Clay-managed and custom enrichment functions on up to 100 items, query Clay tables on Enterprise plans, search Workflow runs and check the credit balance. Works with a personal Clay API key; privacy deletion installs switched off.

Connectors

How to Connect Clay to Microsoft Copilot via MCP

Clay GTM data from any AI agent: search Clay's people and company database, run Clay-managed and custom enrichment functions on up to 100 items, query Clay tables on Enterprise plans, search Workflow runs and check the credit balance. Works with a personal Clay API key; privacy deletion installs switched off.