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.readorcontext.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 withouterlayer init, the server is in place. Sign in on your machine with outerlayer login.
To add the server to another directory, run:
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:
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:- In the client, add a custom connector and paste the address.
- Sign in to OuterLayer when the client opens it.
- On Connect to OuterLayer, check the client’s name and choose Allow access.
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_sessionsandget_pr_outcomescover the repository with the highest spend. Forlist_sessions, passrepoto name another repository, orrepoScope: "all"for all of them.- Dates are UTC calendar dates.
- A session with no stored price adds nothing to
costortotalCost. It counts inunpricedSessions. A total with a count above zero is a lower bound. - A key without
sessions.read_teamcannot see who ran each session, andlist_sessionsrefuses a filter by person. The Reader preset holdssessions.read_team.
Disconnect or rotate
To revoke a connector:- Open Profile → Connections in the dashboard.
- Under Connected apps, choose Disconnect for the connector.
- Remove the connector in the client.
Next steps
- API keys says how to create a key with the permissions the tools need.
- Agent instructions covers the
outerlayer-docsserver.