ranjugao55 downloadsLocal bridge for using vault notes with Codex and importing replies.
codex-bridge is a desktop-only plugin that connects your local vault to Codex. Its primary workflow is a localhost MCP endpoint that lets Codex search, read, and write notes without hardcoding a vault path. It also provides file-based bridge commands and optional AI summarization.
Tags: obsidian-plugin mcp codex local-first markdown notes ai-summary
Codex/YYYY-MM-DD.md#coding, #tiktok, #business, or #ai127.0.0.1mkdir -p "/path/to/your/vault/.obsidian/plugins/codex-bridge"
main.js
manifest.json
styles.css
Settings -> Community plugins.Codex Bridge.Expected layout:
your-vault/
.obsidian/
plugins/
codex-bridge/
main.js
manifest.json
styles.css
Open the Obsidian command palette and search for Codex Bridge.
Common commands:
Export active note context_codex_bridge/context/Create Codex request from active noteAppend latest bridge reply to active note_codex_bridge/replies/Create note from latest bridge replyOpen bridge indexAI summarize selection/current note to daily noteThe plugin can start a desktop-only local MCP HTTP server. It listens on 127.0.0.1 and requires bearer-token authorization for every /mcp request.
Recommended pairing:
obsidian-connect skill in Codex.This does not make your vault available to hosted or mobile AI clients. 127.0.0.1 is only visible on the same machine.
Enable it in Settings -> Codex Bridge:
Enable local MCP server.MCP port of 8765, unless you need another port.MCP token.Copy MCP config when a local MCP client needs setup details.Health check:
GET http://127.0.0.1:8765/health
MCP JSON-RPC endpoint:
POST http://127.0.0.1:8765/mcp
Authorization: Bearer <token>
Content-Type: application/json
Copied MCP config shape:
{
"name": "codex-bridge",
"transport": "streamable-http-json-rpc",
"endpoint": "http://127.0.0.1:8765/mcp",
"url": "http://127.0.0.1:8765/mcp",
"health": "http://127.0.0.1:8765/health",
"headers": {
"Authorization": "Bearer <token>"
},
"tools": ["search_notes", "read_note", "write_note", "append_note", "list_recent_notes", "save_chat_summary"],
"codexEnv": {
"OBSIDIAN_MCP_PORT": "8765",
"OBSIDIAN_MCP_TOKEN": "<token>"
}
}
If your MCP client only supports stdio, use the included proxy:
{
"mcpServers": {
"codex-bridge": {
"command": "node",
"args": ["/path/to/codex-bridge/codex/obsidian-mcp-proxy.js"],
"env": {
"OBSIDIAN_MCP_PORT": "8765",
"OBSIDIAN_MCP_TOKEN": "<token>"
}
}
}
}
| Tool | Purpose |
|---|---|
search_notes |
Search Markdown notes in the current vault |
read_note |
Read a note by vault-relative path |
write_note |
Create or overwrite a note |
append_note |
Append Markdown content, creating the note if needed |
list_recent_notes |
List recently modified notes |
save_chat_summary |
Append a chat summary to Codex/YYYY-MM-DD.md |
Example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_notes",
"arguments": {
"query": "obsidian",
"limit": 10
}
}
}
AI summarization is optional. You do not need an API key for local file bridge workflows or the local MCP server.
To enable summarization:
Settings -> Codex Bridge.AI API key.AI base URL, default https://api.openai.com/v1.AI model, default gpt-4o-mini.AI API mode.Recommended modes:
| Scenario | AI base URL | AI API mode |
|---|---|---|
| OpenAI-compatible provider | Provider /v1 endpoint |
Chat Completions (/chat/completions) |
| OpenAI Chat Completions | https://api.openai.com/v1 |
Chat Completions (/chat/completions) |
| OpenAI Responses API | https://api.openai.com/v1 |
Responses (/responses) |
Summary output uses:
## Question
...
## Key Takeaways
...
## Action Steps
...
## Tags
#xxx #xxx
Open Settings -> Codex Bridge, then choose English or 中文.
New installs default to English for the Obsidian community plugin directory. You can switch to Chinese at any time.
Language affects:
Command names are registered when Obsidian loads the plugin. Reload the plugin or restart Obsidian after changing language.
127.0.0.1 only./mcp requests require a bearer token.data.json, API keys, tokens, or personal vault paths.Default folder:
_codex_bridge/
context/
requests/
replies/
imported/
You can write Codex replies into replies/, then import them back into Obsidian with the plugin commands.
This repository includes the Obsidian-loadable main.js and matching main.ts source.
When changing plugin logic, update main.ts first and keep shipped main.js in sync.
Minimum Obsidian version: 1.5.0
For a release, create a GitHub Release matching manifest.json, for example 0.6.0, and upload:
main.jsmanifest.jsonstyles.cssKeep these files at repository root:
README.mdREADME_zh.mdLICENSEversions.jsonFor Codex-side usage, install the companion obsidian-connect skill. The skill uses this plugin's MCP endpoint and does not need a hardcoded vault path.