Skip to main content
Guild exposes its operations as MCP (Model Context Protocol) tools, so an MCP client such as Claude, Claude Code, Cursor, or VS Code can read and act on your agents, workspaces, sessions, and triggers. You can connect in two ways:

Hosted server

The hosted server speaks streamable HTTP at https://api.guild.ai/mcp. Your client needs only the URL: it discovers the OAuth settings from the server and registers itself.

Add the server

Add Guild as a custom connector. It works in Claude Desktop and on claude.ai, since both use your Claude account.On a Free, Pro, or Max plan:
  1. Go to Customize > Connectors and click Add custom connector.
  2. Enter https://api.guild.ai/mcp as the server URL.
  3. If Claude asks how to identify itself, choose Register automatically.
  4. Click Add, then click Connect next to Guild.
On a Team or Enterprise plan, an Owner adds the connector once for the organization under Organization settings > Connectors: select Add, then Custom, and enter https://api.guild.ai/mcp. Each member then clicks Connect next to Guild under Customize > Connectors.To use Guild in a chat, click +, select Connectors, and turn Guild on.

Approve access

The first time your client connects, it opens Guild in your browser:
  1. Sign in to Guild if you aren’t already.
  2. Review the page that reads wants access to your Guild account. It lists the permissions requested and where Guild sends you back.
  3. Click Allow.
Your client then connects and lists the Guild tools. It acts as you, limited to the permissions you approved.
Guild has not verified most MCP clients, so the consent page shows Guild has not verified this application. Only continue if you started the connection from a client you trust.
To remove a client’s access, open Security in your personal account and click Disconnect next to it under Connected apps. It loses access right away.

Permissions

The server asks for the scopes its tools use: The tools the server offers change as Guild adds them. Your client lists the current set when it connects.

What the tools do

Tools run as you, so they can reach only what your account and the approved scopes allow. Tools that only read are marked read-only, and tools that change or remove something are marked so your client can ask you before it runs them. For example, you can ask your client to “create an agent that summarizes new GitHub issues, install it in my workspace, and schedule it every morning.” Use guild_get_integration_tool to read a tool’s contract before configuring your agent. Pass an integration ID or full name and a tool name from guild_list_integration_tools. It requires integrations:read. It returns the configured-agent input schema and published output schema when available. Schemas can be null, including for legacy tools.

Follow long-running work

Start an operation once, then use a wait tool to follow it and retrieve its result. You do not need to ask the model to repeatedly list jobs or read session events. For a session, pass the session ID, the guild_send_session_message response’s id as user_event_id, and its wait_after_event_id unchanged as after_event_id. The result describes the root task’s state after that event watermark; it does not prove that a particular message was consumed (message_consumed is unconfirmed).

Native Tasks

When Guild has enabled native Tasks for you and your client advertises the io.modelcontextprotocol/tasks extension on MCP 2026-07-28 requests, a pending wait returns a durable task handle immediately. An already-available result returns directly. Support depends on the client’s version and configuration, not just its name. Your MCP client follows the handle with short tasks/get requests and retrieves the final tool result. These are protocol-level status checks, not repeated tool calls chosen by the model. Guild does not provide pushed task subscriptions on this path. Keep the task’s taskId to recover it after a reconnect. Cancelling it with tasks/cancel stops observation only; the underlying agent, job, or session keeps running. Native observations have no automatic expiry. An explicit timeout_seconds ends the wait without stopping the operation. A completed wait does not always mean the operation succeeded. Inspect the returned status and wait_complete. For ACTION_REQUIRED, show the requested input or connection to the user and stop waiting until it is resolved. tasks/update does not answer a Guild session’s prompt or connect a missing credential.

Streamed waits and recovery

When native Tasks is unavailable or not enabled for you, the same tools wait within a bounded HTTP request. Clients accepting SSE receive progress notifications when they supply a progress token, followed by the final result. Client and proxy timeouts still apply. If the connection drops or the wait window expires while work is still running, call the same wait tool again with the same IDs and receipt. Do not repeat the operation that started the work. An expired wait returns wait_complete: false and leaves the operation running. For integration calls through a profile, use the gateway’s wait_for_tool.

Compact results

To reduce repeated entity metadata in tool results, send the X-Guild-MCP-Result-Format: compact header on your requests to https://api.guild.ai/mcp. Compact results are opt-in. Without the header, tools return their full results. Along with the execution tools that already support compact results, these tools return compact results when you send the header:
  • guild_search_integrations
  • guild_list_agents
  • guild_list_my_workspaces
  • guild_start_profile_agent_test_session

How the OAuth flow works

You don’t need this to connect a standard MCP client. It is here for anyone building their own.
  1. Discover. An unauthenticated request to https://api.guild.ai/mcp returns 401 with a WWW-Authenticate header that points to the protected resource metadata at https://api.guild.ai/.well-known/oauth-protected-resource/mcp. That document names the authorization server, https://api.guild.ai, whose metadata is at https://api.guild.ai/.well-known/oauth-authorization-server.
  2. Register. The client registers itself with POST /v1/oauth/register (dynamic client registration, RFC 7591). Every client is public: it gets no secret. Each redirect URI must use https, or http on a loopback address.
  3. Authorize. The client sends the user to https://api.guild.ai/v1/oauth/authorize with a PKCE S256 code challenge and the scopes it wants. The user approves on the consent page.
  4. Exchange. The client exchanges the code at https://api.guild.ai/v1/oauth/token. Access tokens last one hour; refresh tokens last 90 days.
  5. Call. The client sends the access token as Authorization: Bearer <token> on every request to https://api.guild.ai/mcp.

Local server

The Guild CLI includes an MCP server that runs on your machine over stdio. It uses your CLI sign-in and defaults to your configured workspace.

Set it up

  1. Install the CLI and sign in:
  2. Add the server to your client. In a project, guild setup does this for Claude Code: it writes the server to .mcp.json along with Guild’s coding skills. To add it by hand instead:
Or add it to .mcp.json in your project root:
To pin the server to a workspace other than your configured one, add "--workspace", "<workspace-id-or-name>" to args. If the server fails to start with Not authenticated, run guild auth login again. The local server’s tools, their parameters, and what they return are listed in MCP server.

Search these docs over MCP

These docs have their own MCP server at https://docs.guild.ai/mcp, with no sign-in. It searches and reads this documentation, so a coding assistant can look things up while it works:
Last modified on November 12, 2026