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.
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.
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
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.
Setup
Setting up takes about 2 minutes. You need a Clay account.
- 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. - Paste it into
CLAY_API_KEY. It is sent in theclay-api-keyheader. - For custom functions, open the function in Clay, then Details, and enable API access; copy its
t_...id. - Install the connector and run
clay_get_me: it returns your user and workspace and confirms the key.clay_get_credit_balanceshows the credits left; reading balances costs no credits.
Searching the people and company database:
clay_get_search_query_referenceonce per session gives the queryable people and company fields, operators and grammar.clay_create_searchstarts a search with a query that begins withselect from peopleorselect from companies, for exampleselect from companies where people.exists(is_current = true and job_title is_similar_to ("VP Sales")), and returns asearch_id. Count queries and job searches are not supported.clay_get_search_resultswith that id is a stateful iterator: each call returns the next page, and the AI calls again whilehas_moreis 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:
clay_run_routineruns 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"}}. Theid(at most 64 characters) is yours and comes back with the result. Awebhook_idcan 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.clay_get_run_resultswith theroutine_run_id: HTTP 202 andstatus: in_progresswhile it runs, then 200 withstatus: completeanddata. Results are matched to inputs byid, not by order; a complete run can contain failed items, andfinishedincludes failures. The AI polls every few seconds, not in a tight loop.clay_get_batch_run_resultsfollows a batch run started from the Clay CLI or API; a finished batch returnsresult_urlfor 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.
Prerequisites: CLAY_API_KEY
Install the connector locally
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
Open http://localhost:3000/connectors/store, pick Clay and paste in the env vars listed under Prerequisites.
Available tools
| Tool | What it does |
|---|---|
clay_get_me | Get the Clay user and workspace the API key belongs to |
clay_get_credit_balance | Get the current credit balances of the workspace |
clay_get_search_query_reference | Get the reference of the Clay search query language (markdown): the queryable people and company fields, operators and grammar |
clay_create_search | Start 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_results | Fetch the next page of records of a search |
clay_query_tables | Read rows of known Clay tables (Enterprise plans) with selected fields, filters, ordering, grouping and joins |
clay_run_routine | Run 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_results | Get the progress and results of a routine run |
clay_get_batch_run_results | Get 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_reference | Get the reference of the workflow-run query language (markdown): queryable run fields, node predicates, content search and grammar |
clay_query_workflow_runs | Search 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_status | Check a privacy deletion job from clay_privacy_delete_people, including its cascading cleanup |
clay_privacy_delete_people | Delete 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?"
Next steps
Was this guide helpful?