Skip to main content
Glama
MCP server for Obsidian

MCP server for Obsidian

Obsidian용 MCP 서버

로컬 REST API 커뮤니티 플러그인을 통해 Obsidian과 상호작용하는 MCP 서버입니다.

구성 요소

도구

서버는 Obsidian과 상호 작용하기 위해 여러 도구를 구현합니다.

  • list_files_in_vault: Obsidian 볼트의 루트 디렉토리에 있는 모든 파일과 디렉토리를 나열합니다.

  • list_files_in_dir: 특정 Obsidian 디렉토리에 있는 모든 파일과 디렉토리를 나열합니다.

  • get_file_contents: 보관소에 있는 단일 파일의 내용을 반환합니다.

  • 검색: 볼트에 있는 모든 파일에서 지정된 텍스트 쿼리와 일치하는 문서를 검색합니다.

  • patch_content: 제목, 블록 참조 또는 프런트매터 필드를 기준으로 기존 노트에 콘텐츠를 삽입합니다.

  • append_content: 볼트에 있는 새 파일이나 기존 파일에 내용을 추가합니다.

  • delete_file: 보관소에서 파일이나 디렉토리를 삭제합니다.

예시 프롬프트

먼저 Claude에게 Obsidian을 사용하도록 지시하는 것이 좋습니다. 그러면 Claude가 항상 해당 도구를 호출하게 됩니다.

다음과 같은 프롬프트가 사용됩니다.

  • 마지막 아키텍처 콜 노트의 내용을 가져와 요약하세요.

  • Azure CosmosDb가 언급된 모든 파일을 검색하고 해당 파일이 언급된 맥락을 간략하게 설명해 주세요.

  • 지난 회의록을 요약해서 'summary meeting.md'라는 새 메모로 만들어 주세요. 이메일로 보낼 수 있도록 소개글을 추가해 주세요.

Related MCP server: mcp-obsidian-ek

구성

Obsidian REST API 키

Obsidian REST API 키를 사용하여 환경을 구성하는 방법에는 두 가지가 있습니다.

  1. 서버 구성에 추가(권장)

지엑스피1

  1. 작업 디렉토리에 다음의 필수 변수가 포함된 .env 파일을 만듭니다.

OBSIDIAN_API_KEY=your_api_key_here
OBSIDIAN_HOST=your_obsidian_host

참고: Obsidian 플러그인 구성에서 키를 찾을 수 있습니다.

빠른 시작

설치하다

옵시디언 REST API

Obsidian REST API 커뮤니티 플러그인을 실행해야 합니다: https://github.com/coddingtonbear/obsidian-local-rest-api

설정에서 설치하고 활성화한 후 API 키를 복사하세요.

클로드 데스크탑

MacOS의 경우: ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows의 경우: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mcp-obsidian": {
      "command": "uv",
      "args": [
        "--directory",
        "<dir_to>/mcp-obsidian",
        "run",
        "mcp-obsidian"
      ]
    }
  }
}
{
  "mcpServers": {
    "mcp-obsidian": {
      "command": "uvx",
      "args": [
        "mcp-obsidian"
      ],
      "env": {
        "OBSIDIAN_API_KEY" : "<YOUR_OBSIDIAN_API_KEY>"
      }
    }
  }
}

개발

건물

배포를 위해 패키지를 준비하려면:

  1. 종속성 동기화 및 잠금 파일 업데이트:

uv sync

디버깅

MCP 서버는 stdio를 통해 실행되므로 디버깅이 어려울 수 있습니다. 최상의 디버깅 환경을 위해서는 MCP Inspector 사용을 강력히 권장합니다.

다음 명령을 사용하여 npm 통해 MCP Inspector를 시작할 수 있습니다.

npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-obsidian run mcp-obsidian

Inspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.

다음 명령을 사용하여 서버 로그를 볼 수도 있습니다.

tail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-obsidian.log

Available Tools

13 tools
obsidian_append_contentC

Append content to a new or existing file in the vault.

Inputs: filepath (required), content (required).

obsidian_batch_get_file_contentsA

Return the contents of multiple files in your vault, concatenated with headers.

Inputs: filepaths (required).

obsidian_delete_fileC

Delete a file or directory from the vault.

Inputs: filepath (required), confirm (required).

obsidian_get_file_contentsC

Return the content of a single file in your vault.

Inputs: filepath (required).

obsidian_get_periodic_noteB

Get current periodic note for the specified period.

Inputs: period (required), type.

obsidian_get_recent_changesB

Get recently modified files in the vault.

Inputs: limit, days.

obsidian_get_recent_periodic_notesC

Get most recent periodic notes for the specified period type.

Inputs: period (required), limit, include_content.

obsidian_list_files_in_dirA

Lists all files and directories that exist in a specific Obsidian directory.

Inputs: dirpath (required).

obsidian_list_files_in_vaultA

Lists all files and directories in the root directory of your Obsidian vault.

Inputs: no named parameters.

obsidian_patch_contentA

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

Inputs: filepath (required), operation (required), target_type (required), target (required), +1 more.

obsidian_put_contentC

Create a new file in your vault or update the content of an existing one in your vault.

Inputs: filepath (required), content (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 13 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific operations like reading, writing, searching, or listing files. However, obsidian_simple_search and obsidian_complex_search could cause confusion as both handle search functionality, though their descriptions clarify different use cases (simple text vs. complex JsonLogic queries).

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with the 'obsidian_' prefix and descriptive verb_noun combinations (e.g., obsidian_get_file_contents, obsidian_list_files_in_dir). This uniformity makes the tool set predictable and easy to navigate.

    Tool Count5/5

    With 13 tools, the count is well-suited for an Obsidian vault management server. It covers a comprehensive range of operations without being overwhelming, including file CRUD, content manipulation, searching, and listing, which aligns with the domain's scope.

    Completeness5/5

    The tool set provides complete coverage for Obsidian vault operations, including CRUD (create/read/update/delete via tools like obsidian_put_content, obsidian_get_file_contents, obsidian_patch_content, obsidian_delete_file), searching (simple and complex), listing files, and handling periodic notes. No obvious gaps are present for typical agent workflows.

    Maintenance

    ActivityInactive
    ResponsivenessMostly unanswered

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server providing tools to interact with Obsidian via the Local REST API community plugin.
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for interacting with Obsidian via the Local REST API, enabling file operations, search, and content editing in your vault.
      MIT