npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@likcheung/obsidian-mcp

v0.1.1

Published

MCP server for Obsidian CLI integration

Downloads

49

Readme

Obsidian MCP

License: MIT Node Version Obsidian Version

一个基于 Model Context Protocol (MCP) 的 Obsidian CLI 集成服务器,让 AI 工具(如 Claude Code、Codex)能够通过标准化接口与 Obsidian 进行交互。

功能

提供 110+ 个 MCP 工具,覆盖 Obsidian CLI 的主要命令能力:

| 类别 | 工具 | | ------------ | ----------------------------------------------------------------------------------------------- | | 文件操作 | read, create, append, prepend, move, rename, delete, files, open, file_info | | 搜索 | search, search_context, search_open | | 日记 | daily, daily_read, daily_append, daily_prepend, daily_path | | 任务 | tasks, task | | 标签 | tags, tag | | 属性 | properties, property_set, property_read, property_remove, aliases | | 链接 | backlinks, links, unresolved, orphans, deadends | | 模板 | templates, template_read, template_insert | | 大纲 | outline | | 仓库 | vault, vaults, folder, folders | | 书签 | bookmarks, bookmark | | 工作区 | workspace, workspaces, workspace_save/load/delete, tabs, recents | | 插件 | plugins, plugins_enabled, plugin_enable/disable/install/uninstall/reload | | 主题 | themes, theme, theme_set/install/uninstall, snippets, snippet_enable/disable | | 同步 | sync, sync_status/history/read/restore, sync_deleted | | 发布 | publish_site/list/status/add/remove/open | | 数据库 | bases, base_views/create/query | | 命令 | commands, command, hotkeys, hotkey | | 历史 | diff, history, history_list/read/restore/open | | 其他 | wordcount, random, random_read, unique, web, help, version, reload, restart | | 开发者 | devtools, dev_debug/errors/screenshot/console/css/dom/mobile, eval |

安装

前置条件

  • Obsidian 1.12+ 安装程序版本
  • Obsidian 应用运行中
  • Obsidian CLI 已注册(运行 obsidian help 验证)

使用 npm 包

npx -y @likcheung/obsidian-mcp

如果你正在当前仓库源码目录内执行 npx -y @likcheung/obsidian-mcp,npm 可能会优先解析当前项目,导致 sh: obsidian-mcp: command not found。这种情况下请在其他目录执行,或者直接使用 node dist/index.js

从源码构建

# 安装依赖
pnpm install

# 构建
pnpm build

配置

Claude Code

在 Claude Code 的配置文件中添加 MCP 服务器:

编辑 ~/.claude/settings.json 根据你选择的方式进行配置

方式一:本地路径

clone 项目到本地

pnpm install
pnpm build
{
  "mcpServers": {
    "obsidian": {
      "command": "node",
      "args": ["<path-to-obsidian-mcp>/dist/index.js"]
    }
  }
}

方式二:npx

{
  "mcpServers": {
    "obsidian": {
      "args": [
        "-y",
        "@likcheung/obsidian-mcp"
      ],
      "command": "npx"
    }
  }
}

Codex / 其他 MCP 客户端

参考各客户端的 MCP 配置文档,配置方式类似。

开发

# 开发模式(监听文件变化)
pnpm dev

# 类型检查
pnpm typecheck

# 代码检查
pnpm lint

# 格式化
pnpm format

使用示例

在 Claude Code 中使用:

# 读取今天的日记
> 使用 obsidian_daily_read

# 搜索包含 "meeting" 的文件
> 使用 obsidian_search,query="meeting"

# 向日记追加任务
> 使用 obsidian_daily_append,content="- [ ] 新任务"

# 列出所有未完成的任务
> 使用 obsidian_tasks,todo=true

# 获取文件的反向链接
> 使用 obsidian_backlinks,file="某个笔记"

项目结构

obsidian-mcp/
├── src/
│   ├── index.ts           # 入口文件
│   ├── tools/             # MCP 工具定义
│   │   ├── file.ts        # 文件操作
│   │   ├── search.ts      # 搜索
│   │   ├── daily.ts       # 日记
│   │   ├── task.ts        # 任务
│   │   └── ...            # 其他工具模块
│   ├── cli/
│   │   ├── executor.ts    # CLI 执行器
│   │   └── types.ts       # 类型定义
│   └── utils/
│       └── error.ts       # 错误处理
├── dist/                  # 构建输出
├── package.json
├── tsconfig.json
└── eslint.config.js

技术栈

License

MIT