Skip to content
VS Code

Obsidian Brain for VS Code

io.github.sweir1/obsidian-brain

Obsidian MCP server: semantic search, knowledge graph, and vault editing. No plugin required.

client:VS Code transport:stdio runtime:npm

Install Obsidian Brain in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "vault-path",
      "description": "VAULT_PATH",
      "password": true
    },
    {
      "type": "promptString",
      "id": "data-dir",
      "description": "DATA_DIR",
      "password": true
    },
    {
      "type": "promptString",
      "id": "embedding-preset",
      "description": "EMBEDDING_PRESET",
      "password": true
    },
    {
      "type": "promptString",
      "id": "embedding-model",
      "description": "EMBEDDING_MODEL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "embedding-provider",
      "description": "EMBEDDING_PROVIDER",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ollama-base-url",
      "description": "OLLAMA_BASE_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ollama-embedding-dim",
      "description": "OLLAMA_EMBEDDING_DIM",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ollama-num-ctx",
      "description": "OLLAMA_NUM_CTX",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-ollama-auto-pull",
      "description": "OBSIDIAN_BRAIN_OLLAMA_AUTO_PULL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-ollama-byom-auto-pull",
      "description": "OBSIDIAN_BRAIN_OLLAMA_BYOM_AUTO_PULL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-no-watch",
      "description": "OBSIDIAN_BRAIN_NO_WATCH",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-no-catchup",
      "description": "OBSIDIAN_BRAIN_NO_CATCHUP",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-watch-debounce-ms",
      "description": "OBSIDIAN_BRAIN_WATCH_DEBOUNCE_MS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-community-debounce-ms",
      "description": "OBSIDIAN_BRAIN_COMMUNITY_DEBOUNCE_MS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-tool-timeout-ms",
      "description": "OBSIDIAN_BRAIN_TOOL_TIMEOUT_MS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-max-chunk-tokens",
      "description": "OBSIDIAN_BRAIN_MAX_CHUNK_TOKENS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-config-dir",
      "description": "OBSIDIAN_BRAIN_CONFIG_DIR",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-debug",
      "description": "OBSIDIAN_BRAIN_DEBUG",
      "password": true
    },
    {
      "type": "promptString",
      "id": "obsidian-brain-log-format",
      "description": "OBSIDIAN_BRAIN_LOG_FORMAT",
      "password": true
    }
  ],
  "servers": {
    "obsidian-brain": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "obsidian-brain"
      ],
      "env": {
        "VAULT_PATH": "${input:vault-path}",
        "DATA_DIR": "${input:data-dir}",
        "EMBEDDING_PRESET": "${input:embedding-preset}",
        "EMBEDDING_MODEL": "${input:embedding-model}",
        "EMBEDDING_PROVIDER": "${input:embedding-provider}",
        "OLLAMA_BASE_URL": "${input:ollama-base-url}",
        "OLLAMA_EMBEDDING_DIM": "${input:ollama-embedding-dim}",
        "OLLAMA_NUM_CTX": "${input:ollama-num-ctx}",
        "OBSIDIAN_BRAIN_OLLAMA_AUTO_PULL": "${input:obsidian-brain-ollama-auto-pull}",
        "OBSIDIAN_BRAIN_OLLAMA_BYOM_AUTO_PULL": "${input:obsidian-brain-ollama-byom-auto-pull}",
        "OBSIDIAN_BRAIN_NO_WATCH": "${input:obsidian-brain-no-watch}",
        "OBSIDIAN_BRAIN_NO_CATCHUP": "${input:obsidian-brain-no-catchup}",
        "OBSIDIAN_BRAIN_WATCH_DEBOUNCE_MS": "${input:obsidian-brain-watch-debounce-ms}",
        "OBSIDIAN_BRAIN_COMMUNITY_DEBOUNCE_MS": "${input:obsidian-brain-community-debounce-ms}",
        "OBSIDIAN_BRAIN_TOOL_TIMEOUT_MS": "${input:obsidian-brain-tool-timeout-ms}",
        "OBSIDIAN_BRAIN_MAX_CHUNK_TOKENS": "${input:obsidian-brain-max-chunk-tokens}",
        "OBSIDIAN_BRAIN_CONFIG_DIR": "${input:obsidian-brain-config-dir}",
        "OBSIDIAN_BRAIN_DEBUG": "${input:obsidian-brain-debug}",
        "OBSIDIAN_BRAIN_LOG_FORMAT": "${input:obsidian-brain-log-format}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

Obsidian Brain in other clients