Clay MCP connector
OAuth 2.1/DCRCRM & SalesMarketingAutomationClay is a go-to-market (GTM) platform that unifies data sourcing from 150+ providers, AI-powered research agents, and workflow orchestration for sales and...
Clay MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'claymcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Clay MCP:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'claymcp_get_credits_available',toolInput: { rationale: 'YOUR_RATIONALE' },})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "claymcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Clay MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={"rationale":"YOUR_RATIONALE"},tool_name="claymcp_get_credits_available",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Event track — Track an analytics event with optional properties
- Run subroutine no mapping, subroutine direct, subroutine — Run a custom subroutine on search entities
- Query objects — Query audience accounts, contacts, or deals using natural language
- List subroutines, find and enrich — List available custom functions in the workspace
- Get task context, task, subroutine input options — Retrieve the current state of a task — all entities, enrichment values, and statuses
- Company find and enrich contacts at, find and enrich — Search for contacts at a company by role, title, name, or department
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
claymcp_add_company_data_points#Add data points to companies in an existing search. Supports enriching ALL companies or specific companies via entityIds. Use for tech stack, funding, headcount, competitors, or any custom research question about companies.4 params
Add data points to companies in an existing search. Supports enriching ALL companies or specific companies via entityIds. Use for tech stack, funding, headcount, competitors, or any custom research question about companies.
dataPointsarrayrequiredThe data points to apply to the companyrationalestringrequiredAlways provide a brief explanation of why you are calling this tooltaskIdstringrequiredThe task ID identifying the search to add company data points toentityIdsarrayoptionalOptional. Array of entityIds to enrich. When omitted, enriches all companies.claymcp_add_contact_data_points#Add data points to contacts in an existing search. Supports enriching ALL contacts or specific contacts via entityIds. Use for emails, phone numbers, work history, thought leadership, or any custom research question about contacts.4 params
Add data points to contacts in an existing search. Supports enriching ALL contacts or specific contacts via entityIds. Use for emails, phone numbers, work history, thought leadership, or any custom research question about contacts.
dataPointsarrayrequiredThe data points to apply to the contactsrationalestringrequiredAlways provide a brief explanation of why you are calling this tooltaskIdstringrequiredThe task ID identifying the search to add contact data points toentityIdsarrayoptionalOptional. Array of entityIds to enrich. When omitted, enriches all contacts.claymcp_ask_question_about_accounts#Ask a natural language question about one or more accounts available in Clay Audiences. An AI agent analyzes account data including contacts, opportunities, Gong calls, and emails to answer the question.3 params
Ask a natural language question about one or more accounts available in Clay Audiences. An AI agent analyzes account data including contacts, opportunities, Gong calls, and emails to answer the question.
accountIdsarrayrequiredAccount IDs to analyze (1-10)questionstringrequiredNatural language question about the accountsrationalestringrequiredAlways provide a brief explanation of why you are calling this toolclaymcp_find_and_enrich_company#Find and enrich a single company by domain or LinkedIn URL. Use for prospecting publicly available company info (funding, competitors, tech stack, etc.). Returns a taskId for follow-up enrichment.3 params
Find and enrich a single company by domain or LinkedIn URL. Use for prospecting publicly available company info (funding, competitors, tech stack, etc.). Returns a taskId for follow-up enrichment.
companyIdentifierstringrequiredCompany identifier (domain like "clay.com" or LinkedIn URL like "https://www.linkedin.com/company/grow-with-clay")rationalestringrequiredAlways provide a brief explanation of why you are calling this toolcompanyDataPointsarrayoptionalOptional data points to enrich during search creationclaymcp_find_and_enrich_contacts_at_company#Search for contacts at a company by role, title, name, or department. Supports filtering by job title keywords, locations, tenure, certifications, languages, and more. Returns a taskId for follow-up enrichment.4 params
Search for contacts at a company by role, title, name, or department. Supports filtering by job title keywords, locations, tenure, certifications, languages, and more. Returns a taskId for follow-up enrichment.
companyIdentifierstringrequiredThe company identifier to search for company and contacts. Either a domain (e.g. "clay.com") or a LinkedIn URL (e.g. "https://www.linkedin.com/company/grow-with-clay").rationalestringrequiredAlways provide a brief explanation of why you are calling this toolcontactFiltersobjectoptionalNo description.dataPointsobjectoptionalOptional data points to enrich during search creationclaymcp_find_and_enrich_list_of_contacts#Find and enrich specific named contacts at their companies. Use when you have a list of specific people by name (e.g. "John Smith at OpenAI"). Returns a taskId for follow-up enrichment.3 params
Find and enrich specific named contacts at their companies. Use when you have a list of specific people by name (e.g. "John Smith at OpenAI"). Returns a taskId for follow-up enrichment.
contactIdentifiersarrayrequiredArray of contact identifiers to find and enrich, with their company identifiersrationalestringrequiredAlways provide a brief explanation of why you are calling this tooldataPointsobjectoptionalOptional data points to enrich during search creationclaymcp_get_credits_available#Check if credits are available for the workspace. Returns hasWorkspaceCredits, hasSalesRepCredits, and (when credit budgets are enabled) hasBudgetCredits.1 param
Check if credits are available for the workspace. Returns hasWorkspaceCredits, hasSalesRepCredits, and (when credit budgets are enabled) hasBudgetCredits.
rationalestringrequiredAlways provide a brief explanation of why you are calling this toolclaymcp_get_subroutine_input_options#Fetch the available dropdown options for a subroutine input that has a configured options source.3 params
Fetch the available dropdown options for a subroutine input that has a configured options source.
inputNamestringrequiredThe name of the input whose options to fetch.rationalestringrequiredAlways provide a brief explanation of why you are calling this toolsubroutine_idstringrequiredThe ID of the subroutine.claymcp_get_task#Get task status and results by task ID. Handles all task types (search, direct) and returns the current state. Accepts universal mcp-task-* IDs and legacy cgas-search-id-* IDs.2 params
Get task status and results by task ID. Handles all task types (search, direct) and returns the current state. Accepts universal mcp-task-* IDs and legacy cgas-search-id-* IDs.
rationalestringrequiredAlways provide a brief explanation of why you are calling this tooltaskIdstringrequiredThe task ID to retrieve (mcp-task-* or legacy cgas-search-id-*)claymcp_get_task_context#Retrieve the current state of a task — all entities, enrichment values, and statuses. Call this to get actual enrichment results (emails, phone numbers, work history, custom data points) after a search or enrichment operation.3 params
Retrieve the current state of a task — all entities, enrichment values, and statuses. Call this to get actual enrichment results (emails, phone numbers, work history, custom data points) after a search or enrichment operation.
rationalestringrequiredAlways provide a brief explanation of why you are calling this tooltaskIdstringrequiredThe task ID to retrieve (mcp-task-* or legacy cgas-search-id-*)entityIdsarrayoptionalOptional. Pass specific entity IDs to retrieve only those entities. Leave empty or omit to retrieve all entities for the task.claymcp_list_subroutines#List available custom functions in the workspace. Call this to see their required inputs before using run_subroutine.1 param
List available custom functions in the workspace. Call this to see their required inputs before using run_subroutine.
rationalestringrequiredAlways provide a brief explanation of why you are calling this toolclaymcp_query_objects#Query audience accounts, contacts, or deals using natural language. Translates plain language descriptions into structured filters and returns matching entities with field values from Clay Audiences.6 params
Query audience accounts, contacts, or deals using natural language. Translates plain language descriptions into structured filters and returns matching entities with field values from Clay Audiences.
querystringrequiredNatural language description of what to filter, e.g. "tech companies with 500+ employees"rationalestringrequiredAlways provide a brief explanation of why you are calling this toolaudienceNamestringoptionalName of a saved audience segment to scope results tolimitintegeroptionalMax rows to return (default 50)offsetintegeroptionalPagination offset (default 0)onlyMinebooleanoptionalWhen true, restrict account results to the caller's Salesforce-owned accountsclaymcp_run_subroutine#Execute a custom function on contacts/companies from an existing search. Use when you have a taskId from a previous search and want to run a subroutine on all or specific contacts. Requires fieldMapping to map entity fields to subroutine inputs.5 params
Execute a custom function on contacts/companies from an existing search. Use when you have a taskId from a previous search and want to run a subroutine on all or specific contacts. Requires fieldMapping to map entity fields to subroutine inputs.
rationalestringrequiredAlways provide a brief explanation of why you are calling this toolsubroutine_idstringrequiredThe ID of the subroutine to execute. Get this from list_subroutines.taskIdstringrequiredRequired. The taskId from the existing search task to add results to.entityIdsarrayoptionalOptional. Array of entityIds to run on. When omitted with fieldMapping, runs on all contacts.fieldMappingobjectoptionalRequired for batch mode. Format: { "entityField": "subroutineInput" }. KEY = entity field name, VALUE = subroutine input name.claymcp_run_subroutine_direct#Execute a custom function directly with provided inputs, without needing an existing task or entityIds. Use when the user provides specific input values (LinkedIn URL, name, email, etc.) and wants to run a function on that data directly.3 params
Execute a custom function directly with provided inputs, without needing an existing task or entityIds. Use when the user provides specific input values (LinkedIn URL, name, email, etc.) and wants to run a function on that data directly.
inputsobjectrequiredThe actual input values for the subroutine. Keys must match the input names from list_subroutines.rationalestringrequiredAlways provide a brief explanation of why you are calling this toolsubroutine_idstringrequiredThe ID of the subroutine to execute. Get this from list_subroutines.claymcp_run_subroutine_no_mapping#Run a custom subroutine on search entities. The backend automatically generates the field mapping. Requires a subroutine_id and taskId from an existing search.5 params
Run a custom subroutine on search entities. The backend automatically generates the field mapping. Requires a subroutine_id and taskId from an existing search.
rationalestringrequiredAlways provide a brief explanation of why you are calling this toolsubroutine_idstringrequiredThe ID of the subroutine to execute.taskIdstringrequiredThe taskId from the existing search.entityIdsarrayoptionalOptional. Array of entityIds to run on. When omitted, runs on all entities.inputsobjectoptionalOptional. Explicit values for inputs the user selected (e.g. dropdown pickers), keyed by input name.claymcp_track_event#Track an analytics event with optional properties.3 params
Track an analytics event with optional properties.
eventNamestringrequiredThe name of the event to trackrationalestringrequiredAlways provide a brief explanation of why you are calling this toolpropertiesobjectoptionalAdditional properties to include with the event