AO

apaulineoliveira/obsidian-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

1 stars 1 forks 质量 84 趋势 16MIT

MCP服务器连接Obsidian与Claude和光标。管理你的待办事项,无需重打任务。

概览

一个MCP服务器,连接你的Obsidian Vault和Claude Desktop和光标,这样AI可以搜索你的笔记、读取和更新元数据,管理你的待办事项,而你无需复制粘贴任何内容。 - “在Projects中查找提及OAuth的笔记” ·“搜索TODO(\w+)作为正则表达式”- “哪些笔记被标记为 #project 且状态为草稿?”- “在Projects/oloroke.md的前言中设置状态:已完成” - “显示我的高优先级 #backend 任务” ·“将Projects/x.md的第5行标记为已完成” - - [ ] 修复登录 #urgent #backend。嵌套标签的工作方式类似 Obsidian:按项目过滤也符合 #project/api。代码块内的标签、URL(page#anchor)和链接([[Note#Heading]])被忽略。- 🔴 高 ·🟡中等 ·🟢低 ·⚫阻挡 - 项目/项目、优先级/优先级、标签(列表或“a, b”)以及你想搜索的任何自定义字段 优先级关键词在 中工作。要添加另一种语言,可以在 src/core/priorities 中添加其关键词到 PRIORITY_KEYWORDS。

概述(AI 翻译)

关于中等的文章:https://paulineoliveira.medium.com/por-que-eu-fiz-o-claude-e-o-cursor-lerem-meus-to-dos-no-obsidian-4f0ab55eed84?postPublishedType=initial

一个MCP服务器,连接你的Obsidian Vault和Claude Desktop和光标,这样AI可以搜索你的笔记、读取和更新元数据,管理你的待办事项,而你无需复制粘贴任何内容。

🇧🇷 Versão em português

它能做什么

工具 描述
search_notes 通过文本或正则表达式、标签和前置字段(均可组合)搜索笔记,返回与行号匹配的行
list_tags 列出保险库中的每个标签(内联和前置)以及使用该标签的音符数量
get_frontmatter 返回笔记的YAML前言,格式为JSON
update_frontmatter 创建、更改或移除前置键,保持注释、键序和音符主体完整
get_todos 待办事项列表(- [ ] / - [x]),可通过folder、tag、priority、completed和language]
update_todo 通过音符路径和行号标记待办事项为已完成/取消
get_note_content 返回笔记的完整内容

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Obsidian MCP Server

Article on Medium: https://paulineoliveira.medium.com/por-que-eu-fiz-o-claude-e-o-cursor-lerem-meus-to-dos-no-obsidian-4f0ab55eed84?postPublishedType=initial

An MCP server that connects your Obsidian vault to Claude Desktop and Cursor, so the AI can search your notes, read and update their metadata, and manage your to-dos without you copying and pasting anything.

🇧🇷 Versão em português

What it can do

Tool Description
search_notes Searches notes by text or regex, by tags and by frontmatter fields (all combinable), returning matching lines with their line numbers
list_tags Lists every tag in the vault (inline and frontmatter) with how many notes use it
get_frontmatter Returns a note’s YAML frontmatter as JSON
update_frontmatter Creates, changes or removes frontmatter keys, keeping comments, key order and the note body intact
get_todos Lists to-dos (- [ ] / - [x]), filterable by folder, tag, priority, completed and language
update_todo Marks a to-do as done/undone (by note path and line number)
get_note_content Returns the full content of a note
create_note Creates a new note (and any missing folders), never overwriting an existing note
list_projects Lists projects found in notes’ frontmatter
get_supported_languages Lists languages accepted for priority keywords

Example prompts:

  • “Find notes mentioning OAuth in Projects” · “Search for TODO\(\w+\) as a regex”
  • “Which notes are tagged #project and have status: draft?”
  • “Set status: done in the frontmatter of Projects/oloroke.md”
  • “Show my high-priority #backend tasks” · “Mark line 5 of Projects/x.md as done”
  • “Save this summary as a note in Study/mcp.md”

Organizing your notes (all optional, can be combined)

  • Inline tags: - [ ] Fix login #urgent #backend. Nested tags work like in Obsidian: filtering by project also matches #project/api. Tags inside code blocks, URLs (page#anchor) and links ([[Note#Heading]]) are ignored.
  • Priority emoji: 🔴 high · 🟡 medium · 🟢 low · ⚫ blocked
  • YAML frontmatter: projeto/project, prioridade/priority, tags (list or "a, b") and any custom field you want to search on
---
project: oloroke
priority: high
status: draft
tags: [backend]
---
- [ ] 🔴 Implement OAuth #urgent

Priority keywords work in pt, en, es, fr, de, it. To add another language, add its keywords to PRIORITY_KEYWORDS in src/core/priorities.py; src/examples/add_custom_language.py shows ready-made keywords for ja, zh, ru, el and ko.

Safety

The server only touches files inside OBSIDIAN_VAULT_PATH:

  • Absolute paths, .. that leave the vault, and symlinks pointing outside it are rejected.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "obsidian-mcp": { "command": "/abs/path/to/obsidian-mcp/venv/bin/python3", "args": ["/abs/path/to/obsidian-mcp/src/obsidian_mcp.py"], "env": { "OBSIDIAN_VAULT_PATH": "/abs/path/to/your/vault" } } } }