PolarHub
  • Agents
  • MCP Servers
  • Skills
  • PolarBear
PolarHub © 2026
MCP Serversnote-takingobsidian-local-rest-api-mcp
返回「note-taking」

obsidian-local-rest-api-mcp

modelscope·@j-shelfwood/obsidian-local-rest-api-mcp

note-taking0下载LocalModelScope

简介

暂无描述。

MCP Server 详情

来自 ModelScope 索引

Obsidian Local REST API MCP Server

An AI-Native MCP (Model Context Protocol) server that provides intelligent, task-oriented tools for interacting with Obsidian vaults through a local REST API.

AI-Native Design Philosophy

This MCP server has been redesigned following AI-Native principles rather than simple API-to-tool mapping. Instead of exposing low-level CRUD operations, it provides high-level, task-oriented tools that LLMs can reason about more effectively.

Before vs After: The Transformation

Old Approach (CRUD-Based)New Approach (AI-Native)Why Better
list_files (returns everything)list_directory(path, limit, offset)Prevents context overflow with pagination
create_file + update_filewrite_file(path, content, mode)Single tool handles create/update/append
create_note + update_notecreate_or_update_note(path, content, frontmatter)Intelligent upsert removes decision complexity
search_notes(query)search_vault(query, scope, path_filter)Precise, scopeable search with advanced filtering
(no equivalent)get_daily_note(date)High-level abstraction for common workflow
(no equivalent)get_recent_notes(limit)Task-oriented recent file access
(no equivalent)find_related_notes(path, on)Conceptual relationship discovery

Available Tools

Directory & File Operations

list_directory

Purpose: List directory contents with pagination to prevent context overflow

{
  "path": "Projects/",
  "recursive": false,
  "limit": 20,
  "offset": 0
}

AI Benefit: LLM can explore vault structure incrementally without overwhelming context

read_file

Purpose: Read content of any file in the vault

{"path": "notes/meeting-notes.md"}

write_file

Purpose: Write file with multiple modes - replaces separate create/update operations

{
  "path": "notes/summary.md",
  "content": "# Meeting Summary\n...",
  "mode": "append"  // "overwrite", "append", "prepend"
}

AI Benefit: Single tool handles all write scenarios, removes ambiguity

delete_item

Purpose: Delete any file or directory

{"path": "old-notes/"}

AI-Native Note Operations

create_or_update_note

Purpose: Intelligent upsert - creates if missing, updates if exists

{
  "path": "daily/2024-12-26",
  "content": "## Tasks\n- Review AI-native MCP design",
  "frontmatter": {"tags": ["daily", "tasks"]}
}

AI Benefit: Eliminates "does this note exist?" decision tree

get_daily_note

Purpose: Smart daily note retrieval with common naming patterns

{"date": "today"}  // or "yesterday", "2024-12-26"

AI Benefit: Abstracts file system details and naming conventions

get_recent_notes

Purpose: Get recently modified notes

{"limit": 5}

AI Benefit: Matches natural "what did I work on recently?" queries

Advanced Search & Discovery

search_vault

Purpose: Multi-scope search with advanced filtering

{
  "query": "machine learning",
  "scope": ["content", "filename", "tags"],
  "path_filter": "research/"
}

AI Benefit: Precise, targeted search reduces noise

find_related_notes

Purpose: Discover conceptual relationships between notes

{
  "path": "ai-research.md",
  "on": ["tags", "links"]
}

AI Benefit: Enables relationship-based workflows and serendipitous discovery

Legacy Tools (Backward Compatibility)

The server maintains backward compatibility with existing tools like get_note, list_notes, get_metadata_keys, etc.

Prerequisites

  • Node.js 18+ or Bun runtime
  • Obsidian Local REST API running locally (default: http://obsidian-local-rest-api.test)

Installation

Using npx (Recommended)

npx obsidian-local-rest-api-mcp

From Source

# Clone the repository
git clone https://github.com/j-shelfwood/obsidian-local-rest-api-mcp.git
cd obsidian-local-rest-api-mcp

# Install dependencies with bun
bun install

# Build the project
bun run build

Configuration

Set environment variables for API connection:

export OBSIDIAN_API_URL="http://obsidian-local-rest-api.test"  # Default URL (or http://localhost:8000 for non-Valet setups)
export OBSIDIAN_API_KEY="your-api-key"          # Optional bearer token

Usage

Running the Server

# Development mode with auto-reload
bun run dev

# Production mode
bun run start

# Or run directly
node build/index.js

MCP Client Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "obsidian-vault": {
      "command": "npx",
      "args": ["obsidian-local-rest-api-mcp"],
      "env": {
        "OBSIDIAN_API_URL": "http://obsidian-local-rest-api.test",
        "OBSIDIAN_API_KEY": "your-api-key-if-needed"
      }
    }
  }
}

VS Code with MCP Extension

Use the included .vscode/mcp.json configuration file.

Development

# Watch mode for development
bun run dev

# Build TypeScript
bun run build

# Type checking
bun run tsc --noEmit

Architecture

  • ObsidianApiClient - HTTP client wrapper for REST API endpoints
  • ObsidianMcpServer - MCP server implementation with tool handlers
  • Configuration - Environment-based configuration with validation

Error Handling

The server includes comprehensive error handling:

  • API connection failures
  • Invalid tool parameters
  • Network timeouts
  • Authentication errors

Errors are returned as MCP tool call responses with descriptive messages.

Debugging

Enable debug logging by setting environment variables:

export DEBUG=1
export NODE_ENV=development

Server logs are written to stderr to avoid interfering with MCP protocol communication on…

相关 MCP Servers(来自「note-taking」)

记忆库管理器

通过全局和分支特定的记忆库,管理跨 Claude AI 会话的项目文档和上下文的服务器,通过结构化的 JSON 文档存储实现一致的知识管理。

@t3ta/memory-bank-mcp-server

日期时间MCP服务器

该服务器允许用户通过自定义URI方案存储、管理和总结笔记,具有添加新笔记以及生成详细程度不同的摘要的功能。

@bossjones/datetime-mcp-server

MCP Notion 服务

一个高性能的MCP服务器,将Notion集成到AI工作流中,通过标准化协议实现与Notion页面、数据库和评论的交互。

@Ejb503/systemprompt-mcp-notion

Notion MCP

用于Notion API的MCP服务器,使Claude能够与Notion工作区进行交互。

@suekou/mcp-notion-server

arXiv-MCP工具

通过简单的消息控制协议接口,使人工智能助手能够搜索和访问arXiv研究论文,从而实现论文的搜索、下载、列出和阅读功能。

@huanongfish/arxiv-mcp

Obsidian MCP 服务器

通过模型上下文协议,启用大型语言模型(LLMs)与Obsidian仓库之间的交互,支持安全的文件操作、内容管理和高级搜索功能。

@cyanheads/obsidian-mcp-server

自动安装

点击按钮会唤起 PolarBear 客户端,并把当前 MCP Server 的 Markdown 详情文档地址传给客户端。

/api/mcps/j-shelfwood-obsidian-local-rest-api-mcp/markdown
打开 PolarBear 安装查看 Markdown 文档

手动安装

在 PolarBear 或其他支持 MCP 的客户端中,新建 MCP Server,并参考下方来源或安装提示配置。

**AI Benefit**: LLM can explore vault structure incrementally without overwhelming context #### `read_file` **Purpose**: Read content of any file in the vault ```json {"path": "notes/meeting-notes.md"} ``` #### `write_file` **Purpose**: Write file with multiple modes - replaces separate create/update operations ```json { "path": "notes/summary.md", "content": "# Meeting Summary\n...", "mode": "append" // "overwrite", "append", "prepend" } ``` **AI Benefit**: Single tool handles all write scenarios, removes ambiguity #### `delete_item` **Purpose**: Delete any file or directory ```json {"path": "old-notes/"} ``` ### AI-Native Note Operations #### `create_or_update_note` **Purpose**: Intelligent upsert - creates if missing, updates if exists ```json { "path": "daily/2024-12-26", "content": "## Tasks\n- Review AI-native MCP design", "frontmatter": {"tags": ["daily", "tasks"]} }

基本信息

分类
note-taking / file-systems / documentation-access
运行方式
No
许可证
MIT License
详情文件
j-shelfwood-obsidian-local-rest-api-mcp.md