MonkeyType MCP Server

MonkeyType MCP Server

site icon
2025.05.09 0
JavaScript打字测试API 网关LLM 集成开发效率娱乐功能
MonkeyType MCP Server 是一个基于 Model Context Protocol (MCP) 的服务器,提供对 MonkeyType API 所有端点的访问。它允许大型语言模型 (LLMs) 通过 MCP 工具与 MonkeyType API 进行交互。该服务器具有简单的 API 密钥认证、全面的错误处理和速率限制意识等特性。
View on GitHub

Overview

基本能力

产品定位

MonkeyType MCP Server 是一个中间件服务,旨在为大型语言模型 (LLMs) 提供与 MonkeyType API 交互的能力。

核心功能

  • 暴露所有 MonkeyType API 端点作为 MCP 工具
  • 兼容任何支持 Model Context Protocol 的 LLM
  • 基于 API 密钥的简单认证
  • 全面的错误处理
  • 速率限制意识(遵守 MonkeyType 的速率限制)

适用场景

  • 开发需要与 MonkeyType 交互的 LLM 应用
  • 构建 MonkeyType 数据分析工具
  • 创建 MonkeyType 用户行为分析系统
  • 开发 MonkeyType 相关的自动化工具

工具列表

用户工具

  • check_username - 检查用户名是否可用
  • get_personal_bests - 获取用户的个人最佳成绩
  • get_tags - 获取用户的标签
  • get_stats - 获取用户的统计数据
  • get_profile - 获取用户资料
  • send_forgot_password_email - 发送忘记密码邮件
  • get_current_test_activity - 获取当前测试活动
  • get_streak - 获取用户的连续登录天数

测试结果工具

  • get_results - 获取最多 1000 条测试结果
  • get_result_by_id - 通过 ID 获取结果
  • get_last_result - 获取最后一条结果

公共工具

  • get_speed_histogram - 获取速度直方图
  • get_typing_stats - 获取打字统计数据

排行榜工具

  • get_leaderboard - 获取排行榜
  • get_leaderboard_rank - 获取排行榜排名
  • get_daily_leaderboard - 获取每日排行榜
  • get_weekly_xp_leaderboard - 获取每周经验值排行榜

PSA 工具

  • get_psas - 获取 PSA

引用工具

  • is_submission_enabled - 检查是否启用了引用提交

服务器配置工具

  • get_configuration - 获取服务器配置

常见问题解答

  1. 如何获取 MonkeyType API 密钥?
  2. 登录 MonkeyType 账户
  3. 点击右上角的个人资料图标
  4. 选择"Account"
  5. 导航到"Ape Keys"标签
  6. 点击"Generate New"创建新 API 密钥
  7. 为密钥命名并选择适当的作用域
  8. 点击"Generate"并复制生成的密钥

  9. 如何配置环境变量?

  10. MONKEYTYPE_API_KEY: (必需) 您的 MonkeyType API 密钥
  11. MONKEYTYPE_USERNAME: (可选) 您的 MonkeyType 用户名或 UID

使用教程

使用依赖

  • Node.js 环境
  • npm 或 npx

安装教程

使用 npx (推荐)

npx monkeytype-mcp

全局安装

npm install -g monkeytype-mcp
monkeytype-mcp

手动安装

git clone https://github.com/CodeDreamer06/MonkeytypeMCP.git
cd MonkeytypeMCP
npm install
npm start

调试方式

  1. 确保环境变量已正确设置
  2. 检查服务器是否正常运行
  3. 使用示例工具调用测试连接:
{
  "name": "get_configuration",
  "arguments": {}
}

IDE 集成

VS Code 集成

  1. 打开 VS Code 设置
  2. 搜索"MCP Server"
  3. 添加新的 MCP 服务器配置:
  4. 名称: MonkeyType MCP
  5. 命令: npx monkeytype-mcp
  6. 类型: Standard Input/Output (stdio)

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。