Bunker OS uses two Model Context Protocol (MCP) servers to give OpenCode skills persistent reach beyond the in-session context window. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/SamBleed/opencode-obsidian/llms.txt
Use this file to discover all available pages before exploring further.
obsidian-vault server gives skills direct read/write access to the Obsidian vault — creating and updating wiki notes without copy-paste. The n8n-mcp server gives skills “hands” to trigger async n8n pipelines, so an agent can fire the AOC v4 Enterprise webhook or check workflow status without leaving the OpenCode session. Both servers are configured in a single JSON file on your local machine.
The Two MCP Servers
obsidian-vault
Direct read/write access to your Obsidian vault. Used by
autoresearch, wiki-ingest, wiki-query, wiki-lint, and save skills to create and update wiki notes.n8n-mcp
Connects OpenCode to the n8n instance running at
localhost:5678. Exposes n8n workflow operations as MCP tools so skills can trigger pipelines programmatically.OpenCode Config File
Both MCP servers are declared in themcp block of ~/.config/opencode/opencode.json. This file is read by OpenCode on startup and applies globally across all projects.
Valid server shapes are:
type: "local"with acommandarray — for local process servers (e.g.,uvx,npx)type: "remote"with aurl— for HTTP-based servers like n8n’s built-in MCP endpointenabled: true | false— optional flag to toggle a server without removing itheaders— allowed only fortype: "remote"oauth— allowed only fortype: "remote"
Configuring n8n MCP
Step 1: Enable MCP in n8n
In the n8n UI go to Settings → AI and enable “Enable instance-level MCP access”. This activates the/mcp-server/http endpoint at localhost:5678.
Step 2: Add the n8n-mcp block to opencode.json
The exact working configuration:Open your OpenCode config
Add the n8n-mcp server block
Merge the
n8n-mcp entry into the existing mcp block if you already have other servers configured. Do not replace the entire file.Start OpenCode and authenticate
The 401 Unauthorized response you see during the first
opencode mcp debug n8n-mcp probe is expected and does not mean the MCP is broken. OpenCode intentionally calls the server without credentials on the first probe to detect the auth flow type. The sequence is: 401 Unauthorized → OAuth redirect → success after login. The final state is what matters.Configuring obsidian-vault MCP
Theobsidian-vault MCP server gives skills direct access to vault notes. There are two options depending on whether you want to install an Obsidian plugin.
Option A — REST API (mcp-obsidian)
Requires the Local REST API community plugin installed and enabled in Obsidian. The plugin runs onhttps://127.0.0.1:27124 with a self-signed certificate.
Install the plugin:
- Obsidian → Settings → Community Plugins → Turn off Restricted Mode
- Browse → Search “Local REST API” → Install → Enable
- Settings → Local REST API → Copy the API key
obsidian-vault block to ~/.config/opencode/opencode.json:
Option B — Filesystem (MCPVault, no plugin needed)
Reads the vault directory directly from the filesystem. No Obsidian plugin required. Add theobsidian-vault block to ~/.config/opencode/opencode.json:
/absolute/path/to/your/vault with the actual path to your opencode-obsidian directory.
Both options are configured in ~/.config/opencode/opencode.json, which applies globally across all OpenCode projects on your machine.
MCP Tools Available to Skills
Onceobsidian-vault is configured, the following tools become available to all skills in OpenCode sessions:
| Tool | Purpose |
|---|---|
obsidian-vault_read_note | Read the full content of a vault note by path |
obsidian-vault_write_note | Create or overwrite a vault note |
obsidian-vault_search_notes | Full-text search across all vault notes |
obsidian-vault_patch_note | Surgical edit — append or replace under a heading |
obsidian-vault_list_directory | List notes and folders at a vault path |
obsidian-vault_update_frontmatter | Update YAML frontmatter fields without touching the body |
obsidian-vault_get_notes_info | Get metadata (frontmatter, size, dates) for one or more notes |
autoresearch to file research pages, by wiki-ingest to create entity and concept pages, and by save to persist conversation summaries — all without copy-paste.
Troubleshooting
OpenCode won’t start after editing opencode.json
Check that the config usestype: "remote" (not type: "http"). The type: "http" shape was valid in older OpenCode versions but was removed. The error message is:
"type": "http" with "type": "remote" and remove any headers block (use OAuth instead for auth).
OpenCode is stuck on startup with a WAL error
If OpenCode fails before it even reaches the MCP configuration step with a message like:n8n MCP shows 401 after authentication
The 401 on the first probe is expected (see the Note above). If you see a persistent 401 after completing the OAuth flow, re-authenticate:obsidian-vault tools not appearing in session
Confirm the server is registered and active:Related Pages
n8n Overview
Start here for n8n Docker setup before configuring the MCP bridge.
AOC Pipeline
Trigger the AOC v4 pipeline from OpenCode skills via n8n-mcp.
Dead Letter Queue
Capture errors from MCP-triggered workflow executions.