Obsidian Native MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_DEADLINE_MS | No | Wall-clock time limit in milliseconds for long-walk tools (0 = no limit). | 0 |
| MCP_MAX_BULK_OPS | No | Maximum operations accepted by a single bulk.apply call (0 = unlimited). | 0 |
| MCP_MAX_BYTES_READ | No | Maximum raw bytes of file content read per call (0 = unlimited). | 0 |
| OBSIDIAN_VAULT_PATHS | Yes | Path(s) to Obsidian vaults, semicolon-separated for multiple vaults. | |
| MCP_MAX_FILES_SCANNED | No | Maximum number of .md files scanned per search.content/vault.info call (0 = unlimited). | 0 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| vault.listA | List all configured vaults by name. |
| vault.infoC | Get statistics for a single vault. |
| file.listC | List files/directories in the vault, optionally recursively, with optional glob filter. |
| file.findC | Find files by name (exact / substring / glob / regex). |
| file.readA | Read a file's full content. Returns content + content_hash + totalLines so subsequent surgical edits can use the hash as a precondition. |
| file.read_rangeA | Read a line range from a file (1-based, inclusive). Returns the slice + rangeHash + contentHash for surgical follow-ups. |
| outlineA | Return the heading tree of a markdown file. Each entry includes path, level, line, end_line, section_hash, children_count, and (when applicable) duplicate_of[]. Use this to navigate large notes without reading them. |
| heading.findA | Find headings by leaf text OR by full Parent::Child::Leaf path. Returns ALL matches; surgical-edit tools require disambiguation when count > 1. |
| block.findB | Find a block-reference (^id) in a file. Returns line/structuralType/blockHash so block.replace can be called with the precondition. |
| frontmatter.getB | Read the frontmatter (or a nested key via dot-notation) from a markdown file. |
| tags.listB | List tags found in a single file (when 'file' is supplied) or aggregated across the vault. |
| links.getA | Return outlinks (from the given file) and/or backlinks (vault-wide search for refs targeting the file's basename). |
| metadata.readA | Read structural metadata for a file: frontmatter, headings, tags, link counts, total lines, content_hash. |
| search.contentA | Substring search across markdown files. Returns hits with surrounding context and per-line hashes (each hit can be surgically rewritten with str_replace). |
| file.diffB | (planned) Diff a file against a prior content_hash. Stubbed for v1.0 — requires history cache; returns NOT_FOUND until enabled. |
| str_replaceA | Surgical edit: replace a literal substring in a file. Default occurrence='unique' (errors on >1 match). Tiny payload in/out; preferred over file.replace for any edit smaller than the whole file. |
| apply_patchA | Apply a unified diff to a file. Context lines (' ' prefix) are validated verbatim per hunk — the diff IS the content precondition. expected_content_hash is optional belt-and-suspenders. Use this for multi-hunk surgical edits. |
| apply_editsA | Apply a batch of str_replace edits to a single file in one round-trip. Edits applied in order against the running in-memory text; atomic (rolled back in memory if any edit fails). |
| heading.replace_bodyA | Replace the BODY beneath a heading (not the heading line itself). Errors if heading missing or path is ambiguous. Requires expected_section_hash from heading.find/outline. |
| heading.renameA | Rename a heading's text in place. Errors on missing/duplicate. Preserves heading level. Does NOT update backlinks (use bulk.apply for that). |
| block.replaceA | Replace the structural block referenced by ^id (paragraph/list-item/table-row/etc.) preserving the ^id marker. Requires expected_block_hash from block.find. |
| block.renameB | Rename a block reference (^old → ^new) on the same line, preserving line content. |
| frontmatter.setA | Set a (possibly nested via dot-notation) key in the file's frontmatter. Creates the frontmatter block if absent. Requires expected_frontmatter_hash unless file has no frontmatter yet. |
| frontmatter.deleteA | Delete a (possibly nested) key from the file's frontmatter. No-op if key absent. Requires expected_frontmatter_hash when frontmatter exists. |
| lines.replaceB | Replace a contiguous line range (1-based, inclusive). Requires expected_range_hash returned by file.read_range or outline (section_hash). |
| lines.insertA | Insert content before line N (1-based). Use line=totalLines+1 to append. No hash precondition required. |
| file.createA | Create a NEW file with the given content. Errors if the file already exists; use file.replace for overwrite. |
| file.replaceA | HEAVY: replace the entire content of a file. Prefer str_replace / apply_patch / heading.replace_body / block.replace / frontmatter.set / lines.replace for surgical edits. Requires expected_content_hash unless create_if_missing is true and the file does not exist. |
| file.appendA | Append text to a file (creating it if missing). Cheap: no read of existing content required. |
| file.moveA | Move or rename a file. Defaults to on_conflict='error' — never silently overwrites. |
| file.deleteA | Delete a file. Default trash=true → moved to /.obsidian/trash. Hard delete (trash=false) requires expected_content_hash. |
| bulk.applyA | Execute a batch of write operations. With atomic=true (default), all ops are first validated in dry-run mode against in-memory snapshots; the actual writes happen only if every op would succeed. If any post-validation write fails, best-effort restore is attempted. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/usrivastava92/obsidian-native-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server