Skip to main content
Glama
takuya0206

Obsidian MCP

by takuya0206

Obsidian MCP (Model Context Protocol)

Obsidian MCP is a tool that allows you to interact with your Obsidian vault using the Model Context Protocol. This enables AI assistants to read, write, and manipulate notes in your Obsidian vault through a standardized interface.

Prerequisites

  • Node.js 18 or higher

  • Obsidian with Local REST API plugin installed and configured

  • API key generated from the Local REST API plugin

Related MCP server: Obsidian MCP Server Plugin

Setting MCP Server (e.g. Claude Desktop App)

  1. Clone this repository

  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build
  4. Configure Claude Desktop App to use this MCP server:

    {
       "mcpServers": {
         "Obsidian": {
           "command": "node",
           "args": ["/Users/<Your Own Path>/obsisian-mcp/build/index.js"],
           "env": {
             "apiKey": "<Your API Token>",
             "port": "27123",
             "host": "127.0.0.1"
           }
         }
       }
     }

Development

Create .env and configure "apiKey", "port", and "host" as mentioned above.

Available Tools

The following tools are implemented:

  1. readNote - Read the contents of a specific note

    {
      "path": "path/to/note.md"
    }
  2. readActiveNote - Read the contents of the current active note

    {}
  3. listNotes - Recursively lists files and folders in the entire Vault or under a specified folder

    {
      "path": "optional/folder/path"
    }
  4. patchNote - Inserts content into an existing note relative to a heading, block reference, or frontmatter field

    {
      "path": "path/to/note.md",
      "operation": "append|prepend|replace",
      "targetType": "heading|block|frontmatter",
      "target": "target_identifier",
      "content": "content to insert"
    }
  5. searchWithJsonLogic - Search Obsidian notes using JsonLogic format queries

    {
      "query": {
        // JsonLogic query object
      }
    }

Available Tools

5 tools
listNotesA

Recursively lists files and folders in the entire Vault or under a specified folder and returns the result as a tree-format string

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNoOptional folder path to list notes from

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: recursive listing, scope (entire Vault or specific folder), and output format (tree-format string). However, it lacks details on permissions, rate limits, pagination, or error handling. For a read-only listing tool, this is adequate but not comprehensive, as it misses operational constraints that could affect agent decisions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that efficiently conveys the tool's action, scope, and output. It is front-loaded with the core functionality and avoids unnecessary details. Every part of the sentence adds value, making it highly concise and easy to parse for an AI agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (recursive listing with one optional parameter), no annotations, and no output schema, the description is partially complete. It covers the basic operation and output format but omits details like return structure examples, error cases, or performance implications. For a tool without structured output documentation, more context on what the 'tree-format string' entails would improve completeness, but it meets minimum viability.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'path' parameter documented as 'Optional folder path to list notes from.' The description adds marginal value by clarifying that listing can be 'under a specified folder,' reinforcing the parameter's purpose. Since schema coverage is high, the baseline is 3, and the description does not significantly enhance parameter understanding beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Recursively lists files and folders' with the resource being 'the entire Vault or under a specified folder.' It uses specific verbs ('lists,' 'returns') and identifies the output format ('tree-format string'). However, it does not explicitly differentiate from sibling tools like 'searchWithJsonLogic,' which might also involve listing but with filtering, so it misses full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning it can list 'the entire Vault or under a specified folder,' suggesting when to use the optional 'path' parameter. However, it does not provide explicit guidance on when to use this tool versus alternatives like 'searchWithJsonLogic' for filtered searches or 'readNote' for individual file access. No exclusions or prerequisites are stated, leaving usage context partially inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

patchNoteC

Inserts content into an existing note relative to a heading, block reference, or frontmatter field.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
operationYesOperation to perform (append, prepend, or replace)
targetTypeYesType of target to patch (heading, block, or frontmatter)
targetYesTarget identifier - For heading: Use a heading path string. For nested headings, use '::' as a delimiter (e.g., '## Heading 1 ### Subheading 1' must be 'Heading 1::Subheading 1'). The path should match the exact heading text. For headings with special characters, use URL encoding. - For block: Use the block ID (e.g., '2d9b4a'). - For frontmatter: Use the frontmatter field name (e.g., 'tags', 'date', 'title').
contentYesContent to be inserted or used for replacement
targetDelimiterNo
trimTargetWhitespaceNo
contentTypeNo

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but lacks critical behavioral details. It states 'inserts content' implying mutation, but doesn't disclose permissions needed, whether changes are reversible, error handling, or rate limits. The description is minimal and misses key operational context for a tool with 8 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without redundancy. Every word contributes to understanding the tool's function, making it appropriately sized for its complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 8 parameters, 50% schema coverage, no annotations, and no output schema, the description is inadequate. It lacks details on behavioral traits, error cases, return values, and doesn't fully address parameter semantics. The agent would struggle to use this tool correctly without additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50%, with detailed descriptions for 'target' and 'content' but none for 'targetDelimiter', 'trimTargetWhitespace', or 'contentType'. The description mentions 'heading, block reference, or frontmatter field' which aligns with targetType enum values, adding slight context. However, it doesn't explain parameter interactions or compensate for the low coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('inserts content') and target ('existing note'), specifying the insertion points ('relative to a heading, block reference, or frontmatter field'). It distinguishes from sibling tools like 'listNotes' or 'readNote' by focusing on modification rather than retrieval, though it doesn't explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'searchWithJsonLogic' or 'readActiveNote'. It mentions the insertion points but doesn't specify scenarios, prerequisites, or exclusions, leaving the agent to infer usage from the operation and targetType parameters alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

readActiveNoteB

Read the contents of the current active note

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a read operation but doesn't clarify what 'active note' means, whether it returns structured data or plain text, or if there are any side effects. This leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'active note' entails, what format the contents are returned in, or how this differs from sibling tools. For a tool with no structured data to rely on, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a baseline score of 4 for not adding unnecessary information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Read') and resource ('contents of the current active note'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'readNote' or 'listNotes', which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'readNote' or 'listNotes'. It doesn't specify prerequisites (e.g., whether a note must be actively open) or contextual constraints, leaving usage ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

readNoteC

Read the contents of a specific note

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Read' implies a read-only operation, it doesn't specify what 'contents' includes (e.g., text, metadata, formatting), error handling (e.g., what happens if the note doesn't exist), or any constraints like rate limits or authentication needs. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single, direct sentence that states the core function without any unnecessary words. It's front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations, 0% schema description coverage, and no output schema, the description is incomplete. It doesn't address what the tool returns (e.g., note content format), error conditions, or how it differs from siblings like 'readActiveNote'. For a tool with one parameter and no structured documentation, more context is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It mentions 'a specific note' but doesn't explain what the 'path' parameter represents (e.g., file path, note ID, URL format) or provide any examples. This adds minimal value beyond what's inferred from the tool name, failing to adequately document the single required parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Read') and resource ('contents of a specific note'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'readActiveNote' or 'listNotes', which would require specifying what makes this tool distinct from those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'readActiveNote' or 'listNotes'. It doesn't mention prerequisites, context, or any explicit when/when-not scenarios, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

searchWithJsonLogicB

Search Obsidian notes using JsonLogic format queries. Using logical conditions expressed in JSON, you can flexibly filter note metadata and content. Suitable for programmatically generated searches, allowing complex conditions to be expressed in a structured way.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesJsonLogic query object. Express logical conditions in JSON format for advanced note searching. Basic Concept: JsonLogic is a specification for expressing logical conditions in JSON format. Each condition is expressed in the form {"operator": [arg1, arg2, ...]}. In Obsidian search, you can specify conditions for note metadata fields. Main Operators: 1. Common comparison operators: - "==", "===": Equality (e.g., {"==": [{"var": "rating"}, 5]}) - "!=", "!==": Inequality - ">", ">=", "<", "<=": Magnitude comparison 2. Logical operators: - "and": All conditions are true (e.g., {"and": [condition1, condition2]}) - "or": At least one condition is true - "!": Negation of a condition 3. Obsidian-specific operators: - "glob": Glob pattern matching (e.g., {"glob": [{"var": "file.path"}, "*.md"]}) - "regexp": Regular expression matching (e.g., {"regexp": ["^task.*", {"var": "file.name"}]}) 4. Data access: - "var": Get the value of a field (e.g., {"var": "frontmatter.tags"}) Basic Structure: { "operator": [ {"var": "field name"}, comparison value ] } Or compound conditions: { "and/or": [ {condition1}, {condition2}, ... ] } Usage Examples: 1. Search for notes with a specific tag: { "in": ["project", {"var": "tags"}] } 2. Search for notes where a specific frontmatter field equals a specific value: { "==": [{"var": "frontmatter.status"}, "in progress"] } 3. Search for notes with a specific URL pattern: { "glob": [{"var": "frontmatter.url"}, "https://example.com/*"] } 4. Combination of multiple conditions - notes with a specific tag and due date before today: { "and": [ {"in": ["task", {"var": "tags"}]}, {"<=": [{"var": "frontmatter.due"}, "2023-12-31"]} ] } 5. Complex example - notes in a specific folder and having a specific status or matching a specific URL pattern: { "and": [ {"glob": [{"var": "file.path"}, "projects/*"]}, {"or": [ {"==": [{"var": "frontmatter.status"}, "important"]}, {"glob": [{"var": "frontmatter.url"}, "https://github.com/*"]} ]} ] } Notes: - Field names specified with "var" must match the actual metadata structure of notes - If a field doesn't exist, the condition is not ignored but evaluated as false - Date comparisons are treated as strings, so using ISO format (YYYY-MM-DD) is safest - File properties include file.path, file.name, file.size, file.ctime, file.mtime, etc. - Frontmatter fields can be accessed with frontmatter.fieldname - The "in" operator is useful for array-type fields (such as tags)

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool is for 'searching' but doesn't clarify if it's read-only, what permissions are needed, how results are returned (e.g., pagination, format), or any rate limits. The description focuses on query syntax rather than operational behavior, leaving significant gaps for an agent to understand how to invoke it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences long and front-loaded with the core purpose. However, the second sentence ('Using logical conditions expressed in JSON, you can flexibly filter note metadata and content.') is somewhat redundant with the first, and the third sentence ('Suitable for programmatically generated searches, allowing complex conditions to be expressed in a structured way.') could be integrated more tightly. It's not overly verbose but could be more streamlined.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a search tool with no annotations and no output schema, the description is incomplete. It explains the query format well via the schema but lacks details on behavioral aspects like result format, error handling, or usage limits. For a tool that likely returns a list of notes, the absence of output schema means the description should compensate more, which it doesn't fully do.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the 'query' parameter fully documented in the input schema. The description adds minimal value beyond the schema by reiterating that queries use 'JsonLogic format' and are for 'advanced note searching.' However, since there's only one parameter and the schema covers it comprehensively, the baseline is high, and the description doesn't detract from that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search Obsidian notes using JsonLogic format queries.' It specifies the verb ('search'), resource ('Obsidian notes'), and method ('JsonLogic format queries'). However, it doesn't explicitly differentiate from sibling tools like listNotes or readNote, which might also retrieve notes but with different approaches.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage guidance: 'Suitable for programmatically generated searches, allowing complex conditions to be expressed in a structured way.' This suggests when to use this tool (for complex, structured searches) but doesn't explicitly state when to choose it over alternatives like listNotes or readNote, nor does it mention any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • ChangedreadActiveNote1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  2. 5 tool updates
    • First observedlistNotes
    • First observedpatchNote
    • First observedreadActiveNote
    • First observedreadNote
    • First observedsearchWithJsonLogic

TDQS

B3.1/5.0
Disambiguation4/5

Most tools have distinct purposes: listNotes for browsing, readNote/readActiveNote for reading, patchNote for editing, and searchWithJsonLogic for querying. However, readNote and readActiveNote could potentially be confused as they both read notes, though one targets a specific note and the other the active note, which is clarified in their descriptions.

Naming Consistency3/5

The naming is mixed: listNotes, readNote, and searchWithJsonLogic follow a verb_noun pattern, but patchNote uses a verb_noun format with a different verb style, and readActiveNote includes an adjective, breaking consistency. While readable, it lacks a uniform convention across all tools.

Tool Count4/5

With 5 tools, the count is reasonable for an Obsidian vault management server, covering core operations like listing, reading, editing, and searching notes. It's slightly lean but functional, as it includes essential CRUD-like actions without being overwhelming.

Completeness3/5

The tool set covers reading, editing, listing, and searching notes, but lacks explicit create and delete operations for notes, which are common in file-based systems. This creates gaps in full lifecycle management, though patchNote can modify existing notes and agents might work around missing create/delete by other means.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Turns an Obsidian vault into a local Model Context Protocol server that allows AI tools to directly read, search, and write to your notes. It features folder-level access control and a built-in dashboard for easy integration with tools like Claude Desktop and Cursor.
    5,784
    2
    Apache 2.0
  • A
    license
    A
    quality
    F
    maintenance
    A Model Context Protocol (MCP) server that provides AI assistants with secure access to Obsidian vaults. Enables reading, writing, searching, and managing notes without requiring Obsidian to be running.
    50
    5,784
    Apache 2.0
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server that provides tools and resources for AI models to interact with an Obsidian vault, enabling file operations, search, and management via the Model Context Protocol.
    2
    -

Latest Blog Posts

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/takuya0206/obsidian-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server