Preface¶
When building DevOps-related agents in DeepSeek Harness (DSH), the common practice is to have humans click through the OneDev web interface, or to write your own scripts calling /~api/*. OneDev itself provides a complete Git/CI/CD and administration REST API, but the model side lacks a tool surface with authentication, enumerability, and parameter schemas.
dsh-onedev introduced below (repository Altermoe/dsh-onedev, maintained by Altermoe) is a DSH community plugin categorized under model inference. It bundles a standalone MCP server dsh-onedev-mcp; once bridged through DSH’s built-in @deepseek-ai/dsh-mcp-client, OneDev administration operations appear in the harness tool list as mcp__onedev__…, so the model can call them directly instead of going through the Web UI.
What Is This¶
dsh-onedev (npm package name dsh-onedev, current version 0.1.0, MIT license) does two things:
- Provides an MCP Server that accesses the OneDev REST API (
/~api/*) using an OneDev access token or account/password credentials. - When used as a DSH bundle, adds a top-level OneDev configuration section under dsh Web Settings, with cards to manage connections across multiple environments; runtime reads come from the credential store, so configuring
ONEDEV_*environment variables is generally unnecessary.
The tagline matches the GitHub repository title: DeepSeek Harness Plugin for OneDev.
Core Features¶
All capabilities below are sourced from the project README and docs/dsh-integration.md.
MCP Tool Surface¶
- 61 tools: about 57 are administration-oriented (users, groups, roles, group membership and admin authorization, projects, permissions, build agents, agent tokens, builds and logs, global settings, access tokens, etc.); another 3 are OneDev official documentation query tools, plus the environment discovery tool
onedev_list_environments. - Generic direct request
onedev_api_request: issues any authenticated request toONEDEV_URL/~api/*, covering REST surfaces that are not individually wrapped. - Documentation tools usable standalone:
onedev_docs_search/onedev_docs_read/onedev_docs_listintegrate with docs.onedev.io and can be used without an OneDev connection or credentials. - Tools generate JSON Schemas from Zod, making parameters easy for models to understand.
Multi-Environment & Transport¶
- Multiple OneDev environments can be configured (each with its own URL, credentials, and display slug); besides
onedev_list_environments, every tool accepts an optionalenvironmentparameter, defaulting to the primary environment. - Two transports: stdio (recommended for local DSH mounting) and streamable-http (remote, path
/mcp).
Authentication & Security¶
- Bearer access token (
ONEDEV_TOKEN) or account/password (ONEDEV_AUTH_TYPE=password+ONEDEV_USERNAME/ONEDEV_PASSWORD, HTTP Basic). - Optional read-only mode
ONEDEV_MCP_READONLY=truerejects all mutating requests; API timeout can be configured (e.g.,ONEDEV_API_TIMEOUT_MS).
DSH Web & Local Setup¶
- After installing the bundle: Settings → OneDev displays environments as cards, where you can add, edit, probe connections, set primary, and delete; the Host exposes loopback
/api/onedev/configand/api/onedev/probe. - Setup console:
npm run setup(ornode bin/dsh-onedev-mcp.mjs --setup) openshttp://127.0.0.1:8770/to enter URL and credentials and persist them (the port can be changed viaONEDEV_MCP_PORT), alleviating the “you must log into the Web UI first to create a token” problem. Credentials are written to~/.config/dsh-onedev/config.jsonby default (permission0600, overridable withONEDEV_CONFIG_FILE).
Tool naming convention after bridging: when serverName is set to onedev, tools appear as e.g. mcp__onedev__users_list.
Environment & Dependencies¶
- Node.js:
^22.19.0 || >=24.0.0(the project is developed and tested on Node 26). - DSH: requires DeepSeek Harness 0.2.x when used as a bundle (
engines.dsh:^0.2.0-rc.2); running the MCP standalone does not depend on DSH. - A reachable OneDev server (example:
http://localhost:6610); administration interfaces typically require a token or admin account with the appropriate permissions.
Installation & Activation¶
Building the MCP from Source¶
Run the following in the cloned or extracted repository directory (as in the README):
npm install # install dependencies
npm run build # compile TypeScript → dist/
npm test # build + unit tests + stdio smoke + HTTP smoke
Start the MCP in everyday use:
npm start
# equivalent to: node bin/dsh-onedev-mcp.mjs
Development mode:
npm run dev
First-time credential configuration (optional; shares storage with Web Settings):
npm run setup
As a DSH Profile Bundle (Recommended)¶
docs/dsh-integration.md explains that starting from v0.1.0 the plugin ships with a dsh bundle. After adding the package to the profile’s dsh.profile.bundles and completing installation, cordis.patch.yml inserts the dsh-onedev Host plugin and the @deepseek-ai/dsh-mcp-client line for dsh-onedev-mcp (env: {}). Connection info is configured in Settings → OneDev; the MCP reads from the credential store on every tool call, so restarting dsh is generally unnecessary after saving.
After upgrading the bundle, run npm run build and restart dsh according to the project’s script instructions (e.g., scripts/restart-dsh.sh).
Manual stdio Mounting (YAML Example)¶
If you are not using the bundle, add an @deepseek-ai/dsh-mcp-client entry to your dsh configuration (replace the path with the absolute path on your machine):
plugins:
- id: dsh-onedev
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: onedev
transport: stdio
command: node
args: ['/absolute/path/to/dsh-onedev/bin/dsh-onedev-mcp.mjs']
env:
ONEDEV_URL: !!js process.env.ONEDEV_URL
ONEDEV_TOKEN: !!js process.env.ONEDEV_TOKEN
toolCallTimeoutMs: 60000
failOnStartupError: false
If credentials have already been written via npm run setup or Web Settings, the entire env block can be omitted; when environment variables and storage coexist, environment variables take precedence.
HTTP Mode (Remote Sharing)¶
Start on a host that can reach OneDev:
ONEDEV_URL=https://onedev.internal:6610 \
ONEDEV_TOKEN="$ONEDEV_TOKEN" \
ONEDEV_MCP_TRANSPORT=streamable-http \
ONEDEV_MCP_HOST=0.0.0.0 \
ONEDEV_MCP_PORT=8765 \
node /absolute/path/to/dsh-onedev/bin/dsh-onedev-mcp.mjs
On the DSH side, use transport: streamable-http with url: http://onedev-mcp-host:8765/mcp (see the integration docs Option B for details).
Typical Usage¶
- Discover environments: call
mcp__onedev__onedev_list_environments, optionally with{"query":"prod"}; pass"environment":"<slug>"in subsequent tools. - List users (primary environment):
mcp__onedev__users_list→{"term":"alice","count":50}. - List users (specific environment):
{"environment":"staging","term":"alice"}. - Grant admin rights: first
mcp__onedev__group_get_id→{"name":"Administrators"}, then callgroup_members_addwithuserIdandgroupId. - Create a project:
mcp__onedev__project_create→{"name":"team/app","codeManagement":true}. - Read-only protection: set
ONEDEV_MCP_READONLY=true. - Unwrapped interfaces:
mcp__onedev__onedev_api_request→{"method":"GET","path":"/issues?project=app"}.
The complete tool table is in the repository’s docs/tools.md (generated by npm run docs).
Use Cases & Cautions¶
Suitable for: teams already using OneDev for Git/CI/CD who want to operate users, projects, agents, builds, and settings via natural language or agent workflows inside DSH conversations or automation; or teams that need to manage multiple OneDev instances simultaneously.
Important reminders:
- The MCP and Host plugin run under the permissions of the current dsh process; whatever the token or admin password can do is what the model can reach. Read the source code and the MIT license before installing, and consider enabling read-only mode.
- Administration tokens need the admin permissions described in the docs; 401/403 errors are usually token permission or expiry issues.
- The community directory skillhub.cn plugin page and GitHub are community-maintained and are not officially affiliated with DeepSeek / High-Flyer; the DSH ecosystem follows “everything is a plugin”, and facts in this article are based on the repository documentation.
Conclusion¶
dsh-onedev turns the OneDev administration REST API into a set of MCP tools and optionally manages multi-environment credentials via Web/Setup, making it suitable for incorporating OneDev operations into DSH agent workflows. For more information, visit the directory page and the GitHub repository (which includes docs/dsh-integration.md and docs/onedev-api.md).