Guides

Best MCP Servers for OpenCode

OpenCode already sits close to the work. It runs in the terminal, sees the project, and can operate where you build and test. MCP is useful when it brings in the context that is not already sitting in that terminal.

For coding, that outside context is often documentation. Context7 gives OpenCode current library docs and examples, so it can reason from the same APIs you are using instead of filling gaps from memory.

Recommended OpenCode MCP Servers

OpenCode supports local and remote MCP servers, and those tools show up alongside its built-in tools. That is powerful. It also means every extra server competes for attention.

Use the smallest set that improves your actual day. These categories are the ones that tend to earn their place.

Context7

Up-to-date library documentation and code examples

Use Context7 when the agent is about to touch a package API and you do not want it guessing from memory. It resolves the library, then pulls focused docs and examples for the exact topic.

How Context7 keeps AI tools current

GitHub MCP servers

Issues, pull requests, repository metadata, and hosted code context

This is useful when the real task lives outside the files: a PR comment, a failing workflow, an issue description, or a release note someone forgot to paste into the prompt.

Filesystem MCP servers

Local files, generated artifacts, and project inspection

Filesystem access is basic, but still worth being deliberate about. Give the agent the paths it needs, keep the permissions scoped, and avoid treating the whole machine as context.

Browser and search MCP servers

Fresh web information, changelogs, examples, and vendor docs

Good for fresh facts: a changelog, a release announcement, an issue thread, or a vendor page that changed after the model was trained. Less useful for things already covered by your docs server.

Memory and knowledge MCP servers

Project decisions, long-running work, and repeated team context

Memory is valuable when it stores decisions you would otherwise repeat: why a migration is blocked, which convention the team chose, or what failed last time. It gets messy fast if everything is saved forever.

Database MCP servers

Schema inspection, query debugging, and operational data

Useful when the schema is the truth and the application code is only a hint. Let the agent inspect tables or sample safe data before it writes migrations, joins, or analytics queries.

API and SaaS MCP servers

Workflow automation across tools like Slack, Linear, Notion, or cloud providers

Add these only when they are part of the engineering workflow. A ticketing tool, incident dashboard, or deployment system can be valuable context; a random SaaS integration usually is not.

Keep The Context Budget In Mind

OpenCode's MCP guidance is careful about tool volume because MCP servers add to context. That is good advice. Too many tools can make an agent slower, less focused, and more likely to choose the wrong path.

A good OpenCode setup starts with one documentation server and one or two project-specific servers. Add more only after you notice yourself doing the same manual step again.

For Context7, the common OpenCode setup command is:

npx ctx7 setup --opencode

From there, ask OpenCode to use documentation before touching code that depends on a library API. This pays off in migrations, generated clients, framework conventions, and package configuration.

The winning pattern is usually terminal-native and explicit: current docs for libraries, source-control context when the task comes from a PR or issue, and database or browser tools only when the task actually crosses those boundaries.

FAQ

What MCP server should OpenCode users add for documentation?

Use Context7 when OpenCode needs up-to-date package documentation, framework APIs, or examples for the specific library you are using.