MCP Server for Obsidian for VS Code: Setup & Config
MCP Server for Obsidian connects VS Code to an Obsidian vault through the Local REST API plugin.
What you can do with MCP Server for Obsidian in VS Code
Let assistants search existing vault knowledge and write results back into structured Obsidian notes.
- Find notes mentioning a technical subject and summarize their context.
- Insert information under a heading or into frontmatter.
Before you start: MCP Server for Obsidian in VS Code
- Obsidian with the Local REST API community plugin installed, enabled, and running
- The plugin's API key
- uvx
- An MCP-compatible client
Use the plugin settings to obtain the API key. If the client cannot locate uvx, replace the command with its absolute executable path.
MCP Server for Obsidian VS Code configuration
Choose VS Code configuration scope
For MCP Server for Obsidian, open Workspace: .vscode/mcp.json. Merge into servers; preserve existing inputs.
Add MCP Server for Obsidian to VS Code
Use the mcp-obsidian entry below in servers. Keep MCP Server for Obsidian's documented stdio connection fields and your other VS Code entries.
Check MCP Server for Obsidian in VS Code
MCP Server for Obsidian: Start in VS Code’s MCP controls; inspect output and trust prompts.
Config file · Workspace: .vscode/mcp.json
{
"servers": {
"mcp-obsidian": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-obsidian"
],
"env": {
"OBSIDIAN_API_KEY": "<API key from your Obsidian Local REST API plugin>",
"OBSIDIAN_HOST": "<Obsidian API host; defaults to 127.0.0.1>",
"OBSIDIAN_PORT": "<Obsidian API port; defaults to 27124>"
}
}
}
}MCP Server for Obsidian tools available to VS Code
MCP Server for Obsidian's stored tool list documents 7 tools; compare it with VS Code's connected tool list, because the stored list is not a live check.
- list_files_in_vault
Look for list_files_in_vault among VS Code's agent-mode tools after starting MCP Server for Obsidian through the MCP controls.
- list_files_in_dir
Look for list_files_in_dir among VS Code's agent-mode tools after starting MCP Server for Obsidian through the MCP controls.
Inspect files and subdirectories within a selected vault directory.
- get_file_contents
Look for get_file_contents among VS Code's agent-mode tools after starting MCP Server for Obsidian through the MCP controls.
Read a single vault file.
- search
Look for search among VS Code's agent-mode tools after starting MCP Server for Obsidian through the MCP controls.
- patch_content
Look for patch_content among VS Code's agent-mode tools after starting MCP Server for Obsidian through the MCP controls.
Use headings, frontmatter fields, or block references to locate an insertion point in a note.
- append_content
Look for append_content among VS Code's agent-mode tools after starting MCP Server for Obsidian through the MCP controls.
Add content at the end of a new or existing note.
- delete_file
Look for delete_file among VS Code's agent-mode tools after starting MCP Server for Obsidian through the MCP controls.
Troubleshooting MCP Server for Obsidian in VS Code
- Make uvx mcp-obsidian (from uv, for Python tools) available in the workspace, container, or remote environment hosting MCP Server for Obsidian. Start through VS Code's MCP controls; inspect output and trust prompts.
- For MCP Server for Obsidian, keep OBSIDIAN_API_KEY, OBSIDIAN_HOST, OBSIDIAN_PORT out of version control; VS Code documents input variables and secret handling.
- MCP Server for Obsidian uses stdio here: VS Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
- Known limitation: Requires the Obsidian Local REST API community plugin to be running.
- Known limitation: Setup needs the plugin API key and correct connection details.
- Known limitation: Deletion tools can remove vault files or directories.
- General VS Code troubleshooting lives in the /clients/vscode guide.
MCP Server for Obsidian — details. VS Code guide