Skip to main content
Glama
MichaelAnckaert

obsidian-mcp

Obsidian MCP Server

An MCP (Model Context Protocol) server that provides access to your Obsidian vault, enabling seamless interaction with your notes, documents, and knowledge base.

Features

  • File Discovery: List all files in your Obsidian vault

  • Content Reading: Read the full content of any file in your vault

  • File Search: Find files by name or path patterns

  • Content Search: Search for text within all files in your vault

  • Safe Access: Excludes system directories like .obsidian and .git

  • Large File Handling: Automatically handles large files with size limits and content truncation

Related MCP server: Obsidian MCP Server

Tools Available

  • list_files() - Get a list of all files in your vault

  • get_file_content(file_path) - Read the content of a specific file

  • find_files(query) - Find files by name matching a query

  • find_in_all_file_content(query) - Search for text within all file contents

Installation

  1. Clone this repository:

    git clone <repository-url>
    cd obsidian-mcp
  2. Install dependencies using uv (recommended) or pip:

    # Using uv
    uv sync
    
    # Or using pip
    pip install -e .

Configuration for Claude Desktop

To use this MCP server with Claude Desktop, you need to add it to your Claude Desktop configuration file.

Windows Configuration

  1. Open your Claude Desktop configuration file at:

    %APPDATA%\Claude\claude_desktop_config.json
  2. Add the following configuration to the mcpServers section:

    {
      "mcpServers": {
        "obsidian-mcp": {
          "command": "uv",
          "args": [
            "run",
            "python",
            "C:\\path\\to\\your\\obsidian-mcp\\main.py",
            "C:\\path\\to\\your\\obsidian\\vault"
          ]
        }
      }
    }

macOS/Linux Configuration

  1. Open your Claude Desktop configuration file at:

    ~/Library/Application Support/Claude/claude_desktop_config.json  # macOS
    ~/.config/claude/claude_desktop_config.json                      # Linux
  2. Add the following configuration to the mcpServers section:

    {
      "mcpServers": {
        "obsidian-mcp": {
          "command": "uv",
          "args": [
            "run",
            "python",
            "/path/to/your/obsidian-mcp/main.py",
            "/path/to/your/obsidian/vault"
          ]
        }
      }
    }

Alternative Configuration (without uv)

If you prefer not to use uv, you can configure it to run directly with Python:

{
  "mcpServers": {
    "obsidian-mcp": {
      "command": "python",
      "args": [
        "/path/to/your/obsidian-mcp/main.py",
        "/path/to/your/obsidian/vault"
      ]
    }
  }
}

Important Notes

  • Replace /path/to/your/obsidian-mcp/main.py with the actual path to the main.py file

  • Replace /path/to/your/obsidian/vault with the actual path to your Obsidian vault directory

  • Use forward slashes (/) in paths even on Windows when using the JSON configuration

  • Restart Claude Desktop after making configuration changes

Usage

Once configured, you can ask Claude to:

  • "List all files in my Obsidian vault"

  • "Show me the content of my daily note from yesterday"

  • "Find all files related to 'project alpha'"

  • "Search for all mentions of 'TODO' in my vault"

  • "What notes do I have about machine learning?"

Claude will use the MCP server to access your vault and provide responses based on your actual notes and documents.

Security

This MCP server provides read-only access to your Obsidian vault. It cannot create, modify, or delete files. It automatically excludes system directories like .obsidian and .git from access.

Development

  • Language: Python 3.11+

  • Framework: FastMCP

  • Dependencies: See pyproject.toml

Development Setup

  1. Install development dependencies:

    uv sync --group dev
  2. Run linting:

    uv run ruff check
    uv run ruff format

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Available Tools

4 tools
find_filesA

Find files in the Obsidian Vault that match a query and return the file paths.

Args:
    query: Search term to match against file names (case-insensitive).
           Can be a partial filename, extension, or keyword.
           Examples: 'meeting', '.md', 'project-alpha'

Returns:
    List of relative file paths that match the query.
    Use these paths with get_file_content() to read the files.
    Returns message if no matches found.

Note: Searches only file names/paths, not file contents. Use find_in_all_file_content()
      to search within file contents.
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior4/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 discloses case-insensitive matching, return type (list of relative paths), the return message when no matches are found, and that it does not search file contents. This gives the agent a solid behavioral model, though it doesn't explicitly state that the operation is read-only (which is easily inferred from the search nature).

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 well-structured docstring with clear Args, Returns, and Note sections. It front-loads the main purpose in the first sentence and each subsequent line adds essential detail. The examples are useful without being excessive.

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

Completeness5/5

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

The tool is simple, and the description covers all necessary context: purpose, query semantics, return format, no-match behavior, and an explicit alternative for content searches. Even though an output schema exists, the description already provides the relevant return details, making it complete for an agent to select and invoke the tool.

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

Parameters5/5

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

The input schema only defines 'query' as a string with no explanation. The description compensates richly by explaining that it is case-insensitive, can be a partial filename, extension, or keyword, and provides concrete examples ('meeting', '.md', 'project-alpha'). This is far beyond the schema and gives the agent actionable guidance.

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

Purpose5/5

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

The description clearly states 'Find files in the Obsidian Vault that match a query and return the file paths.' This specifies the verb (find), resource (files in the Obsidian Vault), and output (file paths). It also distinguishes from sibling tools by naming find_in_all_file_content() as the alternative for content searches.

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

Usage Guidelines5/5

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

The description explicitly says 'Searches only file names/paths, not file contents. Use find_in_all_file_content() to search within file contents.' This provides a clear when-to-use/when-not-to-use rule and names the specific alternative tool, which is exactly what the dimension requires.

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

find_in_all_file_contentA

Find a query in the content of all files in the Obsidian Vault and return the file paths.

Args:
    query: Text to search for within file contents (case-insensitive).
           Can be words, phrases, or partial text.
           Examples: 'meeting notes', 'project deadline', 'TODO'

Returns:
    Newline-separated list of file paths that contain the query text.
    Only returns the file paths, not the matching content excerpts.
    Use get_file_content() on returned paths to read the full files.
    Returns message if no matches found.

Note: Searches the full text content of all readable files. Skips binary files.
      For filename searches, use find_files() instead.
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: case-insensitive search, returns newline-separated paths only (not excerpts), returns a message when no matches, searches all readable files, and skips binary files. This goes beyond a simple 'find' and sets correct expectations.

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 well-structured with clear Args, Returns, and Note sections. The first sentence gives the core purpose, and all subsequent information is necessary and directly useful. No redundant or vague wording.

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

Completeness5/5

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

For a simple one-parameter tool with no annotations, the description covers all essential aspects: what it does, how to use the parameter, return format, edge cases (no matches, binary files), and integration with sibling tools. It is complete without being verbose.

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

Parameters5/5

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

Although the schema only defines 'query' as a string with 0% coverage, the description compensates thoroughly: explains case-insensitivity, accepts words/phrases/partial text, and provides concrete examples. This adds significant meaning beyond the schema.

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

Purpose5/5

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

The description clearly states the tool finds a query in the content of all files and returns file paths. It uses a specific verb (find), defines the resource (file contents), and distinguishes itself from sibling tools like find_files (filename search) and get_file_content (reading files).

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

Usage Guidelines5/5

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

The description explicitly says 'For filename searches, use find_files() instead', providing a clear alternative. It also advises using get_file_content() on returned paths, showing how to combine tools effectively.

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

get_file_contentA

Get the content of a file in the Obsidian Vault.

Args:
    file_path: The relative file path from the vault root. Use the exact path
              format returned by list_files() or find_files().
              Examples: 'notes/meeting-notes.md', 'daily/2024-01-15.md'
              This parameter is REQUIRED - you must specify which file to read.

Returns:
    The full text content of the file, or an error message if the file
    cannot be read or doesn't exist.

Note: Only reads text files. Binary files will return an encoding error.
ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full burden and does well by disclosing that only text files are supported and binary files will return an encoding error. It also clarifies the return behavior (full text or error message), which is useful. The description does not mention any side effects or permissions, but for a read operation this is acceptable.

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

Conciseness4/5

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

The description is well-structured with Args, Returns, and Note sections. It is slightly verbose (e.g., 'This parameter is REQUIRED' is redundant with the schema), but every part adds informative value, and it remains succinct overall.

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

Completeness5/5

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

The tool has one parameter and an output schema, yet the description still explains the input format, provides examples, and notes limitations. It fully covers what the agent needs to invoke the tool correctly and interpret results.

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

Parameters5/5

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

The input schema has no description for file_path (0% coverage), but the description more than compensates by explaining it must be a relative path from the vault root, giving examples, and emphasizing it is required. This adds significant meaning beyond the schema.

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

Purpose5/5

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

The description clearly states the tool reads a file's content from the Obsidian Vault. It uses a specific verb ('Get') and resource ('file'), and the sibling tools (list_files, find_files, find_in_all_file_content) are distinct enough to avoid confusion.

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

Usage Guidelines4/5

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

It instructs users to use the exact path format returned by list_files() or find_files(), which gives clear context for how to obtain the required input. It does not explicitly say when to use this tool versus alternatives, but the purpose is so narrow that the guidance is adequate.

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

list_filesA

List all files in the Obsidian Vault and return their paths.

Returns a newline-separated list of file paths relative to the vault root.
Use these exact paths with get_file_content() to read file contents.
Excludes system directories like .obsidian.

Example return format:
notes/meeting-notes.md
projects/project-alpha.md
daily/2024-01-15.md
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does well: it discloses the output format (newline-separated list), the path relativity (relative to vault root), and the exclusion of system directories like .obsidian. It also provides a concrete example, giving clear behavioral expectations.

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 concise and well-structured: the first sentence states the core function, followed by return format details, a usage hint, an exclusion note, and an example. Every sentence contributes valuable information without unnecessary fluff.

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

Completeness5/5

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

For a simple, zero-parameter read-only listing tool, the description is complete. It explains the return format, path convention, exclusions, and how to use the output with get_file_content(). The output schema further supports completeness, but the description alone would suffice.

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 tool has zero parameters, so the baseline for this dimension is 4. The description appropriately adds no parameter details since there are none to explain, and the empty schema fully covers the parameter space.

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

Purpose5/5

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

The description states 'List all files in the Obsidian Vault and return their paths' which clearly identifies the specific verb, resource, and scope. It distinguishes from siblings like get_file_content and find_files by focusing on the full listing of files and their paths.

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

Usage Guidelines4/5

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

The description implies usage context by indicating this is the exhaustive listing tool, and it provides a follow-up instruction to use paths with get_file_content(). However, it does not explicitly mention when to use this tool instead of find_files or find_in_all_file_content, so it lacks explicit exclusion or alternative guidance.

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

TDQS

A4.5/5.0
Disambiguation4/5

Most tools are clearly distinct: list_files lists all files, find_files searches by filename, find_in_all_file_content searches content, and get_file_content reads a specific file. The only potential confusion is between list_files and find_files, but their descriptions clarify the difference.

Naming Consistency4/5

All tool names use snake_case and follow a verb_noun pattern (list_files, get_file_content, find_files). One name, find_in_all_file_content, is more verbose but still consistent in style.

Tool Count4/5

Four tools is a reasonable count for a read-only Obsidian Vault server. The scope is narrow but sufficient for listing, retrieving, and searching files.

Completeness4/5

The tool set covers the common read operations for a Vault: listing files, reading content, and searching by name or content. Missing write operations like create/update/delete, but for a read-only server the surface is functional.

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
    A
    quality
    D
    maintenance
    Enables MCP clients to interact with Obsidian vaults via filesystem operations and optional REST API integration for advanced UI commands. It features multi-vault auto-discovery, concurrent-safe file handling, and comprehensive tools for searching, reading, and managing vault content.
    12
    5,784
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Exposes an Obsidian notes vault as MCP services, enabling AI assistants to search, read, create, update, and delete notes and folders.
    22
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides Claude with read, search, and write access to an Obsidian vault through MCP tools.
    5,784
    Apache 2.0

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

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