Skip to main content
The OuterLayer MCP server lets a coding agent or chat client read your factory’s data. It reads sessions, costs, pull request outcomes, work items, runners and findings. One tool, stop_build, asks a runner to stop a build. The other tools change nothing. outerlayer init adds two MCP servers to a repository. This page covers outerlayer, which reads your factory’s data. The other, outerlayer-docs, searches these docs. See Agent instructions.

Before you start

The tools you can call depend on how the server signs in:
  • Your login, or a chat connector. The server acts as you, so each tool follows your role. The Read role can call every tool except stop_build, which needs the Admin or Owner role.
  • A factory key. Each tool needs the permission in the Tools table. A key with the Agent preset can call only the tools that need sessions.read, work.read or context.read. For the other tools, use the Reader preset or add the permission. See Choose a preset.

Connect a coding agent

In a repository set up with outerlayer init, the server is in place. Sign in on your machine with outerlayer login. To add the server to another directory, run:
The command writes an outerlayer entry to .mcp.json in the current directory. If .outerlayer/mcp.json exists, it writes there. The entry runs outerlayer mcp serve, so outerlayer must be on your PATH. Install the CLI with npm install -g @outerlayer/cli. The server reads your saved credential each time it connects: a factory key, or your login after you choose a factory. The file never holds the key. For a client that cannot start a process, run:
This entry connects to https://api.outerlayer.ai/v1/mcp on OuterLayer Cloud. It sends Authorization: Bearer ${OUTERLAYER_API_KEY}, so set OUTERLAYER_API_KEY in the client’s environment. For the other flags, see outerlayer mcp install.

Connect claude.ai or ChatGPT

A custom connector in claude.ai or ChatGPT takes a URL and signs in with OAuth. Use the factory’s own MCP address, with the Factory ID from the factory’s Settings → General:
  1. In the client, add a custom connector and paste the address.
  2. Sign in to OuterLayer when the client opens it.
  3. On Connect to OuterLayer, check the client’s name and choose Allow access.
The connector acts as you. It can call every tool that your role allows, and that includes stop_build.

Tools

Each tool describes its own parameters to the client. The server also has one resource, a guide to the data model. These rules apply to the results:
  • list_sessions and get_pr_outcomes cover the repository with the highest spend. For list_sessions, pass repo to name another repository, or repoScope: "all" for all of them.
  • Dates are UTC calendar dates.
  • A session with no stored price adds nothing to cost or totalCost. It counts in unpricedSessions. A total with a count above zero is a lower bound.
  • A key without sessions.read_team cannot see who ran each session, and list_sessions refuses a filter by person. The Reader preset holds sessions.read_team.

Disconnect or rotate

To revoke a connector:
  1. Open Profile → Connections in the dashboard.
  2. Under Connected apps, choose Disconnect for the connector.
  3. Remove the connector in the client.
A token that the connector holds can work for up to an hour after you revoke it. After you rotate a factory key, your editor’s MCP server uses the new key the next time it connects. See Rotate or revoke.

Next steps