MCP Gateway · OpenCode
Connect DeepWiki to OpenCode
OpenCode users exploring open source code can ask DeepWiki for wiki docs and answers about any public GitHub repository. The connection runs through the Speakeasy MCP Gateway, entered in OpenCode's config as a remote server, so nobody keeps a DeepWiki credential on their laptop. Prompts and tool calls are approved or denied by Speakeasy through the OpenCode plugin.
- Category
- Developer tools
- Tools
- 3
- Authentication
- None
- OpenCode
- Terminal
Behind the MCP Gateway
Run DeepWiki MCP behind the MCP Gateway
One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every DeepWiki call inspected and logged.
Set up
Add DeepWiki to OpenCode in 4 steps
- 01
Add DeepWiki from the catalog
An admin finds DeepWiki in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.
Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.
- 02
Choose who can use DeepWiki
Give teams the
mcp:connectscope on the DeepWiki server through team access or a role. OpenCode connects to the DeepWiki server's own URL, and the server's authorization decides who can connect and which tools they can call. - 03
Connect OpenCode
Add the server to OpenCode's own mcp config block as a remote server.
Copy the server's URL from its hosted install page in Speakeasy.
Add it to the
mcpblock of your OpenCode config withtypeset toremote.Restart OpenCode and sign in when prompted.
{ "mcp": { "<server slug>": { "type": "remote", "url": "<URL from the hosted install page>" } } } - 04
Sign in and use DeepWiki from OpenCode
The first time OpenCode connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.
From then on, DeepWiki's tools appear in OpenCode, limited to what the person's access allows, and every call lands in the gateway's tool logs.
OpenCode doesn't receive MCP servers from plugins. The observability package is installed separately, from a ZIP or with speakeasy-hooks install --provider=opencode, and the device agent can maintain it.
Use cases
What OpenCode users do with DeepWiki
Get oriented after cloning a project
After cloning a public project, OpenCode reads its DeepWiki topics and overview pages so you start with a map of the codebase.
Ask about a command-line tool you use
Ask how a CLI tool you rely on reads its config, and OpenCode answers from DeepWiki without you searching through its source.
Point a bug report to the right place
Hit a bug in an open source dependency? OpenCode asks DeepWiki which part of the repository owns that behavior, so your issue report names the right area.
Tools
3 tools
Each DeepWiki tool can be allowed or denied per team and role at the MCP Gateway before OpenCode sees it.
read_wiki_structure
Get a list of documentation topics for a GitHub repository.
read_wiki_contents
View documentation about a GitHub repository.
ask_question
Ask any question about a GitHub repository and get an AI-powered, context-grounded response.
Control
What Speakeasy can see and stop in OpenCode
The gateway covers every client the same way. The rest depends on what OpenCode exposes to Speakeasy.
Tool logs
Gateway
Every DeepWiki call is logged with the person and the client that made it.
Access by role
Gateway
People reach only the DeepWiki tools their team or role allows.
Request and response blocking
Gateway
A risk policy scoped to DeepWiki can reject a tool request before it reaches the server, or withhold a result from OpenCode. MCP-scoped policies are enabled per organization.
Prompt and tool-call blocking
OpenCode
The OpenCode plugin sends each prompt and tool call to Speakeasy, which allows or denies it before it runs.
Usage telemetry
OpenCode
Token and cost totals flow through the plugin, reported per turn.
Device agent
OpenCode
The device agent installs and maintains the observability package.
- OpenCode has no OpenTelemetry exporter, so session data comes through the plugin.
- Tool output is blocked at the gateway rather than in OpenCode's hooks.
Questions
Frequently asked questions
How does the observability package reach OpenCode?
Can DeepWiki answers be blocked in OpenCode?
How do OpenCode users get DeepWiki?
Are DeepWiki calls from OpenCode logged?
Connect more