A2RG Obsidian MCP
Provides tools for interacting with an Obsidian vault, including reading, writing, appending, deleting, searching, and listing Markdown files, resolving linked notes, and retrieving the active file through the Obsidian plugin bridge or filesystem fallback.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
A2RG MCP Bridge
A2RG MCP Bridge connects MCP clients to an open Obsidian vault through a local desktop plugin. It exposes eight vault tools through Streamable HTTP MCP and keeps an optional Bun stdio process for filesystem fallback.
Current release: 1.0.12.
Components
Obsidian plugin
mcp-vault-connector: reads and writes the active vault through Obsidian APIs and exposes a loopback HTTP or HTTPS server.MCP executable
dist/a2rg-obsidian-mcp: optional stdio fallback for filesystem access when Obsidian or the plugin bridge is unavailable.Public npm package
@a2rg/obsidian-mcp: Node stdio executable for plugin-first access and automatic filesystem fallback.Shared tool registry: the plugin and stdio executable expose the same eight tools and argument schemas.
Related MCP server: obsidian-cli-mcp
Architecture
MCP client
-> Streamable HTTP /mcp
-> authenticated local plugin bridge
-> App.vault / App.metadataCache / App.workspaceLocal HTTPS is the default. Plain HTTP is blocked unless explicitly enabled for trusted loopback testing.
Quick start
Install dependencies and build:
npm install npm run buildCopy
manifest.jsonandmain.jsinto:<vault>/.obsidian/plugins/mcp-vault-connector/Enable A2RG MCP Bridge in Obsidian Community Plugins.
In plugin settings:
Enable the bridge.
Keep port
27125unless a conflict requires another port.Keep local HTTPS enabled and trust the generated certificate.
Copy the 64-character bearer token.
Configure the MCP client:
{ "mcpServers": { "obsidian": { "type": "http", "url": "https://127.0.0.1:27125/mcp", "headers": { "Authorization": "Bearer <64-character-plugin-token>" } } } }
Direct HTTPS uses https://127.0.0.1:27125/mcp. Trust the plugin certificate
before connecting. The certificate and private key persist across Obsidian
reloads and restarts. Use Regenerate local TLS certificate in plugin
settings only when you intentionally replace that identity.
Direct HTTPS MCP does not require OBSIDIAN_VAULT_PATH, OBSIDIAN_CONFIG_DIR,
OBSIDIAN_API_KEY, OBSIDIAN_API_URL, a command, or an executable path.
The provider needs only the MCP URL and the bearer token.
Network and privacy disclosure
The plugin starts a server only on 127.0.0.1 (localhost). It does not expose
the vault to the public internet, send vault content to a remote service,
collect telemetry, or include dynamic advertising.
The plugin enumerates vault file paths only to implement list_files and
search_vault. It returns relative paths and matching snippets after bearer
authentication, skips hidden directories and symlinks, and rejects absolute or
traversal paths.
Every /mcp and REST request requires a generated bearer token. HTTP requires
an explicit testing-only opt-in; HTTPS is recommended. The optional npm
stdio package can access only the discovered local vault when the bridge is
unavailable, and does not provide a public network endpoint.
Verify
curl --fail --silent \
--cacert /absolute/path/to/localhost.pem \
-H "Authorization: Bearer <64-character-plugin-token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
--data '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' \
https://127.0.0.1:27125/mcpThe server exposes:
get_filewrite_fileappend_filedelete_filesearch_vaultget_linked_noteslist_filesget_active_file
Requirements
Obsidian Desktop 1.14.4 or later.
Node.js 22 or later for source builds.
npm.
A local Markdown vault.
An MCP client with Streamable HTTP support.
Optional stdio fallback
The stdio executable remains available when Obsidian or the plugin bridge is unavailable. It can discover the vault and plugin settings automatically. Environment variables remain available for overrides.
Run the public npm package without a global install:
npx -y @a2rg/obsidian-mcpOr install it with npm/pnpm:
npm install -g @a2rg/obsidian-mcp
# or
pnpm add -g @a2rg/obsidian-mcpWith pnpm without a global install:
pnpm dlx @a2rg/obsidian-mcp --discover
pnpm dlx @a2rg/obsidian-mcpDiscovery can be checked without starting MCP:
npx -y @a2rg/obsidian-mcp --discoverThe package:
Tries plugin HTTP/HTTPS REST first.
Uses the Obsidian vault filesystem if the bridge is unavailable.
Avoids filesystem fallback after definite
4xx/5xxresponses.Avoids filesystem writes after ambiguous REST write, append, or delete operations.
See npm and pnpm Package for MCP client configuration, auto-discovery, CLI flags, cache behavior, and publication.
Documentation
Development
npm test
npm run dev:mcp
npm run dev:plugin
npm run build:npm
npm run buildRun synthetic search benchmarks:
npm run benchmark:search -- 1000
npm run benchmark:search -- 10000
npm run benchmark:search -- 100000Search benchmark
The reproducible synthetic benchmark uses 10 relevance sets, known expected documents, and the same BM25 implementation used by the plugin and npm package.
Scale | Initial indexing | Cold query | Warm query | Incremental 1000 | Heap / RSS |
1,000 documents | 166.8 ms | 4.885 ms | 3.959 ms | 112.1 ms | 17.7 MB / 85.9 MB |
10,000 documents | 806 ms | 217.063 ms | 225.786 ms | 83.3 ms | 74.3 MB / 171.5 MB |
100,000 documents | 9.502 s | 145.967 ms | 130.562 ms | 113.2 ms | 354.3 MB / 764.4 MB |
Measured metrics:
MRR@10:
1.0Recall@10:
1.0Recall@100:
1.0Gzip snapshot:
4.668 MBTest suite:
29tests passing
The benchmark proves indexed-search behavior and incremental updates, not semantic similarity from embeddings. It is useful for comparing future search implementations against a reproducible baseline.
Field-aware BM25 weights title/H1, headings, tags, and frontmatter above unstructured content while preserving exact and filename matches.
npm test runs the Bun test suite. npm run build type-checks both targets,
bundles main.js, and compiles dist/a2rg-obsidian-mcp.
Release
Plugin releases use .github/workflows/release.yml.
Update
manifest.json,package.json,package-lock.json, andversions.jsonto the same version.Run
npm testandnpm run build.Commit and push the source changes.
Create and push a tag that exactly matches
manifest.json.version; do not prefix it withv.Publish the GitHub draft release with
main.jsandmanifest.json.Submit or refresh the Obsidian community review.
Run or trigger
.github/workflows/npm-publish.ymlto publish the npm CLI.
Security boundary
The plugin binds only to
127.0.0.1.Every
/mcpand REST request requires the bearer token.Relative vault paths are validated.
Absolute paths and
./..path segments are rejected.Request bodies are capped at 5 MB.
HTTP is limited to local testing.
HTTPS uses a generated self-signed certificate that clients must trust.
The stdio fallback does not replace authentication for a public service.
Read Security and Public Deployment before changing this local-only deployment model.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search, read, and safely update Markdown notes in your connected Phasoric knowledge vaults.
Notes, files, GitHub, and Drive through one MCP connection.
Notes, files, GitHub, and Drive through one MCP connection.
Notes, files, GitHub, and Drive through one MCP connection.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables MCP clients to interact with Obsidian vaults via filesystem operations and optional REST API integration for advanced UI commands. It features multi-vault auto-discovery, concurrent-safe file handling, and comprehensive tools for searching, reading, and managing vault content.123,971 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to interact with an Obsidian vault through the official Obsidian CLI, supporting search, notes, tasks, files, links, and native Canvas operations while the Obsidian desktop app is running.60 npmMIT
- AlicenseAqualityBmaintenanceEnables MCP clients to safely read, search, create, edit, delete, and move notes in an Obsidian vault, with automatic link repair and reversible deletes.103,487 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to search, read, list, and append to markdown notes in a local Obsidian vault or folder of .md files.-