Skip to main content

MCP Servers Guide

Era Code integrates with MCP (Model Context Protocol) servers to extend your AI coding agent with external tools. All servers are available in both harnesses — OpenCode and Claude Code.

Available Servers

ServerDescriptionDefault
LinearIssue tracking and project managementBaseline (enabled)
Notion Docs ReaderRead-only access to Notion documentationBaseline (enabled)
SlackSearch, read, and send Slack messages (official Slack MCP server)Baseline (enabled)
Context7Up-to-date documentation for libraries and frameworksEnabled (API key optional)
ObservabilityProduction logs and cluster state (Loki, kubectl, gcloud) — read-onlyAlways on
Decision LogRecord and manage architectural/design decisions via era-decision-apiAlways on
Exa WebsearchAI-powered web searchDisabled
FigmaDesign file accessDisabled

Baseline Servers

Linear, Notion Docs Reader, and Slack are baseline connections — the integrations every Era engineer is expected to have:

  • They appear in the era-code init checkbox, checked by default, with the normal auth/token prompting
  • When the CLI upgrades, they are force-re-added to existing project manifests, so they show up on the next launch without re-running init
  • If the credential is missing at launch, the server is disabled for that session with a one-line warning instead of failing on every connect — provide the token (re-run era-code init or export the env var) and the next launch re-enables it

Configuration

For OpenCode, servers live in opencode.jsonc under the mcp block, with {env:VAR} credential interpolation:

{
"mcp": {
"notion-docs-reader": {
"type": "local",
"command": ["npx", "@era-laboratories/notion-documentation-mcp"],
"environment": {
"NOTION_TOKEN": "{env:NOTION_TOKEN}"
},
"enabled": true
}
}
}

For Claude Code, Era generates .mcp.json with ${VAR} interpolation. Claude Code has no per-server enabled flag, so disabled servers are omitted entirely:

{
"mcpServers": {
"linear": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.linear.app/mcp", "--header", "Authorization:Bearer ${LINEAR_API_KEY}"],
"env": {
"LINEAR_API_KEY": "${LINEAR_API_KEY}"
}
}
}
}

Both files are Era-generated — selections are stored in the project manifest and re-applied on every era-code start / era-code claude.

Setting Up Credentials

During Initialization

When you run era-code init, you'll be prompted to configure MCP servers:

  1. Select which servers to enable
  2. For servers requiring auth, follow the setup instructions
  3. Enter your API token when prompted

Tokens are validated before being stored. Linear also supports OAuth as an alternative to a token — the browser flow runs when the server first connects.

Credential Storage

Credentials are stored securely in your platform's config directory:

PlatformLocation
Linux~/.config/era-code/credentials.json
macOS~/Library/Application Support/era-code/credentials.json
Windows%APPDATA%\era-code\credentials.json

Notion Setup

  1. Go to Notion Integrations
  2. Create a new internal integration
  3. Name it (e.g., "Docs Reader")
  4. Under Capabilities, select only "Read content"
  5. Save and copy the "Internal Integration Secret"
  6. Share your documentation pages with the integration

Linear Setup

  1. Go to Linear Settings > API
  2. Create a new Personal API Key
  3. Copy the API key (starts with lin_api_)

Or choose OAuth at init time and authorize in the browser instead.

Slack Setup

Slack uses the official Slack-hosted MCP server (https://mcp.slack.com/mcp), bridged over stdio with mcp-remote. It is token-only — the Slack MCP endpoint requires a confidential OAuth client, so a browser OAuth flow is not available:

  1. Go to api.slack.com/apps and create a new app for your Slack workspace (internal apps may use MCP)
  2. In the app settings, enable the "Slack Model Context Protocol (MCP) Server" toggle (under Agents & AI Apps)
  3. Under "OAuth & Permissions", add the User Token Scopes you need (e.g. search:read.public, channels:history, chat:write)
  4. Install the app to your workspace and copy the User OAuth Token (starts with xoxp-)
  5. Enter it at the era-code init prompt, or export it as SLACK_USER_TOKEN

Environment Variables

When you run era-code start or era-code claude, credentials are loaded into the environment automatically. The {env:VAR} (OpenCode) and ${VAR} (Claude Code) syntax in the generated configs references these injected values.