azdo-onprem-mcp

azdo-onprem-mcp

Minimal MCP server for self-hosted Azure DevOps Server (on-premises). Enables interaction with work items, WIQL search, and project listing via REST APIs using PAT and basic auth.

Category
访问服务器

README

azdo-onprem-mcp

Minimal Model Context Protocol server for self-hosted Azure DevOps Server (on-premises). It uses the REST APIs with a PAT and Basic auth (curl -u ":$PAT"), same as Azure DevOps Services patterns but with your own base URL.

Not for dev.azure.com only—any DevOps Server reachable over HTTPS works if the APIs respond.

Requirements

  • Node.js 18+
  • A Personal Access Token with at least Work Items (Read) (and any other scopes you rely on)
  • VPN/network access to your server if required

Install

npm install -g azdo-onprem-mcp

Or run without a global install:

npx azdo-onprem-mcp

The package exposes the CLI binary azdo-onprem-mcp (see package.jsonbin).

Environment variables

Variable Required Description
AZURE_BASE_URL Yes Team project root URL, same as in the browser for that project, e.g. https://devops.example.com/Collection/MyProject (no trailing slash required).
AZURE_PAT Yes Personal Access Token. Sent as Basic auth with an empty username (Authorization: Basic base64(":PAT")).
AZURE_COLLECTION_URL No Overrides collection root for listProjects only. If unset, the collection URL is derived by dropping the last path segment of AZURE_BASE_URL (e.g. .../Collection/Project.../Collection).
AZURE_HTTP_TIMEOUT_MS No HTTP timeout in ms (default 120000).
AZURE_DEVOPS_API_VERSION No REST api-version query parameter (default 7.1). Try 7.0 or 6.0 if your server is older.
MCP_DEBUG No Set to 1 to log request URLs and timing on stderr (no secrets).

Do not commit secrets. Prefer Cursor/IDE env injection or your OS secret store.

Cursor (or any MCP client)

Example mcp.json entry using the published package (-y lets npx install or run without an interactive prompt, which MCP clients need):

{
  "mcpServers": {
    "azdo-onprem": {
      "command": "npx",
      "args": ["-y", "azdo-onprem-mcp"],
      "env": {
        "AZURE_BASE_URL": "https://devops.example.com/Collection/MyProject",
        "AZURE_PAT": "<your-pat>"
      }
    }
  }
}

Alternatives

  • Global install: "command": "azdo-onprem-mcp" with no args (or an empty args array), if npm install -g azdo-onprem-mcp put the binary on your PATH.
  • Local clone: after npm install and npm run build, use "command": "node" and "args": ["/absolute/path/to/azdo-onprem-mcp/dist/server.js"] (adjust the path to your machine).

Reload MCP / restart the editor after changing env.

Windows / npx: From v1.0.1, HTTP calls use Node’s built-in fetch only (the axios dependency was removed). That avoids a known failure where npx pulled a broken tree and mime-db could not load db.json. If you still see strange missing-module errors, run npm cache clean --force and try again.

Tools

Tool Description
getWorkItem GET/_apis/wit/workitems/{id}? $expand=all — returns the full REST body as MCP structuredContent and as JSON text. Empty field values are often omitted by Azure DevOps; unset fields are not listed. If the chat UI shows a short snippet, use the structured payload (or your client’s tool-result JSON view).
searchWorkItems WIQL search on System.Title (contains), then batch-fetch details — returns { id, title, state }[].
listProjects GET/_apis/projects at the collection URL (see AZURE_COLLECTION_URL / derivation above).

Verify with curl (optional)

Mac/Linux: use single quotes around the URL so $expand is not interpreted by the shell.

export AZURE_PAT='your-pat'
curl -sS -u ":$AZURE_PAT" \
  'https://your-host/Collection/MyProject/_apis/wit/workitems/12345?$expand=all&api-version=7.1'

Development

From a clone of this repository:

npm install
npm run build
npm start

Source lives in src/ (TypeScript); npm run build emits to dist/. With AZURE_BASE_URL and AZURE_PAT set, npm start runs the MCP server on stdio (stop with Ctrl+C). Point your MCP client at this command or use npx azdo-onprem-mcp after publishing.

Publish to npm

From the repo root (with npm login if needed):

npm run build
npm publish

prepack runs npm run build automatically, so dist/ is always fresh in the tarball. For a scoped package name (e.g. @your-scope/azdo-onprem-mcp), use npm publish --access public the first time.

License

MIT (see package.json"license").

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选