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.
7-day free trial · No credit card · EU-hosted
Ask Clay anything
Try a real prompt against Clay via AnythingMCP — Claude calls the tools, returns the answer. Press Enter on your own message to install on Cloud.
Install Clay on CloudClaude is AI and can make mistakes. Please double-check responses.
Setup in 2 minutes
- 1Start a free trial on cloud.anythingmcp.com.
- 2Click Clay in the connector store. Paste credentials when prompted.
- 3Mint an MCP API key and point your AI client at the generated MCP URL.
Guides for Clay
Step-by-step setup for the most popular AI clients.
Setting up Clay
From the connector definition itself: where to find the credentials, what they need to be allowed to do, and which API this adapter talks to.
Clay
This connector uses the Clay Public API (https://api.clay.com/public/v0): searches of Clay's people and company database, runs of Clay functions (enrichment and research), queries of Clay tables, Workflow run search, credit balance and privacy deletion.
What it cannot do: the Public API has no endpoints to list tables or functions, create tables or write rows. Rows are still written to tables through a table's inbound webhook, and function and table ids are copied from the Clay app.
Setup
- 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, Details, and enable API access; copy its
t_...id.
Check the key: clay_get_me returns the user and workspace; clay_get_credit_balance shows the credits left.
Search the GTM database
clay_get_search_query_referenceonce per session to learn the fields and grammar.clay_create_searchwith a query such asselect from companies where people.exists(is_current = true and job_title is_similar_to ("VP Sales")); keep thesearch_id.clay_get_search_resultswith that id; it is a stateful iterator: each call returns the next page, call again whilehas_moreis true. Search results count against the plan's result limits (free: 50 per search and 100 per 30 days; paid: 500 per request). Over a limit Clay answers 402 naming the limit.
Enrich with a function
clay_run_routinewith the routine id (function:t_...) and up to 100 items{"id": "...", "inputs": {...}}. It spends credits.clay_get_run_resultswith theroutine_run_id: HTTP 202 andstatus: in_progresswhile running, then 200 withstatus: completeanddata. Match results to inputs byid, not by order; a complete run can contain failed items.totalandfinishedcount the whole run,finishedincludes failures. Poll every few seconds, not in a tight loop.clay_get_batch_run_resultsreads batch runs started from the Clay CLI; a finished batch returnsresult_url.
Tables (Enterprise): clay_query_tables with the table id from the table's URL (.../tables/t_...). Cells come back with a status: success (with value), empty, error (with error), or a pending state (running, queued, retry, rate_limited, awaiting_callback). Pass cursor back to page; a scan can return a row twice when it changes mid-scan, so deduplicate by id.
Workflows (beta): clay_get_runs_query_reference, then clay_query_workflow_runs to find runs and their status.
Privacy: clay_privacy_delete_people (installed switched off) deletes people from Audiences; try dry_run: true first, then follow the job with clay_get_privacy_deletion_status.
Paging: collections return data and a cursor while more pages exist; search iterators return data and has_more.
Errors: errors carry a message. 401/403: wrong key or no access; 402: search result limit reached; 404: unknown id, or a function without API access; 409/422: invalid request state or input; 429: workspace rate limit, wait for Retry-After seconds.
Your AI is two clicks away from Clay.
Install the connector, paste your credentials, ask your AI a question. 7-day free trial, no credit card.