Skip to main content
Glama
Obsidian CDP MCP Server

Obsidian CDP MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OBSIDIAN_DEBUG_PORTNoObsidian debug port.9222

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
obsidian_screenshotA

Take a screenshot of the current Obsidian window. Saves to a temp file and returns the file path. Use webp format for best compression.

obsidian_consoleA

Get console output from Obsidian. Useful for debugging plugins and monitoring activity.

When to use proactively:

  • User reports plugin errors or unexpected behavior

  • After executing commands that might fail silently

  • When troubleshooting Obsidian issues

  • To check for warnings after file/plugin operations

Supports multiple filters that can be combined:

  • type: Filter by log level (log/warn/error/info/debug)

  • pattern: Regex to match message content

  • since: Only messages after this timestamp

obsidian_evalA

Execute JavaScript code in Obsidian with full API access.

WHEN TO USE:

  • Operations not covered by other tools

  • Complex queries combining multiple APIs

  • Custom automation workflows

COMMON PATTERNS:

  • Get active file: app.workspace.getActiveFile()

  • Read file: await app.vault.read(file)

  • Modify file: await app.vault.modify(file, content)

  • Get metadata: app.metadataCache.getFileCache(file)

  • Execute command: app.commands.executeCommandById('cmd-id')

  • Access plugin: app.plugins.plugins['plugin-id']

NOTE: Code runs in Obsidian's context. Use 'return' for values. Promises are auto-awaited.

obsidian_get_active_fileB

Get information about the currently active file in Obsidian.

obsidian_read_fileC

Read the content of a file from the Obsidian vault.

obsidian_write_fileC

Write or update content to a file in the Obsidian vault.

obsidian_patch_fileA

Apply partial edits to a file using search and replace. More efficient than write_file for small changes as it doesn't require sending the entire file content.

IMPORTANT: Before calling this tool, you MUST first output a diff visualization in your response to show the user what changes will be made. Use this format:

- old line to be removed
+ new line to be added

This helps the user understand the changes before they are applied.

obsidian_searchA

Search for files by path/name. Fast, exact matching.

WHEN TO USE:

  • Know exact file name: "DNS 解析.md", "202312 工单"

  • Find by path pattern: "1_projects/", "4_archives/2024"

  • Filename contains keywords: "CoreDNS", "排障记录"

WHEN NOT TO USE:

  • Search by concept/meaning → use obsidian_rag_search

  • Vague memory ("那个DNS问题") → use obsidian_rag_search

MATCHING:

  • Case-insensitive substring match on full path

  • "dns" matches "DNS解析.md", "1_projects/dns-debug/notes.md"

Returns up to 20 files by default. Use path parameter to narrow scope.

obsidian_search_foldersA

Search for folders by name/path. Fast, exact matching.

WHEN TO USE:

  • Find folder to move files into

  • Check if folder exists before creating

  • Navigate vault structure

MATCHING:

  • Case-insensitive substring match

  • "project" matches "1_projects", "old-projects/2024"

Returns up to 20 folders by default.

obsidian_rag_searchA

Semantic search for finding notes by meaning, not exact keywords.

WHEN TO USE:

  • Concept/idea search: "DNS 解析原理", "容器网络排障经验"

  • Cross-language: Chinese query finds English content

  • Vague memory: "之前遇到的超时问题"

WHEN NOT TO USE:

  • Finding specific file by name → use obsidian_search

  • Single generic term (e.g., "kubernetes", "网络") → ASK USER first

QUERY GUIDELINES:

  • Good: "CoreDNS 解析失败排查" (specific problem)

  • Bad: "DNS" (too broad, ask user to clarify)

  • Rule: If query < 4 characters or is a single common term, clarify first

RESPONSE FORMAT:

  • score: 0-100, higher = more relevant (>70 usually reliable)

  • path: file path in vault

  • title: note title

  • tags: optional, note tags

Returns top 5 results by default. Use limit parameter to adjust.

obsidian_rag_analyticsA

Get RAG search analytics data for monitoring and optimization.

Returns:

  • Search quality metrics (avg click rank, no-click rate, first-click rate)

  • Weekly trends for tracking improvement over time

  • Synonym suggestions based on user behavior

  • Low-performing queries that need optimization

Use this to:

  • Monitor search effectiveness

  • Discover missing synonyms

  • Identify queries that need improvement

Requires obsidian-long plugin with ragModule to be installed and enabled.

obsidian_list_pluginsB

List all installed plugins and their status.

obsidian_execute_commandC

Execute an Obsidian command by its ID.

obsidian_list_commandsC

List all available Obsidian commands.

obsidian_get_vault_infoB

Get information about the current Obsidian vault.

obsidian_open_fileC

Open a file in Obsidian.

obsidian_dom_queryC

Query DOM elements in Obsidian UI. Useful for inspecting UI state.

obsidian_get_backlinksB

Get all backlinks (incoming links) for a file. Returns files that link to the specified file.

obsidian_get_outlinksA

Get all outgoing links from a file. Returns files that the specified file links to.

obsidian_get_tagsA

Get all tags in the vault with their usage count, or get tags for a specific file.

obsidian_search_by_tagC

Search for files containing a specific tag.

obsidian_get_frontmatterB

Get the frontmatter (YAML metadata) of a file.

obsidian_update_frontmatterC

Update frontmatter properties of a file. Can add, modify, or delete properties.

obsidian_list_folderC

List contents of a folder in the vault.

obsidian_create_folderC

Create a new folder in the vault.

obsidian_move_fileC

Move or rename a file/folder in the vault.

obsidian_delete_fileB

Delete a file or folder (moves to system trash by default).

obsidian_get_selectionB

Get the currently selected text in the active editor.

obsidian_replace_selectionC

Replace the currently selected text in the active editor.

obsidian_insert_at_cursorB

Insert text at the current cursor position in the active editor.

obsidian_get_cursor_positionB

Get the current cursor position in the active editor.

obsidian_list_templatesB

List all available templates in the templates folder.

obsidian_apply_templateB

Apply a template to the current file or create a new file from template.

obsidian_get_all_propertiesB

Get all property names used across the vault with their types and usage count.

obsidian_resolve_linkC

Resolve a wiki link to its actual file path.

obsidian_search_community_pluginsB

Search for plugins in the Obsidian community plugin repository.

obsidian_install_pluginC

Install a plugin from the Obsidian community plugin repository.

obsidian_enable_pluginB

Enable an installed plugin.

obsidian_disable_pluginC

Disable an installed plugin.

obsidian_uninstall_pluginC

Uninstall a plugin from Obsidian.

obsidian_get_plugin_settingsC

Get the settings/configuration of an installed plugin.

obsidian_set_plugin_settingsC

Update the settings/configuration of an installed plugin.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.2/5.0

Scored across 42 tools

Disambiguation4/5

The tools are grouped by clear resources (files, folders, editor, plugins, search, UI), and descriptions explicitly distinguish search vs RAG search and write vs patch vs selection editing. A few adjacent operations (write_file/patch_file/apply_template, the several search variants) could still be confused by a hurried agent, but boundaries are mostly clear.

Naming Consistency4/5

All tools use the obsidian_ prefix and snake_case, which is highly consistent. Most names are verb_noun, but noun/action names like screenshot, console, eval, rag_analytics, and dom_query are minor deviations from a strict verb_noun pattern.

Tool Count2/5

42 tools is far above the practical range for a single MCP server and risks overwhelming an agent's tool selection. While Obsidian is broad, the surface is large enough that several tools could be consolidated or organized into narrower scopes.

Completeness4/5

Coverage is broad: file/folder CRUD, metadata/frontmatter, tags, links, templates, plugin lifecycle, commands, search/RAG, UI inspection, and a JS eval fallback are present. Minor gaps remain (e.g., setting cursor position or explicit note-level metadata operations), but most core workflows are covered.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues