Obsidian MCP Server (TypeScript + Bun)

by fazer-ai

一个支持模型上下文协议(MCP)的服务器,允许Claude(或任何支持MCP的大型语言模型)通过本地REST API社区插件与您的Obsidian知识库进行交互。需要通过环境变量OBSIDIAN_API_KEY或.env文件传递Obsidian API密钥。

Productivitystdio or Streamable HTTPCommunity

Repository-wide counts · Cached 2026-03-07

Overview

The Obsidian MCP Server (TypeScript + Bun) MCP server is a publicly available project. Review the upstream repository for installation instructions, supported tools, compatibility, permissions, and current maintenance status.

Configuration

Configuration, transport, authentication, and runtime requirements vary by project. Open the repository before connecting and use the smallest set of credentials and permissions required.

Open the Obsidian MCP Server (TypeScript + Bun) repository to read the latest documentation.

KEEP EXPLORING

Compare source, connection, and authentication details before choosing an implementation.

View the complete category

AIHawk

feder-cr

Community

AIHawk is an LLM-based tool that writes application documents and drives a browser AI client. Requires Python 3.12 and Chrome. It uses local YAML config files in data_folder/ (created from data_folder_example/) for user resume, work preferences, and OpenAI API key.

Obsidian 的 MCP 服务器

MarkusPfundstein

Community

用于与 Obsidian 通过本地 REST API 社区插件交互的 MCP 服务器。需要预先安装并运行 Obsidian REST API 社区插件。通过环境变量或服务器配置,使用 Obsidian API 密钥、主机和端口来配置服务器。

Office-Word-MCP-Server

GongRzhe

Community

用于创建、读取和操作 Microsoft Word 文档的 MCP 服务器。该服务器通过标准化接口支持 AI 助手与 Word 文档进行交互,提供丰富的文档编辑功能。

Office-PowerPoint-MCP-Server

GongRzhe

Community

用于 PowerPoint 操作的 MCP 服务器,基于 python-pptx。提供通过 MCP 协议创建、编辑和操作 PowerPoint 演示文稿的工具。

FROM THE SOURCE

Repository README

Build-time snapshot · Retrieved 2026-10-05

View original

MCP server for Obsidian (TypeScript + Bun)

NPM Version

A Model-Context-Protocol (MCP) server that lets Claude (or any MCP-compatible LLM) interact with your Obsidian vault through the Local REST API community plugin – written in TypeScript and runnable with bunx.


✨ Components

Tools

Tool name Description
obsidian_status Returns basic details about the Obsidian Local REST API server and your authentication status
obsidian_delete_active Deletes the note that is currently active in the Obsidian UI
obsidian_get_active Retrieves the full content of the active note (Markdown or JSON view)
obsidian_patch_active Inserts, replaces or prepends content in the active note relative to a heading, block reference, or front-matter field
obsidian_post_active Appends Markdown to the end of the active note
obsidian_put_active Replaces the entire body of the active note
obsidian_get_commands Lists every command available in Obsidian’s command palette
obsidian_execute_command Executes a specific Obsidian command by its ID
obsidian_open_file Opens the given file inside Obsidian (creates it if missing); optional flag to open in a new leaf
obsidian_delete_periodic Deletes the current daily / weekly / monthly / quarterly / yearly note for the requested period
obsidian_get_periodic Returns the content of the current periodic note for the requested period
obsidian_patch_periodic Inserts / replaces content in a periodic note relative to a heading, block reference, or front-matter field
obsidian_post_periodic Appends Markdown to the periodic note (creates it if it doesn’t exist)
obsidian_put_periodic Replaces the entire body of a periodic note
obsidian_search_dataview Runs a Dataview-DQL query across the vault and returns matching rows
obsidian_search_json_logic Runs a JsonLogic query against structured note metadata
obsidian_simple_search Performs a plain-text fuzzy search with optional surrounding context
obsidian_list_vault_root Lists all files and directories at the root of your vault
obsidian_list_vault_directory Lists files and directories inside a specific folder of the vault
obsidian_delete_file Deletes a specific file (or directory) in the vault
obsidian_get_file Retrieves the content of a file in the vault (Markdown or JSON view)
obsidian_patch_file Inserts / replaces content in an arbitrary file relative to a heading, block reference, or front-matter field
obsidian_post_file Appends Markdown to a file (creates it if it doesn’t exist)
obsidian_put_file Creates a new file or replaces the entire body of an existing file

See Obsidian's Local REST API specifications for more details.


Example prompts

# Summarize the latest “architecture call” note
# (Claude will transparently call list_files_in_vault → get_file_contents)
Get the contents of the last “architecture call” note and summarize them.

# Find all mentions of Cosmos DB
Search for all files where “Azure CosmosDb” is mentioned and explain the context briefly.

# Create a summary note
Summarize yesterday’s meeting and save it as “summaries/2025-04-24-meeting.md”. Add a short intro suitable for e-mail.

⚙️ Configuration

Obsidian REST API key

There are two ways to pass the Obsidian API key to the server:

  1. Server config (recommended) – pass it via the env field in your Claude (or other client) MCP-server declaration:
// claude_desktop_config.json
{
  "mcpServers": {
    "@fazer-ai/mcp-obsidian": {
      "command": "bunx",
      "args": ["@fazer-ai/mcp-obsidian@latest"],
      "env": {
        "OBSIDIAN_API_KEY": "your-obsidian-api-key"
      }
    }
  }
}

[!NOTE] Use @fazer-ai/mcp-obsidian@latest to ensure you always run the most up to date version of the server.

  1. Alternatively, you can use an .env file. Place the key in the .env you created above. Note it must be placed in the working directory where the MCP server is running.

Environment variables

You can use the .env.example file as reference to create your own .env file.

OBSIDIAN_API_KEY=   # Obtain this from the plugin settings in Obsidian
OBSIDIAN_PROTOCOL=http
OBSIDIAN_HOST=localhost
OBSIDIAN_PORT=27123 # Port the Local REST API plugin is bound to

🛠 Development

Running local version on Claude Desktop

After cloning this repo, you can update Claude's config to run your local version of the server instead of pulling from npm. This is useful for quickly testing changes before publishing.

[!NOTE] Keep in mind any changes you make on the code will only take effect after restarting the Claude Desktop app.

  1. Clone this repo and run bun install to install dependencies.
  2. Update your claude_desktop_config.json to point to your local version of the server:
// claude_desktop_config.json
{
  "mcpServers": {
    "@fazer-ai/mcp-obsidian": {
      "command": "bun",
      "args": ["/path/to/repo/src/index.ts"],
      "env": {
        "OBSIDIAN_API_KEY": "your-obsidian-api-key"
      }
    }
  }
}

[!IMPORTANT] Note we use bun instead of bunx here.

Debugging

MCP servers talk over stdio, so normal debuggers aren’t helpful.
Use the MCP Inspector:

npx @modelcontextprotocol/inspector bun /path/to/repo/src/index.ts

Open the URL it prints to step through requests (usually http://localhost:6274), inspect tool calls, and watch logs in real time.


📦 Publishing

  1. Update the version in package.json.
  2. Create GitHub release.
  3. Run bun publish.

License

MIT – see LICENSE.