Superego

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:

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' } },
    },
  ],
})

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

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