Superego

MCP servers

The agents in Superego's threads can use MCP servers: other people's tools (Linear, GitHub, Sentry, a browser), named mcp__<server>__<tool>. Each machine has its own list of servers, and signs in to each once.

The other way round, Superego is an MCP server itself, for agents outside it (Claude Code, Codex, an editor's): superego mcp, in the command's docs. Settings calls that Outside agents.

Adding a server

Settings → MCP servers → Add server. A server is either:

Add server offers a list of well-known servers to start from. On save, Superego starts the server once to check it and shows "Connected · 23 tools", or the error. You can also ask Ego ("connect Linear"); a command Ego adds waits for you to press Allow in Settings, which shows the whole command line.

Each server signs in one of these ways:

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

A server that's off, waiting for Allow or not on this machine is left out. The thread's header shows a plug and how many servers it has; it opens a list with each one's state, and why any were left out. A server that needs signing in puts a notice over the thread's message box. A thread works out its servers again on every turn, so edits apply from the next one.

In the transcript, each call is a row: 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' } },
    },
  ],
})

The config

A machine's servers are in ~/.superego/mcp-servers.json, which holds no secrets. Its 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, run 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 are lower-case letters, digits and hyphens, up to 24, starting with a letter.

How servers run

Outside agents (superego mcp) can't list, add or change servers, and the servers' tools aren't offered to them. A thread an outside agent starts uses its profile's servers like any other.

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>

docs/mcp.md