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

cogmap-mcp

v0.1.1

Published

CogMap MCP server — 把 INTEL 暴露成 Model Context Protocol tools, 任何 MCP 客户端 (Claude Code / Cursor / Continue / Cline / Zed) 都能用

Readme

cogmap-mcp

CogMap MCP Server — 把 INTEL 暴露成 Model Context Protocol tools,让任何支持 MCP 的 AI 工具直接使用。

支持的客户端

| 客户端 | 协议 | 配置位置 | |---|---|---| | Claude Code | MCP stdio | claude mcp add cogmap node /path/to/server.mjs | | Cursor | MCP stdio | Settings → MCP servers | | Continue | MCP stdio | ~/.continue/config.json | | Cline (VSCode) | MCP stdio | extension settings | | Zed | MCP stdio | ~/.config/zed/settings.json | | 任意 MCP 客户端 | stdio JSON-RPC 2.0 | command: node, args: ["/path/server.mjs"] |

提供的 7 个 Tools

| Tool | 功能 | |---|---| | cogmap_get_intel | 读 INTEL 数据,可选 dot-path 取子字段 | | cogmap_search_by_task | 按关键词切片返回相关 rules + lessons + bugs + recipes | | cogmap_check_bug_history | 历史 bug 全文检索,写代码前查避免重蹈覆辙 | | cogmap_match_recipe | 匹配最合适的 SKILL/recipe,告诉 AI 该按哪个 skill 做 | | cogmap_put_intel | 写 INTEL(UPSERT 整对象,慎用) | | cogmap_patch_roadmap | 局部更新 roadmap 项 | | cogmap_info | 查询当前 CogMap 配置 |

安装

npm install -g cogmap-mcp
# 或本地装到项目: npm install --save-dev cogmap-mcp

配置

Claude Code

claude mcp add cogmap -s user node "$(npm root -g)/cogmap-mcp/src/server.mjs"
# 重启 Claude Code, 工具列表里多出 cogmap_* 一组

Cursor

Settings → MCP Servers → Add:

{
  "cogmap": {
    "command": "node",
    "args": ["/usr/local/lib/node_modules/cogmap-mcp/src/server.mjs"],
    "env": {
      "COGMAP_API_BASE": "file://./INTEL.json"
    }
  }
}

Continue (~/.continue/config.json)

{
  "mcpServers": {
    "cogmap": {
      "command": "node",
      "args": ["/usr/local/lib/node_modules/cogmap-mcp/src/server.mjs"]
    }
  }
}

INTEL 后端配置

通过环境变量或 cwd.cogmap.json

| 模式 | 配置 | 用途 | |---|---|---| | file:// | COGMAP_API_BASE=file://./INTEL.json | 个人 / 离线 / 起步 | | HTTPS | COGMAP_API_BASE=https://your-server.com + COGMAP_API_KEY=... | 团队 / 多设备 |

调试

stderr 会打印一行启动日志,但 stdout 严格按 JSON-RPC 2.0 走(不要往 stdout 打 console.log,会破坏协议)。

手动测试(stdio 协议):

# 启动
node src/server.mjs

# 然后粘贴 (回车):
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"cogmap_info","arguments":{}}}

协议细节

  • 标准 Model Context Protocol v2024-11-05
  • 实现 initialize / tools/list / tools/call / ping / notifications/initialized
  • 不实现 prompts / resources / sampling(CogMap 不需要这些)
  • stderr 日志,stdout JSON-RPC

License

MIT