-
Notifications
You must be signed in to change notification settings - Fork 0
MCP Servers
MCP (Model Context Protocol) servers extend OpenCode agents with external tools and data sources. This page covers the MCP servers that come pre-configured in this workspace template, how to activate them, and which template features depend on them.
Official documentation: opencode.ai/docs/mcp-servers/ covers the basics of local, remote, and OAuth-based MCP server configuration.
Find MCP servers: mcp.so | glama.ai/mcp/servers
The template ships with 9 MCP servers pre-configured in opencode.json. Three are enabled by default (context7, vercel-grep, gitmcp); the rest are disabled to conserve context and must be activated on demand.
| Server | Type | Default | Template Feature |
|---|---|---|---|
context7 |
Remote | ✅ Enabled | Documentation queries (find-docs skill) |
chrome-devtools |
Local | ❌ Disabled |
/webperf Deep mode, browser debugging |
excel |
Local | ❌ Disabled | Spreadsheet manipulation (xlsx skill) |
jupyter |
Local | ❌ Disabled | AI-powered notebook automation |
tavily |
Remote (OAuth) | ❌ Disabled | Real-time web search (API key) |
firecrawl |
Remote (OAuth) | ❌ Disabled | Web scraping and crawling (API key) |
vercel-grep |
Remote | ✅ Enabled | GitHub code search across 1M+ repos |
gitmcp |
Remote | ✅ Enabled | GitHub repository documentation |
codebase-memory-mcp |
Local (global install) | ❌ Disabled | Knowledge graph for codebase intelligence |
MCP servers add tokens to every conversation turn. The more servers and tools you enable, the faster you'll reach the context limit.
Rule of thumb: Keep only what you need enabled. Currently 3 servers are on by default (context7, vercel-grep, gitmcp). Disable servers you don't use and activate them per-agent when possible (see Per-Agent Control below).
Each server requires different prerequisites. Follow the steps below for the server you need.
Remote MCP server that provides up-to-date library documentation. Used by the find-docs skill.
Pre-configured as: "enabled": true — no setup needed.
{
"mcp": {
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"enabled": true
}
}
}For higher rate limits, sign up for a free account and set your API key:
{
"mcp": {
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}"
}
}
}
}Usage: Agents automatically use context7 when querying library documentation. You can also invoke it manually with
use context7in your prompt.
Local MCP server from the Chrome DevTools team (ChromeDevTools/chrome-devtools-mcp) that gives AI agents control over a live Chrome browser. Provides Lighthouse audits, performance traces, Core Web Vitals measurement, console inspection, and screenshots.
Required for /webperf Deep mode — without this MCP, web-performance-auditor operates in Quick mode (static source analysis only, metrics marked as "not measured").
- Node.js LTS (already present in this workspace)
- Google Chrome (stable or newer)
- No additional dependencies — runs via
npx
-
Open Chrome with remote debugging:
google-chrome --remote-debugging-port=9222
Or use
--auto-connect(Chrome 144+):npx -y chrome-devtools-mcp@latest --auto-connect
-
Enable the MCP server in
opencode.json:{ "mcp": { "chrome-devtools": { "type": "local", "command": ["npx", "-y", "chrome-devtools-mcp@latest"], "enabled": true } } } -
Restart OpenCode for the change to take effect.
| Tool | Purpose |
|---|---|
lighthouse_audit |
Run Lighthouse and get performance score + diagnostics |
performance_start_trace |
Start recording a performance trace |
performance_stop_trace |
Stop trace and get analysis |
performance_analyze_insight |
Analyze performance data for bottlenecks |
screenshot |
Capture page screenshot |
console_logs |
Get browser console output |
page_capture |
Capture page state for inspection |
"Run a Lighthouse audit on localhost:3000 and tell me what's hurting the performance score."
"Record a performance trace of the page load and identify long tasks blocking INP."
"Check the console for errors on the current page."
Local MCP server for reading, writing, and manipulating Excel files (.xlsx) directly from OpenCode agents. Supports workbooks, worksheets, ranges, formulas, charts, pivot tables, formatting, and more. Used by the xlsx skill.
-
Python 3 with
uvinstalled (pip install uvorbrew install uv) - No additional npm dependencies
-
Verify the dependency runs correctly:
uvx excel-mcp-server stdio
If this is your first run,
uvwill download and cache the server automatically. -
Enable the MCP server in
opencode.json:{ "mcp": { "excel": { "type": "local", "command": ["uvx", "excel-mcp-server", "stdio"], "enabled": true } } } -
Restart OpenCode for the change to take effect.
Repository: github.com/haris-musa/excel-mcp-server
Local MCP server that gives AI agents full control over a live Jupyter notebook session — run code, add markdown, manage packages, inspect variables, and more.
-
Python 3 with
uvinstalled -
Docker (recommended for the Jupyter server) or Python packages (
jupyterlab,ipykernel)
1. Start a Jupyter server
Pick one method:
# A) With Docker (recommended — includes jupyter-collaboration)
git clone https://github.com/Cyb3rWard0g/agent-jupyter-toolkit.git
cd agent-jupyter-toolkit/packages/mcp-jupyter-notebook/quickstarts
docker compose up -d --build
# B) Or locally
pip install jupyterlab ipykernel jupyter-collaboration
jupyter lab --port 8888 --IdentityProvider.token=mcp-dev-token2. Enable the MCP server in opencode.json:
{
"mcp": {
"jupyter": {
"type": "local",
"command": ["uvx", "mcp-jupyter-notebook"],
"enabled": true,
"env": {
"MCP_JUPYTER_SESSION_MODE": "server",
"MCP_JUPYTER_BASE_URL": "http://localhost:8888",
"MCP_JUPYTER_TOKEN": "mcp-dev-token",
"MCP_JUPYTER_NOTEBOOK_PATH": "agent_demo.ipynb"
}
}
}
}3. Restart OpenCode — the server will connect automatically.
For lightweight sessions without a full Jupyter server:
{
"mcp": {
"jupyter": {
"type": "local",
"command": ["uvx", "mcp-jupyter-notebook", "--mode", "local"],
"enabled": false
}
}
}Note: Local mode runs a kernel directly. No
MCP_JUPYTER_BASE_URLorMCP_JUPYTER_TOKENrequired.
| Variable | CLI Flag | Description | Default |
|---|---|---|---|
MCP_JUPYTER_SESSION_MODE |
--mode |
server (remote Jupyter) or local
|
server |
MCP_JUPYTER_BASE_URL |
--base-url |
Jupyter server URL (required in server mode) | — |
MCP_JUPYTER_TOKEN |
--token |
Jupyter API token | — |
MCP_JUPYTER_KERNEL_NAME |
--kernel-name |
Kernel spec name | python3 |
MCP_JUPYTER_NOTEBOOK_PATH |
--notebook-path |
Notebook file path (.ipynb) |
auto-generated |
MCP_JUPYTER_LOG_LEVEL |
— |
DEBUG, INFO, WARNING, ERROR
|
INFO |
Repository: github.com/Cyb3rWard0g/agent-jupyter-toolkit
Full tool reference: packages/mcp-jupyter-notebook/docs/tools.md
Local MCP server that indexes your codebase into a persistent knowledge graph. Provides structural search, call tracing, architecture analysis, dead code detection, and 15 other tools. Supports 158 languages via tree-sitter. Ships as a single static binary — zero dependencies, no API keys required.
Pre-configured as: "enabled": false — requires global installation on the user's machine.
-
Global installation — The MCP binary must be installed globally (not via
npx). The installer auto-configures OpenCode.
One-line install (macOS / Linux):
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bashWindows (PowerShell):
Invoke-WebRequest -Uri https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 -OutFile install.ps1
Unblock-File .\install.ps1
.\install.ps1The installer auto-detects OpenCode and configures the MCP entry. After installation:
- Restart OpenCode for the change to take effect.
-
Enable the MCP in
opencode.json(set"enabled": true):{ "mcp": { "codebase-memory-mcp": { "enabled": true } } } - Say "Index this project" to your agent — done.
# npm
npm install -g codebase-memory-mcp
# PyPI
pip install codebase-memory-mcp
# Homebrew (macOS/Linux)
brew install codebase-memory-mcpIf you prefer not to use the install command, add to opencode.json:
{
"mcp": {
"codebase-memory-mcp": {
"command": "/path/to/codebase-memory-mcp",
"args": []
}
}
}| Tool | Purpose |
|---|---|
search_graph |
Search functions, classes, routes, variables by pattern |
search_code |
Graph-augmented code search |
trace_path |
Trace callers/callees, impact analysis |
get_code_snippet |
Read specific function/class source code |
query_graph |
Cypher queries for complex patterns |
get_architecture |
High-level project summary |
detect_changes |
Git diff impact mapping |
manage_adr |
Architecture Decision Records |
index_repository |
Index or re-index the codebase |
ingest_traces |
Enhance graph with runtime traces |
get_graph_schema |
Knowledge graph schema |
index_status |
Check indexing status |
list_projects |
List all indexed projects |
delete_project |
Remove a project from the index |
context7_query-docs |
Query Context7 documentation (built-in) |
Repository: github.com/DeusData/codebase-memory-mcp | License: MIT | Stars: 36K+
Remote MCP server for AI-optimized web search. Provides search and content extraction with domain filtering, news search, and LLM-friendly results. Requires a free Tavily API key.
Pre-configured as: "enabled": false — requires API key setup.
- Tavily API key — Sign up and get a free API key at tavily.com
-
Set your API key (pick one method):
Option A — Environment variable:
export TAVILY_API_KEY=tvly-your-key-hereThen enable in
opencode.json:{ "mcp": { "tavily": { "type": "remote", "url": "https://mcp.tavily.com/mcp", "headers": { "TAVILY_API_KEY": "{env:TAVILY_API_KEY}" }, "enabled": true } } }Option B — OAuth authentication (recommended):
opencode mcp auth tavily
This launches an OAuth flow in your browser. No manual API key handling required.
-
Enable the server (if not using OAuth, enable in
opencode.jsonas shown above). -
Restart OpenCode for the change to take effect.
| Tool | Purpose |
|---|---|
tavily_search |
Real-time web search with filtering |
tavily_extract |
Intelligent content extraction from pages |
Remote MCP server for scraping, crawling, and extracting content from web pages. Supports batch scraping, deep crawling, and structured data extraction. Requires a Firecrawl API key.
Pre-configured as: "enabled": false — requires setup.
-
Install Firecrawl skills and authenticate:
npx -y firecrawl-cli@latest init --all -k YOUR_FIRECRAWL_API_KEY
This installs 31 Firecrawl skills across all your AI coding agents.
Get an API key: Sign up at firecrawl.dev for a free key.
-
Authenticate via OAuth:
opencode mcp auth firecrawl
This launches an OAuth flow in your browser, connecting OpenCode to Firecrawl's MCP endpoint.
-
Enable the MCP server in
opencode.json(only needed if not using OAuth):{ "mcp": { "firecrawl": { "type": "remote", "url": "https://mcp.firecrawl.dev/v2/mcp", "headers": { "FIRECRAWL_API_KEY": "{env:FIRECRAWL_API_KEY}" }, "enabled": true } } } -
Restart OpenCode for the change to take effect.
| Tool | Purpose |
|---|---|
firecrawl_scrape |
Scrape content from a single URL |
firecrawl_search |
Web search with content extraction |
firecrawl_crawl |
Launch an asynchronous crawl |
firecrawl_batch_scrape |
Scrape multiple URLs in parallel |
Remote MCP server from Vercel that searches code patterns across 1M+ public GitHub repositories. Returns real-world code snippets ranked by relevance. Ideal for finding usage examples of APIs and libraries.
Pre-configured as: "enabled": true — no setup needed.
{
"mcp": {
"vercel-grep": {
"type": "remote",
"url": "https://mcp.grep.app",
"enabled": true
}
}
}- No API key required
| Tool | Purpose |
|---|---|
searchGitHub |
Search code patterns across 1M+ GitHub repos |
Blog: vercel.com/blog/grep-a-million-github-repositories-via-mcp
Remote MCP server that transforms any public GitHub repository into a documentation endpoint. Change github.com to gitmcp.io in a repo URL and your AI agent gets instant access to its README, docs, and code structure.
Pre-configured as: "enabled": true — no setup needed.
{
"mcp": {
"gitmcp": {
"type": "remote",
"url": "https://gitmcp.io/docs",
"enabled": true
}
}
}- No API key required
- Repository must be public
| Format | Use Case |
|---|---|
gitmcp.io/{owner}/{repo} |
Specific repository |
{owner}.gitmcp.io/{repo} |
GitHub Pages site |
gitmcp.io/docs |
Generic (AI picks repo from context) |
| Tool | Purpose |
|---|---|
fetch_*_documentation |
Fetch repo-specific documentation |
search_*_documentation |
Semantic search across docs |
search_*_code |
Search repository code |
Website: gitmcp.io | GitHub: github.com/idosal/git-mcp
The template recommends a disable-globally, enable-per-agent strategy to conserve context while giving specific agents access to the tools they need.
For example, chrome-devtools is useful for agents that run browser tests or performance audits, but unnecessary for other agents. Here's how to disable it globally and enable it only for mictlantecuhtli and tlaloc:
{
"mcp": {
"chrome-devtools": {
"type": "local",
"command": ["npx", "-y", "chrome-devtools-mcp@latest"],
"enabled": true
}
},
"tools": {
"chrome-devtools*": false
},
"agent": {
"mictlantecuhtli": {
"tools": {
"chrome-devtools*": true
}
},
"tlaloc": {
"tools": {
"chrome-devtools*": true
}
}
}
}This pattern applies to any MCP server:
- Enable the server in the
mcpsection (so OpenCode starts it) - Disable all its tools globally in the
toolssection - Re-enable tools only for specific agents using
agent.<name>.tools
Official docs: See opencode.ai/docs/mcp-servers#per-agent for more on per-agent tool control.
Beyond the pre-configured servers, you can add any MCP server available in the ecosystem. Follow the basic pattern from the official OpenCode docs:
Local MCP server:
{
"mcp": {
"my-server": {
"type": "local",
"command": ["npx", "-y", "my-mcp-package"],
"enabled": true
}
}
}Remote MCP server:
{
"mcp": {
"my-server": {
"type": "remote",
"url": "https://my-mcp-server.com/mcp",
"enabled": true
}
}
}| Server | Description | Package / URL |
|---|---|---|
| Filesystem | File system access | @modelcontextprotocol/server-filesystem |
| PostgreSQL | Database access | @modelcontextprotocol/server-postgres |
| Puppeteer | Browser automation | @modelcontextprotocol/server-puppeteer |
| Memory | Persistent storage | @modelcontextprotocol/server-memory |
| Sentry | Error tracking (remote) |
https://mcp.sentry.dev/mcp (+ OAuth) |
Avoid the GitHub MCP server: It consumes a large number of tokens. Use the
ghCLI via thebashtool instead.
| Feature | MCP Required | Without MCP |
|---|---|---|
Documentation queries (find-docs skill) |
context7 |
Falls back to training data |
| Codebase intelligence (search, trace, architecture) | codebase-memory-mcp |
File-by-file exploration (slow, token-heavy) |
| Real-time web search (API key) | tavily |
Falls back to training data |
| Web scraping and crawling (API key) | firecrawl |
Not available |
| GitHub code search | vercel-grep |
Manual GitHub browsing |
| GitHub repository docs | gitmcp |
Manual GitHub browsing |
/webperf Deep mode |
chrome-devtools |
Quick mode (static analysis only) |
Browser testing (browser-testing-with-devtools skill) |
chrome-devtools |
No runtime browser verification |
Spreadsheet manipulation (xlsx skill) |
excel |
Manual CSV editing |
| Jupyter notebook automation | jupyter |
Not available |
- Enable only what you need — Each active MCP server adds tokens to every conversation. Disable servers you're not actively using.
- Prefer per-agent activation — Disable tools globally and enable them only for specific agents that need them (see Per-Agent Control).
-
Use
@latestfor Chrome DevTools MCP —chrome-devtools-mcp@latestensures you always get the newest version without manual updates. -
Use environment variables for secrets — Reference API keys and tokens with
{env:VAR_NAME}in the config. Never hardcode credentials. -
Configure timeouts for slow servers — If an MCP server is slow to respond, increase the
timeoutvalue (default: 5000ms). - Test new servers incrementally — Add one server at a time and verify it works before adding the next. This helps isolate configuration issues.
-
Run
opencode mcp listto see all configured servers and their authentication status.
-
Configuration — The
mcpsection in opencode.json - Getting Started — First steps after installing the template
- opencode.ai/docs/mcp-servers/ — Official OpenCode MCP documentation