Obsidian MCP Server
用于 Obsidian 集成的模型上下文协议服务器
这是一个基于 TypeScript 的 MCP 服务器,实现了与 Obsidian 的集成。它通过提供以下功能演示了 MCP 的核心概念:
代表黑曜石金库内容的资源
访问保险库数据的工具
与 Obsidian 的 API 集成
项目统计
代码总行数:345
主要文件:
src/tool-handlers.ts(76 行)src/resource-handlers.ts(45 行)src/server.ts(32 行)src/api-client.ts(25 行)
Related MCP server: MCP Server
目录结构
obsidian-mcp/
├── .codegpt/
│ └── head
├── src/
│ ├── api-client.ts
│ ├── index.ts
│ ├── resource-handlers.ts
│ ├── server.ts
│ └── tool-handlers.ts
├── .SourceSageignore
├── package.json
├── README.md
└── tsconfig.json特征
资源
通过
obsidian://server-infoURI 访问 Obsidian 服务器信息获取带有元数据的保管库内容
JSON 格式,易于集成
工具
get_vault_contents- 检索 Obsidian 保险库的内容将路径作为可选参数(默认值:根目录)
返回结构化的 JSON 响应
API 集成
使用 Obsidian API 进行安全 HTTPS 连接
具有错误处理功能的自定义 axios 客户端
Windows 路径规范化支持
发展
先决条件
Node.js v18+
TypeScript 5.3+
Obsidian API 密钥(设置为 OBSIDIAN_API_KEY 环境变量)
设置
# Install dependencies
npm install
# Build the server
npm run build
# Start development server with auto-rebuild
npm run watch安装
要与 Claude Desktop 一起使用,请添加服务器配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"obsidian-mcp": {
"command": "/path/to/obsidian-mcp/build/index.js",
"env": {
"OBSIDIAN_API_KEY": "your-api-key-here"
}
}
}
}调试
我们建议使用MCP 检查器:
npm run inspector检查器将提供一个 URL 来访问浏览器中的调试工具。
依赖项
运行时
@modelcontextprotocol/sdk:MCP 服务器实现
axios:用于 API 通信的 HTTP 客户端
发展
@types/node:Node.js 的 TypeScript 定义
typescript:TypeScript 编译器
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
An MCP server that used to create notes
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
MCP server for Serena — tasks, notes & projects from Claude, Codex, Cursor & ChatGPT.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceThis TypeScript-based MCP server enables users to manage a simple notes system with capabilities to create and summarize notes through structured prompts and resources.1 npm-
- FlicenseNot gradedqualityDmaintenanceThis TypeScript-based MCP server allows users to manage a simple notes system through creating and summarizing text notes using Model Context Protocol (MCP).8-
- FlicenseBqualityDmaintenanceA TypeScript-based MCP server that implements a simple notes system, allowing users to create, access, and generate summaries of text notes.123-
- FlicenseBqualityDmaintenanceA TypeScript-based MCP server that implements a simple notes system, allowing users to create, access, and generate summaries of text notes.23-