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
| Server | Description | Default |
|---|---|---|
| Linear | Issue tracking and project management | Baseline (enabled) |
| Notion Docs Reader | Read-only access to Notion documentation | Baseline (enabled) |
| Slack | Search, read, and send Slack messages (official Slack MCP server) | Baseline (enabled) |
| Context7 | Up-to-date documentation for libraries and frameworks | Enabled (API key optional) |
| Observability | Production logs and cluster state (Loki, kubectl, gcloud) — read-only | Always on |
| Decision Log | Record and manage architectural/design decisions via era-decision-api | Always on |
| Exa Websearch | AI-powered web search | Disabled |
| Figma | Design file access | Disabled |
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 initcheckbox, 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 initor 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:
- Select which servers to enable
- For servers requiring auth, follow the setup instructions
- 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:
| Platform | Location |
|---|---|
| Linux | ~/.config/era-code/credentials.json |
| macOS | ~/Library/Application Support/era-code/credentials.json |
| Windows | %APPDATA%\era-code\credentials.json |
Notion Setup
- Go to Notion Integrations
- Create a new internal integration
- Name it (e.g., "Docs Reader")
- Under Capabilities, select only "Read content"
- Save and copy the "Internal Integration Secret"
- Share your documentation pages with the integration
Linear Setup
- Go to Linear Settings > API
- Create a new Personal API Key
- 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:
- Go to api.slack.com/apps and create a new app for your Slack workspace (internal apps may use MCP)
- In the app settings, enable the "Slack Model Context Protocol (MCP) Server" toggle (under Agents & AI Apps)
- Under "OAuth & Permissions", add the User Token Scopes you need (e.g.
search:read.public,channels:history,chat:write) - Install the app to your workspace and copy the User OAuth Token (starts with
xoxp-) - Enter it at the
era-code initprompt, or export it asSLACK_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.