Skip to main content

Publish your thunk as an MCP server for AI agents

Publish a thunk's tools as an MCP server so Claude or another AI agent can connect and call them

You can publish a thunk as an MCP server so that an external AI agent — such as Claude, or an assistant you build yourself — can connect to it and call the thunk's tools. This lets another agent reuse the work your thunk already does without knowing how it works or having direct access to the underlying data.

Use this when the caller is an AI assistant. If you instead need to submit structured workflow requests from traditional software or code, use inbound requests via a REST API. For the broader concept of sharing and reusing a thunk's tools, see modular reuse of tools.

Everything below is done by a thunk admin under Admin → Deploy → Export. That screen has three tabs — Enabled/Disabled, Export Interface, and Access — and you work through them in that order.

Turn the export on

Open the Enabled/Disabled tab and switch the export to Enabled. When it is on, the thunk is published as an MCP server that external AI agents can connect to. Turning it off stops publishing without losing your choices, so you can enable it again later and keep the same setup.

Choose what agents see

On the Export Interface tab you control everything an external agent sees when it connects:

  • Name and Description — how your thunk presents itself to the connecting agent. Write these for the agent's benefit, so it can tell when your thunk is the right tool to call.

  • Tools — the checklist of this thunk's tools to publish. Only the tools you check are available to external agents; leave the rest unchecked. Pick the smallest set that lets the caller do its job.

The same tab offers a downloadable interface file that describes exactly this surface — the published name, description, and tools. Share it with whoever is building the calling agent so they know what your thunk offers.

Share how agents connect

The Access tab has what an external agent needs to reach your thunk:

  • MCP Server URL — the address the agent connects to. Copy it and give it to whoever is setting up the calling agent.

  • Authentication — external agents authenticate with OAuth 2.1, or with an API key sent in the X-Api-Key HTTP header.

Create and manage API keys on this tab. Each key is shown only once when you create it, so copy it to a safe place right away; you can return here later to revoke a key. These are the same keys used by the thunk's inbound API channel — if you create a key in one place and don't see it in the other, refresh the page.

Only share the URL and an API key with callers you trust, since together they let an agent call your published tools.

Publish updates after you change the thunk

Publishing takes a snapshot at a version. After you edit the thunk — for example, changing a tool or the workflow — the export keeps serving the previously published version until you update it. The Enabled/Disabled tab shows the current published version and its date, and a warning appears when the thunk has changed since the last publish. Click Update Version to publish your latest changes so connecting agents pick them up.

Did this answer your question?