
markuspfundstein/mcp-obsidian
Productivity workflow이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Obsidian REST API 커뮤니티 플러그인을 통해 Obsidian과 상호작용하는 MCP 서버
개요
MCP 서버는 로컬 REST API 커뮤니티 플러그인을 통해 Obsidian과 상호작용할 수 있습니다. 서버는 옵시디언과 상호작용하기 위한 여러 도구를 구현합니다: - list_files_in_vault: Obsidian 금고의 루트 디렉터리에 있는 모든 파일과 디렉터리를 나열함 - list_files_in_dir: 특정 Obsidian 디렉터리의 모든 파일과 디렉터리를 나열함 - get_file_contents: 금고 내 단일 파일의 내용을 반환함. - 검색: 금고 내 모든 파일에 걸쳐 지정된 텍스트 쿼리와 일치하는 문서를 검색함 - patch_content: 제목, 블록 참조 또는 프론트매터 필드에 대해 기존 노트에 내용을 삽입함. - append_content: 금고 내 새 파일이나 기존 파일에 내용을 추가함. - delete_file: 금고에서 파일이나 디렉터리를 삭제함. 먼저 Claude에게 Obsidian을 사용하라고 지시하는 것이 좋습니다. 그러면 항상 도구를 호출합니다.
개요(AI 번역)
MCP 서버는 로컬 REST API 커뮤니티 플러그인을 통해 Obsidian과 상호작용할 수 있습니다.
구성 요소
도구
서버는 옵시디언과 상호작용하기 위한 여러 도구를 구현합니다:
- list_files_in_vault: Obsidian 금고의 루트 디렉터리에 있는 모든 파일과 디렉터리를 나열합니다
- list_files_in_dir: 특정 Obsidian 디렉터리에 있는 모든 파일과 디렉터리를 나열합니다.
- get_file_contents: 금고 내 단일 파일의 내용을 반환합니다.
- 검색: 금고 내 모든 파일에서 지정된 텍스트 쿼리와 일치하는 문서를 검색합니다
- patch_content: 제목, 블록 참조 또는 프론트매터 필드에 대해 기존 노트에 내용을 삽입합니다.
- append_content: 금고 내 새 파일이나 기존 파일에 내용을 추가합니다.
- delete_file: 금고에서 파일이나 디렉터리를 삭제합니다.
예시 프롬프트
먼저 Claude에게 Obsidian을 사용하라고 지시하는 것이 좋습니다. 그러면 항상 도구를 호출합니다.
사용 프롬프트는 다음과 같습니다:
- 마지막 아키텍처 콜 노트의 내용을 받아 요약하기
- Azure CosmosDb가 언급된 모든 파일을 검색하고, 그 문맥이 어떻게 나왔는지 간단히 설명해 주세요
- 최근 회의 기록을 요약하여 새 메모 '요약 meeting.md’에 작성합니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
MCP server for Obsidian
MCP server to interact with Obsidian via the Local REST API community plugin.
Components
Tools
The server implements multiple tools to interact with Obsidian:
- list_files_in_vault: Lists all files and directories in the root directory of your Obsidian vault
- list_files_in_dir: Lists all files and directories in a specific Obsidian directory
- get_file_contents: Return the content of a single file in your vault.
- search: Search for documents matching a specified text query across all files in the vault
- patch_content: Insert content into an existing note relative to a heading, block reference, or frontmatter field.
- append_content: Append content to a new or existing file in the vault.
- delete_file: Delete a file or directory from your vault.
Example prompts
Its good to first instruct Claude to use Obsidian. Then it will always call the tool.
The use prompts like this:
- Get the contents of the last architecture call note and summarize them
- Search for all files where Azure CosmosDb is mentioned and quickly explain to me the context in which it is mentioned
- Summarize the last meeting notes and put them into a new note ‘summary meeting.md’. Add an introduction so that I can send it via email.
Requirements
- Python >= 3.11
mcpPython SDK>=1.1.0,=2.0will crash at import withAttributeError: 'Server' object has no attribute 'list_tools'.
Configuration
Obsidian REST API Key
There are two ways to configure the environment with the Obsidian REST API Key.
- Add to server config (preferred)
{
"mcp-obsidian": {
"command": "uvx",
"args": [
"mcp-obsidian"
],
"env": {
"OBSIDIAN_API_KEY": "",
"OBSIDIAN_HOST": "",
"OBSIDIAN_PORT": ""
}
}
}
Sometimes Claude has issues detecting the location of uv / uvx. You can use which uvx to find and paste the full path in above config in such cases.
- Create a
.envfile in the working directory with the following required variables:
OBSIDIAN_API_KEY=your_api_key_here
OBSIDIAN_HOST=your_obsidian_host
OBSIDIAN_PORT=your_obsidian_port
Note:
- You can find the API key in the Obsidian plugin config
- Default port is 27124 if not specified
- Default host is 127.0.0.1 if not specified
Quickstart
Install
Obsidian REST API
You need the Obsidian REST API community plugin running: https://github.com/coddingtonbear/obsidian-local-rest-api
설치
uvx mcp-obsidian설정
{
"mcpServers": {
"mcp-obsidian": {
"command": "uv",
"args": [
"--directory",
"<dir_to>/mcp-obsidian",
"run",
"mcp-obsidian"
],
"env": {
"OBSIDIAN_API_KEY": "<your_api_key_here>",
"OBSIDIAN_HOST": "<your_obsidian_host>",
"OBSIDIAN_PORT": "<your_obsidian_port>"
}
}
}
}