Skip to main content
All connectors
qbash Connectors / Clay

Clay MCP serverand Python AI tasks

qbash hosts a Clay MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse. Developers use qbash Tasks to write cloud-hosted Python functions that pair Clay with models such as Claude and GPT.

Add the qbash MCP

Use Clay from Claude Code, Codex, Cursor and other MCP clients. Connect Clay in qbash, and your agent can work with its data and build Tasks that call it.

claude mcp add --transport http qbash https://mcp.qbash.com/mcp

Then run /mcp in Claude Code and sign in with qbash.

  • Read the selected key's user and workspace
  • Read the workspace's remaining credits
  • Read Clay's current search grammar and fields
  • Create a people or company search iterator
  • Fetch the next page from a search iterator
  • Start an enrichment routine for identified inputs
Read the docs

Write a Clay task in Python

A qbash Task is a Python function hosted in the cloud. Python is the runtime and defines the process, and built-in inline prompts run on leading models such as Claude, GPT, Gemini and Grok.

Run a Task on a schedule, from an HTTP request or when a connected app sends an event. Your agents and chat tools call it over MCP.

Each run is logged with its inputs and results, and you can turn data logging off for any Task. Every Task has version control, and each run is locked to the version it ran.

Review a completed enrichment run

Read one page of routine results and ask a saved prompt to report successful enrichments and failed items.

main.py
results = qbash.integrations.clay.get_routine_results(routine_run_id="run_example", limit=20)
if results.get("data"):
review = qbash.ai.run_prompt(slug="clay-enrichment-review", variables={"results": results})
qbash.output(review)
else:
qbash.output("No completed items in this response.")
Sample get_routine_results response
{
"routine_run_id": "run_example",
"status": "complete",
"total": 1,
"finished": 1,
"data": [
{
"id": "row-1",
"status": "complete",
"result": {
"company_name": "Example Company"
}
}
]
}

Custom MCP server

Build a custom MCP server with Clay

Create a hosted MCP server that combines Clay tools with your other connectors, Tasks and memory folders. You choose each tool it exposes, so a server can share Clay reads with write tools left off.

Share the server with your team, and each person adds it to the client they already use.

How to set it up

  1. Connect Clay on the qbash Connectors page.
  2. Create an MCP server and add the Clay tools you want to share.
  3. Paste the server URL into your client. It connects with OAuth or an access token.

Clay MCP questions

Does this use Clay’s official MCP server?

qbash calls Clay’s native Public API with your selected API key. Clay’s hosted MCP server uses a separate OAuth connection.

Can runs consume credits?

Yes. Searches and routine starts can consume Actions and Data Credits. Check your Clay plan and balance before running them.

Build a Clay task

Write it in Python with AI steps, or describe it to your coding agent through the qbash MCP.