QVeris
Run a task
OpenCode API GuideOpenCode API 指南

Best APIs to Use with OpenCode for AI Workflows适合 OpenCode AI 工作流的最佳 API

Compare practical APIs for OpenCode workflows by data fit, freshness, permissions, latency, and production controls.

从数据匹配度、时效、权限、延迟和生产控制等方面,对比适合 OpenCode 工作流的实用 API。

OpenCode agent hub connected through permission gates to web, documents, repositories, browser, database, files, memory, and location data
Treat each API 集成 as a capability boundary, not as a collectible integration.

The short answer: install for outcomes, not coverage

For most OpenCode projects, start with one external capability that closes a repeated workflow gap. QVeris can help discover API-backed tools; add GitHub for repository work, Brave Search for current web evidence, and Playwright for browser verification. Database, filesystem, billing, and collaboration access should remain project-specific because they expose broader data and actions.

OpenCode supports local and remote MCP servers through the mcp section of opencode.json or opencode.jsonc. MCP tools consume model context, so a smaller, task-specific set is usually easier to select, secure, and audit.

Compatibility baseline: Check the official OpenCode MCP documentation for current local and remote configuration, OAuth, tool management, and debugging behavior.
#ServerBest forTypical scopeMain caution
1QVeris API & PluginCurrent data and API toolsSelected tools/providersChoose only needed operations
2GitHub APIRepositories, issues, PRsToken and repository scopeAvoid broad write access
3Brave Search APICurrent library documentationRemote documentationConfirm library/version
4PlaywrightBrowser interaction and checksSelected sites and test environmentsProtect sessions and form submissions
5Supabase APIsSupabase project workProject and feature groupsPrefer development projects
6FilesystemBounded local documentsExplicit directoriesNever expose broad roots
7FetchSimple URL retrievalNetwork readTreat pages as untrusted
8Stripe APIsPayments and billingTest-mode billing operationsRequire approval for money movement

The 8 best API integrations for OpenCode

This ranking prioritizes practical usefulness, documented maintenance, scope control, and fit with coding workflows. It is a use-case shortlist, not a universal benchmark.

1

QVeris API & MCP

Best for unified tool discovery

Use QVeris when OpenCode needs to discover and test focused external operations without maintaining a separate adapter for every provider.

2

GitHub APIs

Best for repository workflows

Give OpenCode read access to issues, pull requests, checks, and releases first; keep merges and branch-policy changes behind approval.

3

Brave Search API

Best for current web evidence

Search helps with fast-changing documentation and error research. Treat returned pages as untrusted input and retain source URLs.

4

Playwright

Best for browser verification

Use browser automation for local UI checks and workflows that cannot be verified through an API alone.

5

Supabase APIs

Best for application data

Use narrowly scoped database and storage operations, test Row Level Security, and separate development from production credentials.

6

Google Workspace APIs

Best for documents and collaboration

Use granular OAuth scopes and require a preview before OpenCode sends mail, edits shared documents, or changes calendar state.

7

Fetch APIs

Best for bounded URL retrieval

A small fetch tool is useful for retrieving known documentation URLs. Restrict hosts, redirects, response size, and content types.

8

Stripe APIs

Best for billing workflows

Start in test mode, verify webhook signatures, use idempotency keys, and require approval for charges, refunds, and subscription changes.

Choose by the missing capability

WorkflowStart withAdd when needed
Software deliveryGitHub + Brave Search APIPlaywright for end-to-end checks
Supabase applicationSupabase + Brave Search APIGitHub for issue/PR workflows

Configure MCP tools in OpenCode safely

Use OpenCode Config as the source of truth. Add one named server under mcp, start with non-production access, confirm authentication, then control each exposed tool through the current permission rules.

  1. Use type: "local" with a command array for a local process, or type: "remote" with a URL for a remote MCP server.
  2. Reference secrets through environment variables; do not commit literal credentials.
  3. Run opencode mcp list to review configured servers and authentication status.
  4. Use opencode mcp auth <server-name> for OAuth servers; use opencode mcp debug <server-name> when remote authentication or discovery fails.
  5. Set sensitive or state-changing tool patterns to "ask" or "deny" under permission.
  6. Test with representative non-production data before expanding scopes.
opencode mcp list
opencode mcp auth <server-name>
opencode mcp debug <server-name>
opencode mcp logout <server-name>

Configuration and commands can change; confirm them in the current OpenCode MCP documentation and review the permission reference.

OpenCode MCP security checklist

  • 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.
  • Treat pages, issues, documents, database rows, and tool descriptions as untrusted content that may contain prompt injection.
  • 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.
  • Define a disable path. One unhealthy or compromised server should be removable without breaking the entire agent.

Frequently asked questions

Can OpenCode connect to external APIs?

Yes. OpenCode can use local or remote MCP servers, and developers can also create custom tools in TypeScript or JavaScript that call API clients or scripts.

Which API should I connect first?

Start with the smallest integration that closes a recurring capability gap. Consider QVeris for tool discovery, GitHub for repository work, Brave Search for current web evidence, or Playwright for browser verification.

How many external tools should OpenCode use?

There is no universal limit. Reduce the set when tools overlap, selection becomes unreliable, context use grows, or permissions become difficult to audit.

Can OpenCode auto-approve MCP tools?

OpenCode has an auto mode, but explicit deny rules still apply. For safer automation, keep sensitive and state-changing tools set to ask or deny instead of relying on unrestricted auto-approval.

Are API integrations the same as OpenCode skills?

No. A skill supplies reusable instructions, while an MCP server or custom tool exposes callable capabilities. A skill can still teach OpenCode when and how to use a narrowly scoped tool.

Give OpenCode the smallest useful toolset

Choose one missing capability, inspect its source and permissions, test it with representative data, and expand only after the complete workflow is reliable.

Best APIs to Use with OpenCode for AI Workflows | QVeris Guides