QVeris
运行任务
OpenCode MCP GuideOpenCode MCP 指南

Best MCP Servers for OpenCode: Data and Tool AccessOpenCode 最佳 MCP Server:数据与工具接入指南

Compare MCP servers for OpenCode by capability fit, permissions, data quality, setup effort, and production reliability.

从能力匹配、权限、数据质量、配置成本和生产可靠性,对比适合 OpenCode 的 MCP Server。

OpenCode agent hub connected through permission gates to web, documents, repositories, browser, database, files, memory, and location data
Treat each MCP server as a capability boundary, not as a collectible integration.每个 MCP Server 都是一条能力与权限边界,而不是越多越好的插件收藏。

The short answer: install for outcomes, not coverage快速结论:按结果安装,不追求数量

For most OpenCode projects, start with the one server that closes the clearest capability gap. QVeris is useful when coding work needs current, API-backed data; GitHub MCP fits repository, issue, and pull-request workflows. Add Context7 for current library documentation and Playwright when the task genuinely requires browser interaction. Database, filesystem, and memory servers deserve project-specific review because they expose broader or more durable access.

OpenCode supports local MCP servers launched as commands and remote MCP servers reached by URL. Once enabled, their tools become available to the model, so every extra server also adds context, latency, failure modes, and permissions to govern. The practical question is not how many integrations OpenCode can load, but which small set improves a repeated development workflow.

对大多数 OpenCode 项目,建议先接入一个最能补齐能力缺口的 Server。编程任务需要实时 API 数据时可考虑 QVeris;涉及仓库、Issue 和 Pull Request 时可选择 GitHub MCP;需要查询最新库文档时再加入 Context7;只有确实需要网页交互时才加入 Playwright。数据库、文件系统和记忆类 Server 的访问范围更广或数据保留更持久,应按项目单独评估。

OpenCode 既支持以命令启动的本地 MCP Server,也支持通过 URL 连接远程 MCP Server。启用后,其工具会提供给模型,因此每增加一个 Server,也会增加上下文占用、延迟、故障点和权限治理成本。真正需要决定的不是 OpenCode 最多能加载多少集成,而是哪一组精简工具能稳定改善重复开发流程。

Compatibility baseline:兼容性基线: Use the 请以 official OpenCode MCP documentationOpenCode 官方 MCP 文档 as the source of truth for current configuration fields, authentication, and tool behavior. 为准,核对当前版本的配置字段、认证方式和工具行为。
#ServerBest for最适合Typical scope典型权限范围Main caution主要注意点
1QVeris MCPCurrent data and API tools实时数据与 API 工具Selected tools/providers指定工具与服务商Choose only needed operations只开放所需操作
2GitHub MCPRepositories, issues, PRs仓库、Issue 与 PRToken and repository scope令牌与仓库范围Avoid broad write access避免宽泛写权限
3Context7Current library documentation最新库文档Remote documentation远程文档读取Confirm library/version确认库与版本
4Playwright MCPBrowser interaction and checks浏览器交互与验证Browser profiles and origins浏览器配置与来源Protect sessions and forms保护会话与表单
5Supabase MCPSupabase project workSupabase 项目工作Project and feature groups项目与功能组Prefer development projects优先连接开发项目
6FilesystemBounded local documents限定范围的本地文件Explicit directories明确指定的目录Never expose broad roots不要暴露宽泛根目录
7FetchSimple URL retrieval简单 URL 内容抓取Network read网络读取Treat pages as untrusted将网页视为不可信输入
8MemoryStructured persistent context结构化持久上下文Dedicated knowledge store专用知识存储Set retention and deletion rules设置保留与删除规则

The 8 best MCP servers for OpenCode适合 OpenCode 的 8 个 MCP Server

The order reflects usefulness in common coding workflows, maintainer authority, scope control, and how clearly each server complements OpenCode's built-in coding tools. It is an editorial shortlist—not a measured performance benchmark—and the best choice depends on the task.本清单依据常见编程流程中的实用性、维护方可信度、权限可控性,以及各 Server 对 OpenCode 内置编程工具的补充程度排序。它属于编辑推荐,并非性能实测排名;最合适的选择仍取决于具体任务。

1

QVeris MCP

Best for broad data and tool access综合数据与工具访问首选

QVeris fits OpenCode workflows that need more than one narrow vendor integration. Its official MCP server exposes a compact discover, inspect, and call flow: find a capability, review its parameters and evidence, then execute it. This is especially useful for research, market monitoring, location, enrichment, or other workflows where current API-backed data matters.

The key advantage is consolidation: OpenCode can call a smaller, intentional tool surface instead of carrying separate integrations for every data source. The trade-off is governance—you still need to select individual operations, understand provider inputs, and keep credentials out of prompts and shared configuration.

当 OpenCode 工作流需要跨越多个数据来源,而不是只连接某一家服务时,QVeris 更合适。其官方 MCP Server 提供精简的 discoverinspectcall 流程:先发现能力,再核对参数与依据,最后执行调用。它尤其适用于研究、市场监测、位置查询、数据补全等依赖实时 API 数据的场景。

它的核心价值是整合:OpenCode 无需为每个来源分别维护一套连接,只需保留精简且明确的工具面。相应地,你仍需逐项选择操作、理解服务商输入,并避免把凭证写入提示词或共享配置。

Choose when适用场景One agent needs several verified data capabilities一个智能体需要多种可核验数据能力
Start scope初始范围Discover and inspect before calling先发现和检查,再执行调用
Avoid when不适用A local static source already answers the task本地静态来源已能完成任务

Read the official QVeris MCP reference阅读 QVeris MCP 官方文档, inspect ,查看 relevant QVeris tools相关 QVeris 工具, then validate the workflow in the ,最后在 QVeris Playground. 中验证工作流。

2

GitHub MCP Server

Best for repository operations代码仓库操作首选

GitHub's official MCP server turns repository context into structured tools for code, issues, pull requests, and related workflows. It is the natural choice when OpenCode triages incoming work, summarizes project activity, or coordinates a coding agent.

Start with read access to named repositories. Add issue or pull-request writes only after testing the exact workflow and approval path. Repository content is untrusted input: an issue, README, or code comment can contain instructions that should never override your system policy.

GitHub 官方 MCP Server 将代码、Issue、Pull Request 等仓库上下文转化为结构化工具,适合让 OpenCode 分流任务、总结项目动态或协调编程智能体。

建议从指定仓库的只读权限开始。只有在完整验证工作流与审批路径后,才增加 Issue 或 PR 写权限。仓库内容本身属于不可信输入,Issue、README 或代码注释中的指令都不应覆盖系统策略。

Review GitHub's official MCP setup guidance查看 GitHub 官方 MCP 配置说明.

3

Context7

Best for current developer documentation最新开发文档首选

Context7 retrieves current, library-specific documentation instead of relying only on model memory. It is valuable when an OpenCode coding workflow spans fast-moving SDKs, frameworks, or APIs and needs version-aware examples.

Ask the agent to identify the library and target version before retrieval. Documentation is evidence, not execution authority: examples still need review against the project's runtime, lockfile, and security policy.

Context7 可获取面向具体库的最新文档,避免完全依赖模型记忆。对于涉及快速迭代 SDK、框架或 API 的 OpenCode 编程工作流,它能提供更贴近当前版本的资料。

调用前应让智能体明确库名与目标版本。文档是证据,不是执行授权;其中的示例仍需结合项目运行时、锁文件和安全策略进行审查。

Read the official Context7 client documentation阅读 Context7 官方客户端文档.

4

Playwright MCP

Best for browser workflows浏览器工作流首选

Microsoft's Playwright MCP server lets an agent inspect and interact with web pages through structured browser tools. Use it when OpenCode must verify a user journey, collect evidence from a web application, or perform a bounded browser task.

Use a dedicated browser profile without personal sessions. Restrict target origins where possible, require confirmation before submissions or purchases, and separate read-only inspection from actions that change external state.

Microsoft 的 Playwright MCP Server 让智能体通过结构化浏览器工具检查和操作网页,适合 OpenCode 验证用户流程、从 Web 应用收集证据,或完成范围明确的浏览器任务。

应使用不含个人会话的专用浏览器配置,并尽量限制目标来源。提交表单、购买或其他外部写操作前必须确认,同时将只读检查与会改变外部状态的动作分开。

Inspect the official Playwright MCP repository查看 Playwright MCP 官方仓库.

5

Supabase MCP

Best for Supabase projectsSupabase 项目首选

Supabase's official server is the right domain-specific choice when the application already uses Supabase. Its documented surface includes project context and documentation search, with feature groups and access controls that should be narrowed to the task.

Connect a development project first. Keep production data and schema-changing operations behind a separate, explicit approval path; database access can turn a plausible but wrong agent step into durable damage.

如果应用本身使用 Supabase,其官方 MCP Server 是更合适的垂直选择。文档中包含项目上下文与文档搜索等能力,并支持通过功能组和访问控制缩小范围。

先连接开发项目。生产数据与会修改 Schema 的操作应设置独立、明确的审批路径,因为数据库访问可能把一次看似合理但错误的智能体操作变成持久性损害。

Read the official Supabase MCP guide阅读 Supabase 官方 MCP 指南.

6

Filesystem

Best for bounded local knowledge限定本地知识首选

The reference Filesystem server is useful for a curated document directory, runbooks, exports, or a project workspace that OpenCode cannot otherwise access. Its value comes from a narrow root—not from exposing an entire machine.

Create a dedicated directory containing only the material the agent needs. Prefer read-only mounts, exclude secret files and credential stores, and never configure a home directory, filesystem root, or broad shared drive as the allowed path.

参考实现 Filesystem Server 适合向 OpenCode 提供经过整理的文档目录、运行手册、导出文件或项目工作区。它的价值来自目录边界足够窄,而不是让智能体看到整台机器。

应建立只包含任务资料的专用目录,优先使用只读挂载,并排除密钥文件与凭证存储。不要把用户主目录、文件系统根目录或宽泛共享盘设置为允许范围。

Review the MCP reference server examples查看 MCP 参考 Server 示例.

7

Fetch

Best for simple web retrieval简单网页抓取首选

Fetch is a lightweight option when OpenCode needs to retrieve a known URL and extract readable content without a full browser. It suits public documentation, static pages, and bounded research inputs.

It does not replace search, JavaScript-capable browsing, or source verification. Treat returned content as untrusted, enforce network policy, and avoid internal addresses or endpoints that could expose metadata and private services.

当 OpenCode 只需获取已知 URL 并提取可读内容,而不需要完整浏览器时,Fetch 是更轻量的选择,适用于公开文档、静态页面和范围明确的研究输入。

它不能替代搜索、支持 JavaScript 的浏览器或来源核验。返回内容应视为不可信输入,同时应执行网络策略,并阻止可能暴露元数据或内部服务的私有地址。

8

Memory

Best for structured persistent context结构化持久上下文首选

A Memory server can preserve entities, relationships, preferences, or decisions across sessions in a structured store. Use it only when OpenCode's existing memory model does not meet a clearly defined retention need.

Persistent context creates privacy and lifecycle obligations. Define what may be stored, who can retrieve it, how corrections work, and when records expire. Do not use memory as a silent archive of every conversation.

Memory Server 可在不同会话之间保存实体、关系、偏好或决策等结构化信息。只有当 OpenCode 现有记忆机制无法满足明确的保留需求时,才值得引入。

持久上下文会带来隐私与生命周期责任。需要明确哪些内容可保存、谁能读取、如何纠错以及何时过期;不要把记忆系统变成无提示地保存所有对话的档案库。

How to choose the right OpenCode MCP stack如何选择合适的 OpenCode MCP 组合

1. Start with the missing capability1. 从缺失能力出发

Write one representative task and identify the exact information or action OpenCode lacks.先写出一个代表性任务,再明确 OpenCode 缺少的具体信息或动作。

2. Prefer authoritative maintainers2. 优先权威维护方

Choose first-party or clearly documented servers with source, releases, and an explicit security model.优先选择第一方或文档清晰、源码与版本记录可查且安全模型明确的 Server。

3. Compare the permission surface3. 比较权限面

A read-only data tool and a browser with an authenticated session have very different failure impact.只读数据工具与持有登录会话的浏览器,在失败影响上完全不同。

4. Measure a real workflow4. 用真实流程验证

Test success, denial, bad input, timeout, and server downtime before expanding access.扩大权限前,验证成功、拒绝、错误输入、超时与 Server 宕机等路径。

Three sensible starter stacks三种实用入门组合

Workflow工作流Start with起始组合Add only if needed按需增加
Research and monitoring研究与监测QVeris + FetchPlaywright for interactive pages交互页面再加 Playwright
Software delivery软件交付GitHub + Context7Playwright for end-to-end checks端到端验证再加 Playwright
Supabase applicationSupabase 应用Supabase + Context7GitHub for issue/PR workflowsIssue/PR 流程再加 GitHub

Configure MCP servers in OpenCode safely在 OpenCode 中安全配置 MCP Server

Use OpenCode's current MCP documentation and CLI reference as the source of truth. Roll out incrementally: add one server, confirm its connection status, review the tools it exposes, and keep write-capable access behind explicit project rules and human approval.

  1. Use a local definition when OpenCode should launch a command; use a remote definition for an MCP endpoint reached by URL.
  2. Reference credentials through environment variables or the server's supported OAuth flow—never commit literal secrets.
  3. Run opencode mcp add to use the guided setup, or edit opencode.json directly.
  4. Run opencode mcp list to confirm configured servers and connection status.
  5. Use opencode mcp auth <name> for remote servers that require OAuth.
  6. Test with non-production resources and require approval for state-changing tools.

应以 OpenCode 当前的 MCP 文档和 CLI 参考为准,并采用增量上线方式:每次只添加一个 Server,确认连接状态,核对其暴露的工具,再通过项目规则和人工审批控制具备写入能力的操作。

  1. 需要由 OpenCode 启动命令时使用本地配置;通过 URL 访问 MCP 端点时使用远程配置。
  2. 凭证应通过环境变量引用,或使用 Server 支持的 OAuth 流程,绝不能把明文密钥提交到仓库。
  3. 运行 opencode mcp add 使用交互式配置,也可以直接编辑 opencode.json
  4. 运行 opencode mcp list 检查已配置的 Server 及其连接状态。
  5. 远程 Server 需要 OAuth 时,运行 opencode mcp auth <name>
  6. 先用非生产资源测试,所有会改变外部状态的工具都应经过审批。
opencode mcp add
opencode mcp list
opencode mcp auth <name>
opencode mcp debug <name>

Command behavior can change; confirm it in the 命令行为可能随版本变化,请以 current OpenCode CLI reference当前 OpenCode CLI 参考文档. 为准。

OpenCode MCP security checklistOpenCode MCP 安全检查清单

  • Verify the maintainer, repository, package name, release history, and official documentation before installation.安装前核对维护者、仓库、包名、版本记录与官方文档。
  • Pin or review versions. Convenience tags are useful for evaluation, not a complete supply-chain policy.固定或审查版本;便捷标签适合评估,但不能替代供应链策略。
  • Use per-server tool filters and prefer read-only actions with narrow resource scopes.使用按 Server 的工具过滤,并优先开放资源范围明确的只读操作。
  • Treat pages, issues, documents, database rows, and tool descriptions as untrusted content that may contain prompt injection.网页、Issue、文档、数据库记录和工具描述都可能包含提示注入,应视为不可信内容。
  • Keep secrets in approved environment or secret-reference mechanisms and redact them from logs.使用合规的环境变量或密钥引用机制保存凭证,并从日志中脱敏。
  • Separate read, write, publish, payment, deletion, and production access into distinct approval classes.将读取、写入、发布、支付、删除与生产访问划分为不同审批等级。
  • Record server identity, tool name, decision, result status, and latency without logging unnecessary personal data.记录 Server 身份、工具名、决策、结果状态与延迟,但不记录无必要的个人数据。
  • Define a disable path. One unhealthy or compromised server should be removable without breaking the entire agent.预先设计停用路径;单个异常或受损 Server 不应拖垮整个智能体。

Frequently asked questions常见问题

Does OpenCode support MCP servers?OpenCode 支持 MCP Server 吗?

Yes. OpenCode supports local servers launched by command and remote servers reached by URL. Its CLI can add and list servers, authenticate OAuth-enabled remote servers, and debug OAuth connection problems.支持。OpenCode 可以启动命令型本地 Server,也可以通过 URL 连接远程 Server。其 CLI 支持添加和查看 Server、为支持 OAuth 的远程 Server 完成认证,并调试 OAuth 连接问题。

Which MCP server should I add first to OpenCode?OpenCode 应先添加哪个 MCP Server?

Start with the smallest server that closes a recurring capability gap. Consider QVeris for current API-backed data, GitHub for repository work, or Context7 for fast-changing developer documentation. Define the task before adding a broad bundle.先选择能补齐一个重复能力缺口的最小 Server。实时 API 数据可考虑 QVeris,仓库任务可选择 GitHub,快速变化的开发文档可选择 Context7。先明确任务,再决定是否需要更广泛的组合。

How many MCP servers should OpenCode use?OpenCode 应使用多少个 MCP Server?

There is no universal limit. The stack is too large when tools overlap, selection becomes unreliable, context use and latency rise, or permissions become difficult to audit. A small project-specific set is usually easier to test and govern than a broad global stack.没有统一上限。当工具重叠、选择开始不稳定、上下文占用和延迟上升,或权限难以审计时,组合就已经过大。相比宽泛的全局配置,按项目维护一组精简 Server 通常更容易测试和治理。

Should OpenCode automatically allow MCP tools?OpenCode 是否应该自动允许 MCP 工具?

Only low-impact, narrowly scoped, well-tested tools should run without confirmation. Keep writes, publishing, purchases, deletion, credential access, and production changes behind explicit approval and project-level permission rules.只有影响低、范围窄且经过充分测试的工具,才适合免确认运行。写入、发布、购买、删除、凭证访问和生产变更都应保留明确审批,并由项目级权限规则约束。

Are MCP servers the same as OpenCode instructions?MCP Server 和 OpenCode 项目指令是一回事吗?

No. Project instructions tell OpenCode how to work, while an MCP server exposes callable tools, resources, or prompts over the protocol. They complement each other: instructions can define when and how OpenCode should use a narrowly scoped MCP tool.不是。项目指令规定 OpenCode 应如何工作;MCP Server 则通过协议暴露可调用的工具、资源或提示。两者可以配合使用,例如由项目指令规定何时以及如何调用权限范围明确的 MCP 工具。

Give OpenCode the smallest useful toolset为 OpenCode 配置精简够用的工具集

Choose one missing capability, inspect its source and permissions, test it with representative data, and expand only after the complete workflow is reliable.先确定一个缺失能力,核对来源与权限,用有代表性的数据进行测试;只有完整流程可靠后,才扩大工具范围。

OpenCode 最佳 MCP Server:数据与工具接入指南 | QVeris Guides