Skip to main content
Compiler has a built-in MCP server. Once it’s on, people add your instance to their AI tool as a connector, sign in with their Compiler account, and can then ask Compiler about your code without leaving that tool. There’s nothing to install or put in environment variables beyond PUBLIC_URL. The server is off until an admin turns it on.

Prerequisites

  • You’re an owner or admin of your Compiler organization.
  • PUBLIC_URL is set to the address people use to reach your instance, such as https://compiler.yourdomain.com. The MCP server is only served when it’s set.
  • The instance is served over HTTPS. MCP clients sign in with OAuth, which refuses a plain http:// address.

Step 1: Turn on the MCP server

  1. In Compiler, open Settings > Integrations > MCP.
  2. Turn on Enable the MCP server.
  3. Copy the URL. It’s your instance address followed by /mcp, such as https://compiler.yourdomain.com/mcp.
The page also lists the tools a connected client can call: list_projects, ask_question and get_answer. Turning the switch off cuts off every connected client straight away, including ones that are already signed in.

Step 2: Make sure clients can reach it

Where the client runs decides what needs to reach your instance. For Claude and ChatGPT, the paths that need to be public are /mcp, /oauth/token and /.well-known/. The sign-in page itself, /oauth/authorize, opens in the person’s browser, so it only needs to be reachable from their network. Your instance also fetches a small document from each client when someone signs in, to check where it may send them back to. If your network restricts egress, allow claude.ai for Claude, chatgpt.com for ChatGPT, and the equivalent host for any other client.
For its MCP endpoint, Compiler checks that the request’s host matches PUBLIC_URL and returns 421 Misdirected Request when it doesn’t. Behind a reverse proxy, pass the public hostname through in Host or X-Forwarded-Host. See Other platforms.

Step 3: Connect a client

Share the URL from step 1 with your team. Each person connects their own client and signs in as themselves. The Getting started checklist in Compiler also shows them the URL.
  1. In Claude, open Settings > Connectors and click Add custom connector.
  2. Give it a name such as Compiler, paste the URL and click Add.
  3. Click Connect. Compiler asks you to sign in and allow access.
On a Claude Team or Enterprise plan, an owner adds the connector once in the organization’s settings, and each person then clicks Connect to sign in.
Other MCP clients work if they support OAuth sign-in with client ID metadata documents. Compiler doesn’t offer dynamic client registration, so a client that only supports that can’t connect.

What a connected client can see

A client asks questions as the person who signed it in. It only sees the projects that person can see in Compiler, and each question is answered as it would be in Compiler itself, using your organization’s AI provider. Each answer links to the full conversation in Compiler.

Managing access

  • A client stays signed in for up to 30 days of inactivity. After that, the person signs in again.
  • People see and revoke their own clients under Settings > Security & access > Connected apps.
  • Deactivating or removing someone in Settings > Members cuts off their clients straight away.
  • Turning off Enable the MCP server cuts off everyone’s clients straight away.

Troubleshooting

PUBLIC_URL isn’t set. Set it to your instance’s address and restart Compiler.
Check that https://compiler.yourdomain.com/mcp is reachable from the internet, not just your network, and that the certificate is valid. Claude and ChatGPT connect from their own servers.
An owner or admin needs to turn on Enable the MCP server in Settings > Integrations > MCP.
The sign-in page says why. If it says the client couldn’t be verified, your instance couldn’t fetch the client’s metadata document. Allow the client’s host in your egress rules, as in step 2.
Your proxy is sending a host that doesn’t match PUBLIC_URL. Pass the public hostname through in Host or X-Forwarded-Host.