devops-mcp 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
devops_mcp/__init__.py ADDED
@@ -0,0 +1 @@
1
+ """Azure DevOps MCP package."""
devops_mcp/_app.py ADDED
@@ -0,0 +1,40 @@
1
+ """FastMCP application instance.
2
+
3
+ This module exists to avoid circular imports between server.py and tool
4
+ modules. Tool modules import ``mcp`` from here; server.py imports ``mcp``
5
+ from here and registers tool modules.
6
+ """
7
+
8
+ import os
9
+
10
+ from mcp.server.fastmcp import FastMCP
11
+
12
+ from devops_mcp.client import devops_lifespan
13
+
14
+ mcp = FastMCP(
15
+ "devops_mcp",
16
+ instructions=(
17
+ "Azure DevOps MCP server. Use devops_list_pipelines to discover pipelines, "
18
+ "devops_list_pipeline_runs to see recent runs, devops_list_run_logs + "
19
+ "devops_get_run_log_content to read build logs, devops_list_build_artifacts "
20
+ "to inspect artifacts, devops_list_repositories and devops_list_branches for "
21
+ "source control, and devops_query_work_items or devops_get_work_item for "
22
+ "work item tracking."
23
+ ),
24
+ lifespan=devops_lifespan,
25
+ )
26
+
27
+ _ALLOW_WRITE = os.environ.get("AZDO_ALLOW_WRITE", "").lower() == "true"
28
+ _ALLOW_DELETE = os.environ.get("AZDO_ALLOW_DELETE", "").lower() == "true"
29
+
30
+
31
+ def write_tool(**kwargs):
32
+ if _ALLOW_WRITE:
33
+ return mcp.tool(**kwargs)
34
+ return lambda f: f
35
+
36
+
37
+ def delete_tool(**kwargs):
38
+ if _ALLOW_DELETE:
39
+ return mcp.tool(**kwargs)
40
+ return lambda f: f