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

@zhuxian/wiki-mcp-server

v0.0.2

Published

MCP server for reading wiki document content

Readme

@zhuxian/wiki-mcp-server

English | 中文

用于读取 Wiki 文档内容的 MCP (Model Context Protocol) Server,基于 TypeScript 构建,使用 stdio 传输协议。

功能

  • 提供 get_wiki_content 工具 — 传入 Wiki 页面链接,返回文档内容
  • stdio 传输协议,兼容所有主流 MCP 客户端

环境变量

| 变量 | 必填 | 说明 | |---|---|---| | WIKI_DOMAIN | 是 | Wiki 域名,如 www.xxxx.com.wiki | | WIKI_TOKEN | 是 | Wiki API 鉴权 Token |

IDE / 客户端配置

Claude Code

添加到当前项目:

claude mcp add wiki-mcp -e WIKI_DOMAIN=www.xxxx.com.wiki -e WIKI_TOKEN=your_token -- npx @zhuxian/wiki-mcp-server

添加为全局(所有项目可用):

claude mcp add wiki-mcp -s user -e WIKI_DOMAIN=www.xxxx.com.wiki -e WIKI_TOKEN=your_token -- npx @zhuxian/wiki-mcp-server

Cursor

在项目根目录的 .cursor/mcp.json(或全局 ~/.cursor/mcp.json)中添加:

{
  "mcpServers": {
    "wiki-mcp": {
      "command": "npx",
      "args": ["@zhuxian/wiki-mcp-server"],
      "env": {
        "WIKI_DOMAIN": "www.xxxx.com.wiki",
        "WIKI_TOKEN": "your_token"
      }
    }
  }
}

VS Code (Copilot)

在项目根目录的 .vscode/mcp.json 中添加:

{
  "servers": {
    "wiki-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["@zhuxian/wiki-mcp-server"],
      "env": {
        "WIKI_DOMAIN": "www.xxxx.com.wiki",
        "WIKI_TOKEN": "your_token"
      }
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json 中添加:

{
  "mcpServers": {
    "wiki-mcp": {
      "command": "npx",
      "args": ["@zhuxian/wiki-mcp-server"],
      "env": {
        "WIKI_DOMAIN": "www.xxxx.com.wiki",
        "WIKI_TOKEN": "your_token"
      }
    }
  }
}

Cline (VS Code 插件)

打开 Cline Settings > MCP Servers,点击 Installed,添加:

{
  "mcpServers": {
    "wiki-mcp": {
      "command": "npx",
      "args": ["@zhuxian/wiki-mcp-server"],
      "env": {
        "WIKI_DOMAIN": "www.xxxx.com.wiki",
        "WIKI_TOKEN": "your_token"
      }
    }
  }
}

Claude Desktop

claude_desktop_config.json 中添加:

{
  "mcpServers": {
    "wiki-mcp": {
      "command": "npx",
      "args": ["@zhuxian/wiki-mcp-server"],
      "env": {
        "WIKI_DOMAIN": "www.xxxx.com.wiki",
        "WIKI_TOKEN": "your_token"
      }
    }
  }
}

工具说明

get_wiki_content

通过 Wiki 页面链接获取文档内容。

参数

| 参数 | 类型 | 说明 | |---|---|---| | url | string | Wiki 页面链接 |

支持的链接格式

http://{domain}/wiki/#/team/{teamId}/space/{spaceId}/page/{pageId}

示例

http://www.xxxx.com.wiki/wiki/#/team/LKFtX4kz/space/wxhon4QH/page/LFfnyZxV

开发

# 安装依赖
npm install

# 开发模式运行
WIKI_DOMAIN=www.xxxx.com.wiki WIKI_TOKEN=your_token npm run dev

# 构建
npm run build

调试

使用 MCP Inspector

MCP Inspector 是 MCP 官方调试工具:

# 通过 MCP Inspector 运行
npx @modelcontextprotocol/inspector -e WIKI_DOMAIN=www.xxxx.com.wiki -e WIKI_TOKEN=your_token -- npx tsx src/index.ts

打开终端输出的 URL,可以在 Inspector 界面中查看工具列表、调用 get_wiki_content、查看请求/响应详情。

使用 Claude Code 调试模式

# 启用 MCP 调试日志
claude --mcp-debug

会在终端打印所有 MCP 请求/响应消息,便于排查通信问题。

手动 stdin/stdout 测试

服务使用 stdio 传输协议,可以直接通过管道发送 JSON-RPC 消息测试:

# 发送 initialize 请求
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | WIKI_DOMAIN=www.xxxx.com.wiki WIKI_TOKEN=your_token npx tsx src/index.ts

许可证

MIT