webrouter_search and
webrouter_extract to your OpenCode agent. The recipe uses OpenCode V2,
a POSIX shell, and uv
with uvx on the OpenCode server’s PATH. uv runs WebRouter 0.17.0 with its MCP
extra and Python 3.11 or later. The server requires no WebRouter account or
provider credentials.
Set up a project
Use the example files. Putopencode.json and webrouter-mcp.sh in your project root. If the project
already has opencode.json or opencode.jsonc, merge the mcp.servers.webrouter
entry into that file.
From the project root, start a local OpenCode service and leave it running:
OPENCODE_PASSWORD to the
password printed by the service. Replace the example address below with the
loopback URL it printed:
webrouter connected. If the first check reports no servers or a
pending connection, repeat it against the same service. The first launch may
need to download Python, WebRouter, and its dependencies.
With a tool-capable model configured in OpenCode, try:
Use webrouter_search to find the official Python pathlib documentation. Then use webrouter_extract to read the current documentation page and summarize how pure paths differ from concrete paths. Include the source URL.
Credentials and scope
The launcher gives WebRouter a temporary home and a clean environment while keeping dedicated directories for uv downloads. It skips working-directory and remembered credential files and disables theload_env tool. OpenCode’s
model uses its own configuration. The example serves only search and extract.
To turn off the MCP server, set disabled: true on the mcp.servers.webrouter
entry or remove the entry. The example pins the MCP protocol to 2026-07-28
for the packaged server. OpenCode v2.4.3 was verified with real keyless calls
through the CLI on macOS arm64. See the OpenCode MCP guide
for V2 configuration details.
Back to Integrations.