mcp-onedev
Provides tools for interacting with OneDev 13+ through Git repositories, enabling AI agents to run CI/CD jobs against local changes, checkout pull requests, manage build specifications, and stream job logs in real-time.
Requires NGINX configuration for proper real-time log streaming when OneDev is deployed behind a reverse proxy, specifically disabling HTTP buffering for streaming API endpoints.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-onedevrun the CI job for my current changes to test them before committing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TOD - TheOneDev CLI Tool
TOD (TheOneDev) is a powerful command-line tool for OneDev 15+ that streamlines your development workflow by letting you run CI/CD jobs against local changes, check out pull requests into a local working directory, query and edit issues/PRs/builds, and drive all of the above from AI agents via shipped skill files.
Features
Query and edit OneDev entities — issues, pull requests, and builds — directly from the shell.
Run CI/CD jobs against local changes, branches, or tags with real-time log streaming (
tod build run --local,--branch, or--tag).Check out pull requests locally (
tod pr checkout).Check and migrate
.onedev-buildspec.ymlto the latest version (tod build check-spec).Agent skills under
skills/that teach Claude Code, Cursor, and other SKILL.md-aware agents to drive OneDev workflows viatod.Cross-platform support (Windows, macOS, Linux).
Installation
To install tod, put the binary on your PATH.
Download pre-built binaries
https://code.onedev.io/onedev/tod/~builds?query=%22Job%22+is+%22Release%22
Build from source
Requirements: Go 1.22.1 or higher.
git clone https://code.onedev.io/onedev/tod.git
cd tod
go buildConfiguration
Run tod config set to create or update the config file interactively. Each
property is prompted for in turn — the current server URL is shown in
[brackets] as a default (press Enter to keep it, or type a new value to
replace it), and the access-token prompt is always blank (press Enter to
keep the existing token, or type a new one to replace it):
tod config set
# OneDev server URL [https://onedev.example.com]: ...
# OneDev personal access token (press Enter to keep existing): ...For scripts and other non-interactive setups, pass the property name and value positionally to update one property at a time without prompts:
tod config set server-url https://onedev.example.com
tod config set access-token your-personal-access-tokentod config get prints the active configuration (with the token redacted)
and tod config get <property name> prints a single property. Property
names are server-url and access-token. tod config path prints the
path being used.
The config file is searched at the following locations (first match wins):
$XDG_CONFIG_HOME/tod/config~/.config/tod/config
It uses INI format and is written with mode 0600:
server-url=https://onedev.example.com
access-token=your-personal-access-tokenQuick start
# Run CI job 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 'not(successful)' --count 1
tod build get <ref>
tod build get-log <ref>See cli.md for the full command reference.
Agent skills
TOD ships seven tool-agnostic SKILL.md files under skills/ that
teach AI agents how to drive common OneDev workflows through the CLI:
using-tod— umbrella guide for any OneDev interaction viatodedit-build-spec— create or edit.onedev-buildspec.ymlinvestigate-build-failure— debug a failing buildreview-pull-request— perform a structured pull request reviewgenerate-commit-message— compose a commit message that respects the project's commit-message requirement and the active issuework-on-issue— create the issue branch on the server, switch the local checkout to it, and read the issue to understand what to dosubmit-work— commit pending changes, push the issue branch, and open a pull request summarizing the work
See skills/README.md for how to install these into Claude
Code, Codex, Cursor, or any other agent that reads SKILL.md files.
Notes for local CI runs
Nginx configuration
If OneDev is running behind Nginx, disable HTTP buffering for log streaming:
location /~api/streaming {
proxy_pass http://localhost:6610/~api/streaming;
proxy_buffering off;
}See the OneDev Nginx setup documentation for details.
Security considerations
If the job accesses job secrets, make sure the authorization field is cleared to allow all jobs. Setting authorization to allow all branches is not sufficient — local changes are pushed to a temporal ref that does not belong to any branch.
Performance tips
Large repositories — use an appropriate clone depth in checkout steps instead of full history.
External dependencies — use caching for downloads and intermediate files.
Build optimization — cache slow-to-generate intermediate files.
Contributing
TOD is part of the OneDev ecosystem. For contributions, issues, and feature requests, visit the OneDev project.
License
See 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.
Latest Blog Posts
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