这是一个MCP服务器,允许您通过连接到Currents来为AI代理提供测试结果上下文。这对于要求AI修复或优化CI中失败的测试非常有用。
| 工具 | 描述 |
|---|---|
currents-get-projects | 获取所有可用项目的列表。 |
currents-get-runs | 获取特定项目最新的运行列表。 |
currents-get-run-details | 获取特定测试运行的详细信息。 |
currents-get-spec-instances | 获取特定测试规范文件执行的调试数据。 |
currents-get-spec-files-performance | 获取特定项目中测试规范文件的历史性能指标。 |
currents-get-tests-performance | 获取特定项目中测试的历史性能指标。 |
currents-get-tests-signatures | 根据测试规范文件名和测试名称获取测试签名。 |
currents-get-test-results | 根据测试签名从测试结果中获取调试数据。 |
按照此处的说明获取Currents API密钥。
mcp.json中。{
"mcpServers": {
"currents": {
"command": "npx",
"args": [
"-y",
"@currents/mcp"
],
"env": {
"CURRENTS_API_KEY": "your-api-key"
}
}
}
}
将以下内容添加到您的claude_desktop_config.json中:
{
"mcpServers": {
"currents": {
"command": "npx",
"args": [
"-y",
"@currents/mcp"
],
"env": {
"CURRENTS_API_KEY": "your-api-key"
}
}
}
}
通过MCP等AI工具连接到Currents时,您正在授予它们访问您的API密钥、测试结果和CI元数据的权限。确保您使用的任何AI代理或服务都经过审查,并且它们能够安全地处理您的数据是您的责任。
我们欢迎各种形式的贡献——错误修复、功能改进和文档更新!
git clone https://github.com/<your-username>/currents-mcp.git
cd currents-mcp
cd mcp-server
npm install
npm run build
npm test
有关更多测试详情,请参阅TESTING.md。npm start
您应该看到:Currents MCP Server 正在标准输入输出上运行。要使用本地MCP客户端(例如Cursor或Claude桌面版)进行测试,请将客户端指向您构建的服务器:
node./mcp-server/build/index.jsCURRENTS_API_KEY设置为有效的密钥客户端配置示例片段:
{
"mcpServers": {
"currents": {
"command": "node",
"args": ["./mcp-server/build/index.js"],
"env": {
"CURRENTS_API_KEY": "your-api-key"
}
}
}
}
要在没有LLM的情况下本地测试工具,您可以使用以下命令:
npm run build
然后运行工具脚本:
node scripts/call-tools.js
git checkout -b feat/short-description
mcp-server/src/下进行更改,然后重新构建和运行:
npm run build && npm start
*.test.ts文件中为您的更改编写测试npm test
git push origin feat/short-description
通过贡献,您同意您的贡献将根据ISC许可证(如包元数据中指定的)进行许可。