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

csu-mcp

v3.1.3

Published

CSU 校园 API + MCP 代理。提供教务、图书馆、校车等工具,既可作为本地 API 也可直接通过 MCP 使用

Readme

SVG Banners

Website NPM Version MIT licensed

中南大学 CSU 校园API × MCP代理

你的全能校园数据引擎, 教务、图书馆、校车、校园卡一站式接入,可本地调用,也可直接走 MCP。 能做什么:

  • 自动整理成绩、排名、等级考试,一键生成简历/学习报告
  • 课表智能渲染,周视图、日视图随取
  • 校园卡流水统计,自动生成消费分析
  • 图书检索、座位参考、电子资源直达
  • 校车班次查询、路线导航可联动高德
  • 工具可返回可跳转的明细 URL,方便扩展或二次开发

百宝箱智能体体验

使用百宝箱智能体 CSU Helper 进行快速体验(不过可能由于模型性能或者网速出现卡死的情况)

快速使用(推荐)

直接用 npx 一键拉起 API 和 stdio MCP:

标准 MCP 配置示例

{
        "mcpServers": {
                "csu": {
                        "command": "npx",
                        "args": ["-y", "csu-mcp@latest"],
                        "env": {
                                "CSU_ID": "YOUR_CSU_ID",
                                "CSU_PWD": "YOUR_CSU_PWD",
                                "PORT": "12000",
                                "API_BASE_URL": "http://127.0.0.1:12000"
                        }
                }
        }
}

使用已经部署的 sse 服务器:

标准 MCP 配置示例

{
        "mcpServers": {
                "csu": {
                        "type": "sse",
                        "url": "https://cdl.migow.club/mcp"
                }
        }
}

MCP 安装:

运行命令(参考 Claude Code MCP 文档):

Claude Code 远端连接(SSE)

claude mcp add --transport sse csu https://cdl.migow.club/mcp

Claude Code 本地连接(STDIO)

claude mcp add --transport stdio csu \
  --env CSU_ID=YOUR_CSU_ID \
  --env CSU_PWD=YOUR_CSU_PWD \
  --env PORT=12000 \
  --env API_BASE_URL=http://127.0.0.1:12000 \
  -- npx -y csu-mcp@latest

在 VS Code MCP 配置中添加(参考 VS Code MCP 文档):

VS Code 远端连接

"mcp": {
  "servers": {
    "csu": {
      "type": "sse",
      "url": "https://cdl.migow.club/mcp"
    }
  }
}

VS Code 本地连接

"mcp": {
  "servers": {
    "csu": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "csu-mcp@latest"],
      "env": {
        "CSU_ID": "YOUR_CSU_ID",
        "CSU_PWD": "YOUR_CSU_PWD",
        "PORT": "12000",
        "API_BASE_URL": "http://127.0.0.1:12000"
      }
    }
  }
}

Kilo Code 支持全局(mcp_settings.json)和项目级(.kilocode/mcp.json)配置,项目级优先生效。

手动配置(.kilocode/mcp.json

远程连接

{
        "mcpServers": {
                "csu": {
                        "type": "sse",
                        "url": "https://cdl.migow.club/mcp"
                }
        }
}

本地连接

{
        "mcpServers": {
                "csu": {
                        "command": "npx",
                        "args": ["-y", "csu-mcp@latest"],
                        "env": {
                                "CSU_ID": "YOUR_CSU_ID",
                                "CSU_PWD": "YOUR_CSU_PWD",
                                "PORT": "12000",
                                "API_BASE_URL": "http://127.0.0.1:12000"
                        }
                }
        }
}

保存后在 Kilo Code 中刷新 MCP 服务器即可生效。

远端连接

Settings > Connectors > Add Custom Connector,名称填 CSUMCP,URL 填 https://cdl.migow.club/mcp

本地连接

claude_desktop_config.json 中添加:

{
        "mcpServers": {
                "csu": {
                        "command": "npx",
                        "args": ["-y", "csu-mcp@latest"],
                        "env": {
                                "CSU_ID": "YOUR_CSU_ID",
                                "CSU_PWD": "YOUR_CSU_PWD",
                                "PORT": "12000",
                                "API_BASE_URL": "http://127.0.0.1:12000"
                        }
                }
        }
}

本地连接(stdio)

~/.codex/config.toml中:

[mcp_servers.csu]
command = "npx"
args = ["-y", "csu-mcp@latest"]
env = { CSU_ID = "YOUR_CSU_ID", CSU_PWD = "YOUR_CSU_PWD", PORT = "12000", API_BASE_URL = "http://127.0.0.1:12000" }
startup_timeout_ms = 20_000

默认:

  • API 监听本地 12000端口
  • MCP stdio 指向 http://127.0.0.1:12000

可用环境变量调整:

  • PORT:API 端口(默认 12000)
  • API_BASE_URL:MCP 访问的 API 基址(默认 http://127.0.0.1:<PORT>
  • CSU_ID / CSU_PWD:统一认证学号/密码(设置后可覆盖 URL 中的 :id/:pwd
  • MCP_PORT: sse 开放的本地端口,注意:此时并不用于 npx 的直接使用

[!NOTE] 在百宝箱里目前不支持通过环境变量传输账号密码,只能通过对话框传输 上述 env 均为可选;CSU_ID/CSU_PWD 供需认证的功能使用;PORT 为本地 API 端口;API_BASE_URL 为 MCP 访问基址。 目前不支持 streamhttp

本地开发

克隆 github 仓库

git clone https://github.com/chendaile/CSUMCP.git
npm install
npm run build

PORT=<LOCAL_PORT> npm run start:api
# 启动api服务, 可选本地端口PORT, 默认12000
API_BASE_URL=<API_URL> MCP_PORT=<SSE_PORT> npm run start:mcp:sse
# 启动sse mcp服务, 可选API_BASE_URL, 默认为本地12000端口, 可选MCP_PORT SSE端口
API_BASE_URL=<API_URL> npm run start:mcp:stdio
# 启动sse mcp服务, 可选API_BASE_URL, 默认为本地12000端口

Docker 本地开发

docker pull oft-registry.cn-shanghai.cr.aliyuncs.com/oft/csumcp:latest
docker run -it --entrypoint /bin/sh oft-registry.cn-shanghai.cr.aliyuncs.com/oft/csumcp:latest

能力概览

  • 教务:成绩、排名、课表、等级考试、培养计划、辅修信息。
  • 校园卡:账户信息、近期开销流水(含明细 URL,金额换算为元)。
  • 图书馆:电子资源检索、馆藏检索(含详情 URL)、座位校区/楼层信息(以及预约 URL)。
  • 校车:班次查询,返回 id、途径站、详情链接,便于跳转查看。

工具列表(MCP)

  • grade:成绩(term 可选,如 2024-2025-1)
  • rank:专业排名
  • classes:课表(term,week;week=0 为全周)
  • level_exam:等级考试
  • student_plan:培养计划
  • minor_info:辅修报名与缴费
  • library_db_search:电子资源检索
  • library_book_search:馆藏检索
  • library_seat_campuses:座位校区列表
  • ecard_card:校园卡信息(余额等)
  • ecard_turnover:校园卡流水(支持日期/金额范围筛选,返回简化字段与明细 URL)
  • bus:校车查询(date,crs01/02 途径站)

说明:多数接口会返回可直接访问的明细 URL(如图书详情、校车班次详情、校园卡流水等),方便在外部工具中二次跳转或扩展操作;校车接口还会返回 idcross 站点与班次详情链接。