@jason-gregory/sb-obsidian-mcp
v2.3.1
Published
MCP server for Obsidian — exposes a vault to AI assistants as a structured tool set. Single-file Node bundle, no build step.
Maintainers
Readme
@jason-gregory/sb-obsidian-mcp
MCP server that exposes Obsidian vaults to AI assistants as a structured set of tools. Single-file Node bundle. No build step.
Requirements
- Node.js >= 20 on
PATH - Obsidian with the Local REST API community plugin installed in each vault
- One Local REST API key per vault
Multi-brain quick start
Create a registry file, for example ~/.config/sb-obsidian-mcp/brains.yaml:
brains:
personal:
base_url: http://127.0.0.1:27123
api_key_env: OBSIDIAN_PERSONAL_API_KEY
verify_tls: false
team:
base_url: http://127.0.0.1:27125
api_key_env: OBSIDIAN_TEAM_API_KEY
verify_tls: falseCreate an env file, for example ~/.config/sb-obsidian-mcp/brains.env:
OBSIDIAN_PERSONAL_API_KEY=paste-personal-local-rest-api-key
OBSIDIAN_TEAM_API_KEY=paste-team-local-rest-api-key
OBSIDIAN_LOG_LEVEL=infoOn macOS/Linux, restrict the env file:
chmod 600 ~/.config/sb-obsidian-mcp/brains.envCopilot CLI config
Copilot CLI reads ~/.copilot/mcp-config.json on macOS/Linux and %USERPROFILE%\.copilot\mcp-config.json on Windows.
{
"mcpServers": {
"mybrain": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@jason-gregory/sb-obsidian-mcp@latest",
"--advanced",
"--multi",
"/Users/you/.config/sb-obsidian-mcp/brains.yaml",
"--env-file",
"/Users/you/.config/sb-obsidian-mcp/brains.env"
],
"env": {
"OBSIDIAN_LOG_LEVEL": "info"
},
"tools": ["*"]
}
}
}Claude Code config
Claude Code stores MCP servers in ~/.claude.json. The quickest way to register the server is the CLI (-s user makes it available in every project):
claude mcp add-json -s user mybrain '{
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@jason-gregory/sb-obsidian-mcp@latest",
"--advanced",
"--multi",
"/Users/you/.config/sb-obsidian-mcp/brains.yaml",
"--env-file",
"/Users/you/.config/sb-obsidian-mcp/brains.env"
],
"env": { "OBSIDIAN_LOG_LEVEL": "info" }
}'To scope the server to a single project instead, add a .mcp.json file at the repo root (Claude Code uses the same mcpServers key as Copilot CLI):
{
"mcpServers": {
"mybrain": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@jason-gregory/sb-obsidian-mcp@latest",
"--advanced",
"--multi",
"/Users/you/.config/sb-obsidian-mcp/brains.yaml",
"--env-file",
"/Users/you/.config/sb-obsidian-mcp/brains.env"
],
"env": {
"OBSIDIAN_LOG_LEVEL": "info"
}
}
}
}Restart Claude Code (or reload the session) after editing config, then run meta_health to confirm each brain.
VS Code config
VS Code user config is ~/Library/Application Support/Code/User/mcp.json on macOS, %APPDATA%\Code\User\mcp.json on Windows, or .vscode/mcp.json in a workspace.
{
"servers": {
"mybrain": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@jason-gregory/sb-obsidian-mcp@latest",
"--advanced",
"--multi",
"/Users/you/.config/sb-obsidian-mcp/brains.yaml",
"--env-file",
"/Users/you/.config/sb-obsidian-mcp/brains.env"
],
"env": {
"OBSIDIAN_LOG_LEVEL": "info"
}
}
}
}Use absolute paths in MCP host JSON. On Windows, forward slashes are valid in JSON paths and avoid backslash escaping issues.
Single-vault compatibility
Without --multi, the server keeps the legacy single-vault environment variables:
OBSIDIAN_API_KEYOBSIDIAN_BASE_URLOBSIDIAN_TIMEOUT_MSOBSIDIAN_VERIFY_TLS
In multi-brain mode, vault-facing tool calls require a brain argument. meta_health is brainless and reports all configured brains.
See also
Source, full docs, and the optional companion Obsidian plugin: https://github.com/jason-gregory/sb-obsidian-mcp-release
