io.github.jannks/handbook

编码与调试

by ah-oh

用于 Handbook API 的 MCP server,支持通过 CRUD、总览与标签搜索管理 handbook 条目。

什么是 io.github.jannks/handbook

用于 Handbook API 的 MCP server,支持通过 CRUD、总览与标签搜索管理 handbook 条目。

README

handbook-mcp-server

An MCP (Model Context Protocol) server for the Handbook API by ah-oh.com. Enables full management of handbook entries directly from Claude Desktop, Claude Code, VS Code Copilot, and other MCP-compatible clients.


Features

ToolDescription
handbook_list_entriesList all handbook entries
handbook_get_entryRetrieve a single entry by ID (including markdown content)
handbook_create_entryCreate a new entry
handbook_update_entryUpdate an existing entry
handbook_delete_entryDelete an entry
handbook_get_overviewCompact overview of all entries per app
handbook_search_tagsSearch tags across all entries

Prerequisites

  • Node.js >= 18
  • Bearer Token for the Handbook API

Installation

Option A: Install from npm

bash
npm install -g @ah-oh/handbook-mcp-server

Option B: Build from source

bash
git clone https://github.com/ah-oh/handbook-mcp-server.git
cd handbook-mcp-server
npm install
npm run build

Configuration

Environment Variables

VariableRequiredDefaultDescription
HANDBOOK_API_TOKENYesBearer token for the Handbook API
HANDBOOK_API_URLNohttps://handbook.ah-oh.com/handbook-apiBase URL of the API
TRANSPORTNostdioTransport mode: stdio or http
PORTNo3000Port for HTTP transport

Usage

Claude Desktop

Add the following to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "handbook": {
      "command": "node",
      "args": ["/absolute/path/to/handbook-mcp-server/dist/index.js"],
      "env": {
        "HANDBOOK_API_TOKEN": "your-bearer-token"
      }
    }
  }
}

If installed globally via npm:

json
{
  "mcpServers": {
    "handbook": {
      "command": "handbook-mcp-server",
      "env": {
        "HANDBOOK_API_TOKEN": "your-bearer-token"
      }
    }
  }
}

Claude Code

bash
claude mcp add handbook -- node /path/to/handbook-mcp-server/dist/index.js \
  --env HANDBOOK_API_TOKEN=your-bearer-token

VS Code (Copilot / Continue)

In .vscode/mcp.json:

json
{
  "servers": {
    "handbook": {
      "command": "node",
      "args": ["/path/to/handbook-mcp-server/dist/index.js"],
      "env": {
        "HANDBOOK_API_TOKEN": "your-bearer-token"
      }
    }
  }
}

HTTP Mode (Remote)

bash
TRANSPORT=http HANDBOOK_API_TOKEN=your-token PORT=3000 npm start

The server will listen on http://localhost:3000/mcp.


Examples

Once the MCP server is connected, you can ask Claude things like:

  • "Show me all handbook entries"
  • "Create a new entry titled 'Onboarding Guide' for the app szales"
  • "Update the entry with ID 65c4e1f5... – set the content to ..."
  • "Which tags start with 'meet'?"
  • "Give me an overview of all entries for the app sethub"
  • "Delete entry 65c4e1f5..."

Publishing to the MCP Registry

The official MCP Registry makes your server discoverable by all MCP clients. Here's the step-by-step guide:

Step 1: Replace placeholders

Replace ah-oh everywhere in the project with your GitHub username:

bash
# macOS
find . -type f \( -name "*.json" -o -name "*.md" \) \
  -exec sed -i '' 's/ah-oh/my-github-user/g' {} +

# Linux
find . -type f \( -name "*.json" -o -name "*.md" \) \
  -exec sed -i 's/ah-oh/my-github-user/g' {} +

This affects the following files:

  • package.json – fields name, mcpName, repository, homepage, bugs
  • server.json – fields name, repository, packages[0].identifier
  • README.md – links and install command

Step 2: Publish to npm

bash
# Log in to npm (one-time)
npm login

# Publish the package
npm publish --access public

Note: The MCP Registry only hosts metadata, not the code itself. Your package must first be available on npm (or PyPI, Docker Hub, etc.).

Step 3: Install the mcp-publisher CLI

bash
curl -L \
  "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" \
  | tar xz mcp-publisher && sudo mv mcp-publisher /usr/local/bin/

# Verify
mcp-publisher --help

Step 4: Log in to the registry

bash
mcp-publisher login github

This opens the browser for GitHub OAuth. You'll get access to the namespace io.github.ah-oh/*.

Alternative (custom domain, e.g. com.ah-oh/*):

bash
# Generate an Ed25519 keypair
openssl genpkey -algorithm Ed25519 -out key.pem

# Host the public key at https://ah-oh.com/.well-known/mcp-registry-auth
# Then:
mcp-publisher login http --domain=ah-oh.com --private-key=HEX_KEY

Step 5: Publish

bash
# Dry run first
mcp-publisher publish --dry-run

# Publish for real
mcp-publisher publish

Your server will then be discoverable at registry.modelcontextprotocol.io and automatically picked up by downstream registries (GitHub, VS Code, etc.).

Step 6 (Optional): Automation via GitHub Actions

The project includes a ready-made workflow file at .github/workflows/publish.yml. It automatically publishes to npm and the MCP Registry on every git tag (v*).

Setup:

  1. Go to npmjs.com → Access Tokens → Create a new token
  2. In GitHub → Repository → Settings → Secrets and Variables → Actions → Add NPM_TOKEN as a secret
  3. Tag a release and push:
bash
git tag v1.0.0
git push origin v1.0.0

The pipeline takes care of the rest.

Updating the version

For new versions:

  1. Bump the version in package.json and server.json
  2. Create and push a new tag:
bash
npm version patch   # or minor / major
git push origin v$(node -p "require('./package.json').version")

Project Structure

code
handbook-mcp-server/
├── .github/workflows/
│   └── publish.yml          # CI/CD: npm + MCP Registry
├── src/
│   ├── index.ts             # Entry point (stdio + HTTP)
│   ├── constants.ts         # API URL, limits
│   ├── types.ts             # TypeScript interfaces
│   ├── schemas/
│   │   └── handbook-entry.ts # Zod validation schemas
│   ├── services/
│   │   ├── api-client.ts    # HTTP client for the Handbook API
│   │   └── formatting.ts    # Markdown formatting
│   └── tools/
│       └── handbook-entry.ts # Tool registrations
├── dist/                    # Compiled JS files
├── package.json
├── tsconfig.json
├── server.json              # MCP Registry metadata
└── README.md

Development

bash
# Install dependencies
npm install

# Build TypeScript (one-time)
npm run build

# TypeScript watch mode
npm run dev

# Start server (stdio)
npm start

# Start server (HTTP)
TRANSPORT=http npm start

API Reference

Based on the Handbook OpenAPI specification.

All endpoints require Bearer token authentication. The MCP server handles auth headers automatically – you only need to set HANDBOOK_API_TOKEN.


License

MIT

常见问题

io.github.jannks/handbook 是什么?

用于 Handbook API 的 MCP server,支持通过 CRUD、总览与标签搜索管理 handbook 条目。

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描123.0k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描123.0k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描123.0k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
84.2k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
53.3k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.4k

评论