mcp-onedev
TOD - TheOneDev 命令行工具
TOD (TheOneDev) 是一款适用于 OneDev 13+ 的强大命令行工具,它通过允许您针对本地更改运行 CI/CD 作业、将拉取请求检出到本地工作目录、查询和编辑问题/PR/构建,以及通过附带的技能文件驱动 AI 代理执行上述所有操作,从而简化您的开发工作流。
功能
查询和编辑 OneDev 实体 — 问题、拉取请求和构建 — 直接从 shell 操作。
针对本地更改、分支或标签运行 CI/CD 作业,并支持实时日志流式传输 (
tod build run --local,--branch或--tag)。在本地检出拉取请求 (
tod pr checkout)。检查并迁移
.onedev-buildspec.yml到最新版本 (tod build check-spec)。代理技能,位于
skills/目录下,用于指导 Claude Code、Cursor 以及其他支持SKILL.md的代理通过tod驱动 OneDev 工作流。跨平台支持 (Windows, macOS, Linux)。
Related MCP server: AlibabaCloud DevOps MCP Server
安装
要安装 tod,请将二进制文件放入您的 PATH 中。
下载预构建的二进制文件
https://code.onedev.io/onedev/tod/~builds?query=%22Job%22+is+%22Release%22
从源码构建
要求: Go 1.22.1 或更高版本。
git clone https://code.onedev.io/onedev/tod.git
cd tod
go build配置
运行 tod config set 以交互方式创建或更新配置文件:
tod config set
# OneDev server URL (e.g. https://onedev.example.com): ...
# OneDev personal access token (input is visible): ...或者在非交互式设置中通过标志传递所有内容:
tod config set \
--server-url https://onedev.example.com \
--access-token your-personal-access-token \
--non-interactivetod config get 打印当前配置(令牌会被屏蔽),tod config get <属性名> 打印单个属性,tod config set <属性名> <属性值> 更新一个属性。属性名称为 server-url 和 access-token。tod config path 打印正在使用的路径。
配置文件将在以下位置搜索(第一个匹配项生效):
$XDG_CONFIG_HOME/tod/config~/.config/tod/config~/.todconfig(旧版回退)
它使用 INI 格式,并以 0600 模式写入:
server-url=https://onedev.example.com
access-token=your-personal-access-token快速入门
# Run CI against your uncommitted changes
cd /path/to/onedev-git-repository
tod build run --local ci
# Run ci job against the main branch
tod build run --branch main ci
# Check out pull request PROJ-123 into the current working directory
tod pr checkout PROJ-123
# Query open issues assigned to you
tod issue list --query 'assignee is me and state is "Open"'
# Inspect the most recent failing build for a project
tod build list --query 'successful is false' --count 1
tod build get <ref>
tod build get-log <ref>请参阅 cli.md 获取完整的命令参考。
代理技能
TOD 在 skills/ 下附带了四个与工具无关的 SKILL.md 文件,用于指导 AI 代理如何通过 CLI 驱动常见的 OneDev 工作流:
using-tod— 通过tod进行任何 OneDev 交互的综合指南edit-build-spec— 创建或编辑.onedev-buildspec.ymlinvestigate-build-problems— 调试失败的构建review-pull-request— 执行结构化的拉取请求审查
请参阅 skills.md 了解如何将这些技能安装到 Claude Code、Cursor 或任何其他读取 SKILL.md 文件的代理中。
本地 CI 运行注意事项
Nginx 配置
如果 OneDev 运行在 Nginx 之后,请禁用 HTTP 缓冲以实现日志流式传输:
location /~api/streaming {
proxy_pass http://localhost:6610/~api/streaming;
proxy_buffering off;
}详情请参阅 OneDev Nginx 设置文档。
安全注意事项
如果作业访问作业机密,请确保清除授权字段以允许所有作业。将授权设置为允许所有分支是不够的 — 本地更改会被推送到不属于任何分支的临时引用中。
性能提示
大型仓库 — 在检出步骤中使用适当的克隆深度,而不是完整历史记录。
外部依赖 — 使用 缓存 来处理下载和中间文件。
构建优化 — 缓存生成缓慢的中间文件。
贡献
TOD 是 OneDev 生态系统的一部分。有关贡献、问题和功能请求,请访问 OneDev 项目。
许可证
请参阅 license.txt。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -licenseBqualityNot gradedmaintenanceEnables comprehensive Git and GitHub operations through 30 DevOps tools including repository management, file operations, workflows, and advanced Git features. Provides complete Git functionality without external dependencies for seamless integration with Gitea and GitHub platforms.18819
- AlicenseBqualityAmaintenanceEnables AI assistants to interact with Alibaba Cloud Yunxiao DevOps platform for managing projects, code repositories, work items, pipelines, deployments, and testing workflows through comprehensive organization, development, and delivery tools.773,216156Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAutomates iteration management and code review submission workflows with DingTalk authentication. Supports interactive 5-step iteration creation, Git integration, smart time estimation, and automatic submission to company CodeReview systems.411ISC
- AlicenseNot gradedqualityDmaintenanceAutomates routine DevOps tasks like Jenkins builds and GitLab merge requests through the MCP protocol, simplifying daily operations.201MIT
Related MCP Connectors
Multi-CI security scanner with a live threat-intel feed of compromised CI components
One PAT, any MCP agent: Vercel, GitHub, Cloudflare, Supabase, GCP — unified dev infra gateway.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/theonedev/tod'
If you have feedback or need assistance with the MCP directory API, please join our Discord server