MCP servers
Agents in threads can use MCP servers: other people's tools (Linear, GitHub, Sentry, a browser), named
mcp__<server>__<tool>. Each machine has its own list, and signs in to each server once.
Superego is also an MCP server itself, for agents outside it (Claude Code, Codex, an editor's): superego mcp, see
Outside agents.
Add a server
Settings → MCP servers → Add server, or ask Ego ("connect Linear"). Start from the list of well-known servers, or give:
- a command the machine runs (stdio):
npx -y @sentry/mcp-server; - a URL (Streamable HTTP or SSE):
https://mcp.linear.app/mcp.httpsonly, except on loopback.
On save, Superego starts it once and shows "Connected · 23 tools", or the error. A command Ego adds waits for you to press Allow in Settings, which shows the whole command line.
| Sign-in | How |
|---|---|
| OAuth | Sign in opens the server's page in your browser (a remote machine's too). From a browser, a phone, or with the port taken, paste the address the browser ends on |
| API key | Set key. Sent as Authorization: Bearer <key>, or in the header the config names |
| Secret environment variables | for a command: names in the config, values set in Settings |
Secrets stay on the machine, in ~/.superego/mcp-auth.json (mode 0600). Settings and the command line only say
whether each is set.
Which threads use it
| Thread | Servers |
|---|---|
| with a profile | those its profile names: mcpServers: ['linear', 'sentry'] |
| without a profile | those switched to Use in threads without a profile (off by default) |
| Ego's | none |
A server that's off, waiting for Allow, or not on this machine is left out. The thread's header shows a plug with how many servers it has, and opens a list of each one's state and why any were left out. A server that needs signing in puts a notice over the message box. Edits apply from the next turn.
Each call is a row in the transcript (Called Linear · create_issue), with its arguments and result.
In a profile
import { defineProfile } from 'superego'
export default defineProfile({
prompt: 'You triage bugs for Acme.',
mcpServers: [
'linear', 'sentry', // the machine's, by name
{ // the profile's own
docs: { command: 'node', args: ['./tools/docs-mcp.js'], auth: { type: 'env', names: ['DOCS_TOKEN'] } },
status: { url: 'https://status.acme.dev/mcp', auth: { type: 'oauth' } },
},
],
})
- A string names one of the machine's servers. An object defines the profile's own, each shaped like a config entry (below); one named like a machine's replaces it in this profile's threads.
- A command runs in the project's root, only once the profile is allowed; changing it means allowing again. Set its secrets in Settings → MCP servers → From profiles.
- With
extends, the lists add up.without: ['mcp-servers']drops every server.
The config
A machine's servers are in ~/.superego/mcp-servers.json, without secrets. Field names follow Claude Code's and
Cursor's mcpServers.
{
"servers": {
"linear": { "url": "https://mcp.linear.app/mcp", "auth": { "type": "oauth" }, "unprofiled": true },
"github": { "url": "https://api.githubcopilot.com/mcp/", "auth": { "type": "api-key" } },
"sentry": {
"command": "npx", "args": ["-y", "@sentry/mcp-server"],
"env": { "SENTRY_HOST": "sentry.io" },
"auth": { "type": "env", "names": ["SENTRY_ACCESS_TOKEN"] }
},
"playwright": { "command": "npx", "args": ["-y", "@playwright/mcp"], "lifetime": "thread" }
}
}
| Field | |
|---|---|
title |
its name in the window |
command, args, cwd, env |
a command to run; env holds plain values only |
url, headers |
a URL to reach |
auth |
{ type: 'oauth', scopes?, clientId? }, { type: 'api-key', header?, scheme? } or { type: 'env', names } |
lifetime |
machine (default): one process shared by every thread; thread: one per thread, in the thread's folder |
tools |
auto (default): offered directly up to 15 tools, else found by search (tool_search); all; search |
timeout |
seconds per call, reset by progress (default 300) |
unprofiled |
used by threads without a profile |
enabled |
false turns it off |
Names: lower-case letters, digits and hyphens, up to 24, starting with a letter.
How servers run
- Starts when a thread that has it starts a turn; stops after 10 minutes unused. Its tool list is cached, so the model sees its tools before it runs.
- Three crashes within a minute mark it failed until you restart it or change its config.
- A call cut off by a daemon restart isn't sent again: the model is told it may have taken effect, and the row says Interrupted: may have run.
- Logs:
~/.superego/logs/mcp/<name>.log, secrets hidden (Show log in Settings). - A command gets a clean environment (
HOME,PATH,SHELL,TERM,USER,LOGNAME, then itsenvand secrets), not the daemon's. - Outside agents (
superego mcp) can't list, add or change servers, and don't get their tools. A thread an outside agent starts uses its profile's servers as usual.
From a shell
superego mcp-servers # each server, and how it stands
superego mcp-servers --thread <thread> # the servers a thread's last turn had, and those left out
superego mcp-servers logs <name> [--lines N]
superego mcp-servers restart <name>
superego mcp-servers set-secret <name> [VAR] # an API key or a secret env var, prompted or from stdin
superego mcp-servers sign-in <name> # OAuth: open the page it prints
superego mcp-servers sign-out <name>