@octopusdeploy/mcp-server 0.1.2 → 0.2.1

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.
Files changed (84) hide show
  1. package/LICENSE +373 -373
  2. package/README.md +204 -210
  3. package/dist/helpers/getClientConfigurationFromEnvironment.js +2 -2
  4. package/dist/helpers/getClientConfigurationFromEnvironment.js.map +1 -1
  5. package/dist/index.js +13 -11
  6. package/dist/index.js.map +1 -1
  7. package/dist/tools/getAccount.d.ts +3 -0
  8. package/dist/tools/getAccount.d.ts.map +1 -0
  9. package/dist/tools/getAccount.js +40 -0
  10. package/dist/tools/getAccount.js.map +1 -0
  11. package/dist/tools/getBranches.js +4 -3
  12. package/dist/tools/getBranches.js.map +1 -1
  13. package/dist/tools/getCertificate.d.ts +3 -0
  14. package/dist/tools/getCertificate.d.ts.map +1 -0
  15. package/dist/tools/getCertificate.js +40 -0
  16. package/dist/tools/getCertificate.js.map +1 -0
  17. package/dist/tools/getCurrentUser.js +3 -3
  18. package/dist/tools/getDeploymentProcess.js +3 -3
  19. package/dist/tools/getDeploymentTarget.js +3 -3
  20. package/dist/tools/getKubernetesLiveStatus.js +4 -3
  21. package/dist/tools/getKubernetesLiveStatus.js.map +1 -1
  22. package/dist/tools/getMissingTenantVariables.js +3 -3
  23. package/dist/tools/getReleaseById.js +1 -1
  24. package/dist/tools/getTaskById.js +1 -1
  25. package/dist/tools/getTaskDetails.js +1 -1
  26. package/dist/tools/getTaskRaw.js +1 -1
  27. package/dist/tools/getTenantById.js +2 -2
  28. package/dist/tools/getTenantById.js.map +1 -1
  29. package/dist/tools/getTenantVariables.js +6 -6
  30. package/dist/tools/index.d.ts +4 -0
  31. package/dist/tools/index.d.ts.map +1 -1
  32. package/dist/tools/index.js +4 -0
  33. package/dist/tools/index.js.map +1 -1
  34. package/dist/tools/listAccounts.d.ts +3 -0
  35. package/dist/tools/listAccounts.d.ts.map +1 -0
  36. package/dist/tools/listAccounts.js +54 -0
  37. package/dist/tools/listAccounts.js.map +1 -0
  38. package/dist/tools/listCertificates.d.ts +3 -0
  39. package/dist/tools/listCertificates.d.ts.map +1 -0
  40. package/dist/tools/listCertificates.js +62 -0
  41. package/dist/tools/listCertificates.js.map +1 -0
  42. package/dist/tools/listDeploymentTargets.js +3 -3
  43. package/dist/tools/listDeployments.js +3 -3
  44. package/dist/tools/listEnvironments.js +3 -3
  45. package/dist/tools/listProjects.js +1 -1
  46. package/dist/tools/listReleases.js +3 -3
  47. package/dist/tools/listReleasesForProject.js +3 -3
  48. package/dist/tools/listSpaces.js +1 -1
  49. package/dist/tools/listTenants.js +3 -3
  50. package/dist/types/accountTypes.d.ts +218 -0
  51. package/dist/types/accountTypes.d.ts.map +1 -0
  52. package/dist/types/accountTypes.js +127 -0
  53. package/dist/types/accountTypes.js.map +1 -0
  54. package/dist/types/certificateTypes.d.ts +74 -0
  55. package/dist/types/certificateTypes.d.ts.map +1 -0
  56. package/dist/types/certificateTypes.js +46 -0
  57. package/dist/types/certificateTypes.js.map +1 -0
  58. package/dist/types/deploymentTargetTypes.d.ts +1 -6
  59. package/dist/types/deploymentTargetTypes.d.ts.map +1 -1
  60. package/dist/types/deploymentTargetTypes.js +1 -5
  61. package/dist/types/deploymentTargetTypes.js.map +1 -1
  62. package/dist/types/toolConfig.d.ts +15 -1
  63. package/dist/types/toolConfig.d.ts.map +1 -1
  64. package/dist/types/toolConfig.js +57 -1
  65. package/dist/types/toolConfig.js.map +1 -1
  66. package/dist/utils/logger.js +1 -1
  67. package/dist/utils/logger.js.map +1 -1
  68. package/package.json +58 -50
  69. package/dist/resources/index.d.ts +0 -3
  70. package/dist/resources/index.d.ts.map +0 -1
  71. package/dist/resources/index.js +0 -4
  72. package/dist/resources/index.js.map +0 -1
  73. package/dist/resources/spacesResource.d.ts +0 -3
  74. package/dist/resources/spacesResource.d.ts.map +0 -1
  75. package/dist/resources/spacesResource.js +0 -54
  76. package/dist/resources/spacesResource.js.map +0 -1
  77. package/dist/tools/getLatestDeployment.d.ts +0 -3
  78. package/dist/tools/getLatestDeployment.d.ts.map +0 -1
  79. package/dist/tools/getLatestDeployment.js +0 -85
  80. package/dist/tools/getLatestDeployment.js.map +0 -1
  81. package/dist/types/resourceCollection.d.ts +0 -9
  82. package/dist/types/resourceCollection.d.ts.map +0 -1
  83. package/dist/types/resourceCollection.js +0 -2
  84. package/dist/types/resourceCollection.js.map +0 -1
package/README.md CHANGED
@@ -1,210 +1,204 @@
1
- # 🐙 Octopus Deploy Official MCP Server (Early Access)
2
-
3
- [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) allows the AI assistants you use in your day to day work, like Claude Code, or ChatGPT, to connect to the systems and services you own in a standardized fashion, allowing them to pull information from those systems and services to answer questions and perform tasks.
4
-
5
- The Octopus MCP Server provides your AI assistant with powerful tools that allow it to inspect, query, and diagnose problems within your Octopus instance, transforming it into your ultimate DevOps wingmate.
6
-
7
- This project is currently in Early Access, and subject to breaking changes.
8
-
9
- ### Octopus Server Compatibility
10
-
11
- TODO: Make stronger guarantees about the version of server this will work against.
12
-
13
- The MCP Server is developed and tested against versions `2025.3.x` of Octopus Server. Most of the APIs used are stable and exist in prior versions of Octopus and should therefore be generally compatible, but we will not be testing or deliberately maintaining compatibility with older versions of Octopus.
14
-
15
- ## 🚀 Installation
16
-
17
- ### Requirements
18
- - Node.js >= v20.0.0
19
- - Octopus Deploy instance that can be accessed by the MCP server via HTTPS
20
- - Octopus Deploy API Key
21
-
22
- ### Configuration
23
-
24
- Full example configuration (for Claude Desktop, Claude Code, and Cursor):
25
- ```json
26
- {
27
- "mcpServers": {
28
- "octopusdeploy": {
29
- "command": "npx",
30
- "args": ["-y", "@octopusdeploy/mcp-server", "--api-key", "YOUR_API_KEY", "--server-url", "https://your-octopus.com"]
31
- }
32
- }
33
- }
34
- ```
35
-
36
- The Octopus MCP Server is typically configured within your AI Client of choice.
37
-
38
- It is packaged as an npm package and executed via Node's `npx` command. Your configuration will include the command invocation `npx`, and a set of arguments that supply the Octoups MCP Server package and provide the Octopus Server URL and API key required, if they are not available as environment variables.
39
-
40
- The command line invocation you will be configuring will be one of the two following variants:
41
-
42
- ```bash
43
- npx -y @octopusdeploy/mcp-server
44
- ```
45
-
46
- With configuration provided via environment variables:
47
- ```bash
48
- OCTOPUS_API_KEY=API-KEY
49
- OCTOPUS_SERVER_URL=https://your-octopus.com
50
- ```
51
-
52
- Or with configuration supplied via the command line:
53
- ```bash
54
- npx -y @octopusdeploy/mcp-server --server-url https://your-octopus.com --api-key YOUR_API_KEY
55
- ```
56
-
57
- ### Configuration Options
58
-
59
- The Octopus MCP Server supports several command-line options to customize which tools are available.
60
-
61
- If you are not sure which tools you require, we recommend running without any additional command-line options and using the provided defaults.
62
-
63
- #### Toolsets
64
- Use the `--toolsets` parameter to enable specific groups of tools:
65
-
66
- ```bash
67
- # Enable all toolsets (default)
68
- npx -y @octopusdeploy/mcp-server
69
-
70
- # Enable only specific toolsets
71
- npx -y @octopusdeploy/mcp-server --toolsets projects,deployments
72
-
73
- # Enable all toolsets explicitly
74
- npx -y @octopusdeploy/mcp-server --toolsets all
75
- ```
76
-
77
- Available toolsets:
78
- - **core** - Basic operations (always enabled)
79
- - **projects** - Project operations
80
- - **deployments** - Deployment operations
81
- - **releases** - Release management
82
- - **tasks** - Task operations
83
- - **tenants** - Multi-tenancy operations
84
- - **kubernetes** - Kubernetes operations
85
- - **machines** - Deployment target operations
86
-
87
- #### Read-Only Mode
88
- The server runs in read-only mode by default for security. All current tools are read-only operations.
89
-
90
- ```bash
91
- # Run in read-only mode (default)
92
- npx -y @octopusdeploy/mcp-server --read-only
93
-
94
- # Disable read-only mode (currently no effect as all tools are read-only)
95
- npx -y @octopusdeploy/mcp-server --read-only=false
96
- ```
97
-
98
- #### Complete Examples
99
-
100
- ```bash
101
- # Development setup with only core and project tools
102
- npx -y @octopusdeploy/mcp-server --toolsets core,projects --server-url https://your-octopus.com --api-key YOUR_API_KEY
103
-
104
- # Full production setup with all tools
105
- npx -y @octopusdeploy/mcp-server --toolsets all --read-only --server-url https://your-octopus.com --api-key YOUR_API_KEY
106
- ```
107
-
108
- ### Running from Github Registry (TODO: Remove)
109
-
110
- This is a temporary workaround until we start publishing preview versions to the public npm registry. The following is assuming you are already signed in to the github registry.
111
-
112
- 1. In a new folder install dependencies manually:
113
- ```bash
114
- npm install @octopusdeploy/api-client @modelcontextprotocol/sdk commander dotenv zod
115
- ```
116
-
117
- 2. Create `.npmrc` file with the following contents:
118
- ```bash
119
- @octopusdeploy:registry=https://npm.pkg.github.com
120
- ```
121
-
122
- 3. Install the mcp-server:
123
- ```bash
124
- npm install @octopusdeploy/mcp-server
125
- ```
126
-
127
- 4. Run it via:
128
- ```bash
129
- npx "your/folders/full/path" -y @octopusdeploy/mcp-server
130
- ```
131
-
132
- ## 🔨 Tools
133
-
134
- ### Core Tools
135
- - `list_spaces`: List all spaces in the Octopus Deploy instance
136
- - `list_environments`: List all environments in a given space
137
-
138
- ### Projects
139
- - `list_projects`: List all projects in a given space
140
-
141
- ### Deployments
142
- - `list_deployments`: List deployments in a space with optional filtering
143
-
144
- ### Releases
145
- - `get_release_by_id`: Get details for a specific release by its ID
146
- - `list_releases`: List all releases in a given space
147
- - `list_releases_for_project`: List all releases for a specific project
148
-
149
- ### Tasks
150
- - `get_task_by_id`: Get details for a specific server task by its ID
151
- - `get_task_details`: Get detailed information for a specific server task
152
- - `get_task_raw`: Get raw details for a specific server task
153
-
154
- ### Tenants
155
- - `list_tenants`: List all tenants in a given space
156
- - `get_tenant_by_id`: Get details for a specific tenant by its ID
157
- - `get_tenant_variables`: Get tenant variables by type (all, common, or project)
158
- - `get_missing_tenant_variables`: Get tenant variables that are missing values
159
-
160
- ### Kubernetes
161
- - `get_kubernetes_live_status`: Get live status of Kubernetes resources for a project and environment (only supported in Octopus Server starting with version `2025.3`)
162
-
163
- ### Machines (Deployment Targets)
164
- - `list_deployment_targets`: List all deployment targets in a space with optional filtering
165
- - `get_deployment_target`: Get detailed information about a specific deployment target
166
-
167
- ### Additional Tools
168
- - `get_deployment_process`: Get deployment process by ID for projects or releases
169
- - `get_branches`: Get Git branches for a version-controlled project
170
- - `get_current_user`: Get information about the current authenticated user
171
-
172
- ## Security Considerations
173
-
174
- While the Octopus MCP Server at this stage is a read-only tool, it **can read full deployment logs, which could include production secrets.** Exercise caution when connecting Octopus MCP to tools and models you do not fully trust.
175
-
176
- Running agents in a fully automated fashion could make you vulnerable to exposure via prompt-injection attacks that exfiltrate tokens.
177
-
178
- Exercise caution and mitigate the risks by using least-privileged accounts when connecting to Octopus Server.
179
-
180
- ## Limitations
181
-
182
- ### Data Analysis
183
-
184
- The nature of current AI chat tools and the MCP protocol itself makes it impractical to analyze large amounts of data. Most MCP clients currently do not support chaining tool calls (using the output of one tool as input to the next one) and instead fall back to copying the results token by token, which frequently leads to hallucinations. If you are looking to process historical data from your Octopus instance for analysis purposes, we recommend using the API directly or writing your own MCP client that is capable of processing the tool call results programmatically.
185
-
186
- ### Performance
187
-
188
- The MCP Server is technically just a thin layer on top of the existing Octopus Server API. As such it is capable of retrieving large amounts of data (for example, requesting thousands of deployments). Such queries can have a significant effect on your instance's performance. Instruct your models to only retrieve the minimum set of data that it needs (most models are really good at this out of the box).
189
-
190
- ## Contributing
191
-
192
- We are eager to hear how you plan to use Octopus MCP Server and what features you would like to see included in future version.
193
-
194
- Please use [Issues](https://github.com/OctopusDeploy/mcp-server/issues) to provide feedback, or request features.
195
-
196
- If you are a current Octopus customer, please report any issues you experience using our MCP server to our [support team](mailto:support@octoups.com). This will ensure you get a timely response within our standard support guarantees.
197
-
198
- ## FAQ
199
-
200
- ### Do you have plans to release a remote MCP server?
201
-
202
- We are working on integrating an MCP server directly into Octopus Server. This will open up the door for us to build more complex MCP tools, as well as:
203
-
204
- * Giving Octopus Administrators more granular control over MCP clients
205
- * Natively support OAuth for client authentication
206
- * Integrating security scanning tools into the MCP output
207
-
208
- ## License
209
-
210
- This project is licensed under the terms of Mozilla Public License 2.0 open source license.
1
+ <picture>
2
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/octopusdeploy/mcp-server/blob/main/images/OctopusDeploy_Logo_DarkMode.png?raw=true">
3
+ <source media="(prefers-color-scheme: light)" srcset="https://github.com/octopusdeploy/mcp-server/blob/main/images/OctopusDeploy_Logo_LightMode.png?raw=true">
4
+ <img alt="Octopus Deploy Logo" src="https://raw.githubusercontent.com/octopusdeploy/mcp-server/main/images/OctopusDeploy_Logo_LightMode.png" />
5
+ </picture>
6
+
7
+ # Octopus Deploy Official MCP Server
8
+
9
+ [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) allows the AI assistants you use in your day to day work, like Claude Code, or ChatGPT, to connect to the systems and services you own in a standardized fashion, allowing them to pull information from those systems and services to answer questions and perform tasks.
10
+
11
+ The Octopus MCP Server provides your AI assistant with powerful tools that allow it to inspect, query, and diagnose problems within your Octopus instance, transforming it into your ultimate DevOps wingmate.
12
+
13
+ This project is currently in Early Access, and subject to breaking changes.
14
+
15
+ ### Octopus Server Compatibility
16
+
17
+ Most tools exposed by the MCP Server use stable APIs that have been available from at least version `2021.1` of Octopus Server. Tools that are newer will specify the minimum supported version in the documentation. Alternatively, you can use the command line argument `--list-tools-by-version` to check how specific tools relate to versions of Octopus.
18
+
19
+ ## 🚀 Installation
20
+
21
+ ### Requirements
22
+ - Node.js >= v20.0.0
23
+ - Octopus Deploy instance that can be accessed by the MCP server via HTTPS
24
+ - Octopus Deploy API Key
25
+
26
+ ### Configuration
27
+
28
+ Full example configuration (for Claude Desktop, Claude Code, and Cursor):
29
+ ```json
30
+ {
31
+ "mcpServers": {
32
+ "octopusdeploy": {
33
+ "command": "npx",
34
+ "args": ["-y", "@octopusdeploy/mcp-server", "--api-key", "YOUR_API_KEY", "--server-url", "https://your-octopus.com"]
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ The Octopus MCP Server is typically configured within your AI Client of choice.
41
+
42
+ It is packaged as an npm package and executed via Node's `npx` command. Your configuration will include the command invocation `npx`, and a set of arguments that supply the Octopus MCP Server package and provide the Octopus Server URL and API key required, if they are not available as environment variables.
43
+
44
+ The command line invocation you will be configuring will be one of the two following variants:
45
+
46
+ ```bash
47
+ npx -y @octopusdeploy/mcp-server
48
+ ```
49
+
50
+ With configuration provided via environment variables:
51
+ ```bash
52
+ OCTOPUS_API_KEY=API-KEY
53
+ OCTOPUS_SERVER_URL=https://your-octopus.com
54
+ ```
55
+
56
+ Or with configuration supplied via the command line:
57
+ ```bash
58
+ npx -y @octopusdeploy/mcp-server --server-url https://your-octopus.com --api-key YOUR_API_KEY
59
+ ```
60
+
61
+ ### Configuration Options
62
+
63
+ The Octopus MCP Server supports several command-line options to customize which tools are available.
64
+
65
+ If you are not sure which tools you require, we recommend running without any additional command-line options and using the provided defaults.
66
+
67
+ #### Toolsets
68
+ Use the `--toolsets` parameter to enable specific groups of tools:
69
+
70
+ ```bash
71
+ # Enable all toolsets (default)
72
+ npx -y @octopusdeploy/mcp-server
73
+
74
+ # Enable only specific toolsets
75
+ npx -y @octopusdeploy/mcp-server --toolsets projects,deployments
76
+
77
+ # Enable all toolsets explicitly
78
+ npx -y @octopusdeploy/mcp-server --toolsets all
79
+ ```
80
+
81
+ Available toolsets:
82
+ - **core** - Basic operations (always enabled)
83
+ - **projects** - Project operations
84
+ - **deployments** - Deployment operations
85
+ - **releases** - Release management
86
+ - **tasks** - Task operations
87
+ - **tenants** - Multi-tenancy operations
88
+ - **kubernetes** - Kubernetes operations
89
+ - **machines** - Deployment target operations
90
+ - **certificates** - Certificate operations
91
+ - **accounts** - Account operations
92
+
93
+ #### Read-Only Mode
94
+ The server runs in read-only mode by default for security. All current tools are read-only operations.
95
+
96
+ ```bash
97
+ # Run in read-only mode (default)
98
+ npx -y @octopusdeploy/mcp-server --read-only
99
+
100
+ # Disable read-only mode (currently no effect as all tools are read-only)
101
+ npx -y @octopusdeploy/mcp-server --read-only=false
102
+ ```
103
+
104
+ #### Complete Examples
105
+
106
+ ```bash
107
+ # Development setup with only core and project tools
108
+ npx -y @octopusdeploy/mcp-server --toolsets core,projects --server-url https://your-octopus.com --api-key YOUR_API_KEY
109
+
110
+ # Full production setup with all tools
111
+ npx -y @octopusdeploy/mcp-server --toolsets all --read-only --server-url https://your-octopus.com --api-key YOUR_API_KEY
112
+ ```
113
+
114
+ ## 🔨 Tools
115
+
116
+ ### Core Tools
117
+ - `list_spaces`: List all spaces in the Octopus Deploy instance
118
+ - `list_environments`: List all environments in a given space
119
+
120
+ ### Projects
121
+ - `list_projects`: List all projects in a given space
122
+
123
+ ### Deployments
124
+ - `list_deployments`: List deployments in a space with optional filtering
125
+
126
+ ### Releases
127
+ - `get_release_by_id`: Get details for a specific release by its ID
128
+ - `list_releases`: List all releases in a given space
129
+ - `list_releases_for_project`: List all releases for a specific project
130
+
131
+ ### Tasks
132
+ - `get_task_by_id`: Get details for a specific server task by its ID
133
+ - `get_task_details`: Get detailed information for a specific server task
134
+ - `get_task_raw`: Get raw details for a specific server task
135
+
136
+ ### Tenants
137
+ - `list_tenants`: List all tenants in a given space
138
+ - `get_tenant_by_id`: Get details for a specific tenant by its ID
139
+ - `get_tenant_variables`: Get tenant variables by type (all, common, or project)
140
+ - `get_missing_tenant_variables`: Get tenant variables that are missing values
141
+
142
+ ### Kubernetes
143
+ - `get_kubernetes_live_status`: Get live status of Kubernetes resources for a project and environment (minimum supported version: `2025.3`)
144
+
145
+ ### Machines (Deployment Targets)
146
+ - `list_deployment_targets`: List all deployment targets in a space with optional filtering
147
+ - `get_deployment_target`: Get detailed information about a specific deployment target
148
+
149
+ ### Certificates
150
+ - `list_certificates`: List all certificates in a space with optional filtering
151
+ - `get_certificate`: Get detailed information about a specific certificate by its ID
152
+ -
153
+ ### Accounts
154
+ - `list_accounts`: List all accounts in a space with optional filtering
155
+ - `get_accounts`: Get detailed information about a specific account by its ID
156
+
157
+ ### Additional Tools
158
+ - `get_deployment_process`: Get deployment process by ID for projects or releases
159
+ - `get_branches`: Get Git branches for a version-controlled project (minimum supported version: `2021.2`)
160
+ - `get_current_user`: Get information about the current authenticated user
161
+
162
+ ## 🔒 Security Considerations
163
+
164
+ While the Octopus MCP Server at this stage is a read-only tool, it **can read full deployment logs, which could include production secrets.** Exercise caution when connecting Octopus MCP to tools and models you do not fully trust.
165
+
166
+ Running agents in a fully automated fashion could make you vulnerable to exposure via prompt-injection attacks that exfiltrate tokens.
167
+
168
+ Exercise caution and mitigate the risks by using least-privileged accounts when connecting to Octopus Server.
169
+
170
+ ## ⚠️ Limitations
171
+
172
+ ### Data Analysis
173
+
174
+ The nature of current AI chat tools and the MCP protocol itself makes it impractical to analyze large amounts of data. Most MCP clients currently do not support chaining tool calls (using the output of one tool as input to the next one) and instead fall back to copying the results token by token, which frequently leads to hallucinations. If you are looking to process historical data from your Octopus instance for analysis purposes, we recommend using the API directly or writing your own MCP client that is capable of processing the tool call results programmatically.
175
+
176
+ ### Performance
177
+
178
+ The MCP Server is technically just a thin layer on top of the existing Octopus Server API. As such it is capable of retrieving large amounts of data (for example, requesting thousands of deployments). Such queries can have a significant effect on your instance's performance. Instruct your models to only retrieve the minimum set of data that it needs (most models are really good at this out of the box).
179
+
180
+ ## 🤝 Contributions
181
+
182
+ Contributions are welcome! :heart: Please read our [Contributing Guide](CONTRIBUTING.md) for information about how to get involved in this project.
183
+
184
+ We are eager to hear how you plan to use Octopus MCP Server and what features you would like to see included in future version.
185
+
186
+ Please use [Issues](https://github.com/OctopusDeploy/mcp-server/issues) to provide feedback, or request features.
187
+
188
+ If you are a current Octopus customer, please report any issues you experience using our MCP server to our [support team](mailto:support@octopus.com). This will ensure you get a timely response within our standard support guarantees.
189
+
190
+ ## 🙋 FAQ
191
+
192
+ ### Do you have plans to release a remote MCP server?
193
+
194
+ We are working on integrating an MCP server directly into Octopus Server. This will open up the door for us to build more complex MCP tools, as well as:
195
+
196
+ * Giving Octopus Administrators more granular control over MCP clients
197
+ * Natively support OAuth for client authentication
198
+ * Integrating security scanning tools into the MCP output
199
+
200
+ If this is of interest to you, please register your interest on [our roadmap item](https://roadmap.octopus.com/c/228-remote-mcp-server-ai-).
201
+
202
+ ## License
203
+
204
+ This project is licensed under the terms of Mozilla Public License 2.0 open source license.
@@ -6,7 +6,7 @@ const USER_AGENT_NAME = "octopus-mcp-server";
6
6
  function isEmpty(value) {
7
7
  return !value || value.trim().length === 0;
8
8
  }
9
- function constructUserAgent(options) {
9
+ function constructUserAgent() {
10
10
  const clientInfo = getClientInfo();
11
11
  const userAgent = `${USER_AGENT_NAME}/${SEMVER_VERSION} (${clientInfo.name}/${clientInfo.version})`;
12
12
  return userAgent;
@@ -15,7 +15,7 @@ function getClientConfiguration(options = {}) {
15
15
  if (isEmpty(options.instanceURL) || isEmpty(options.apiKey)) {
16
16
  throw new Error("Octopus server URL and API key must be provided either via command line arguments (--server-url, --api-key) or environment variables (OCTOPUS_SERVER_URL, OCTOPUS_API_KEY).");
17
17
  }
18
- const userAgent = constructUserAgent(options);
18
+ const userAgent = constructUserAgent();
19
19
  return {
20
20
  userAgentApp: userAgent,
21
21
  instanceURL: options.instanceURL,
@@ -1 +1 @@
1
- {"version":3,"file":"getClientConfigurationFromEnvironment.js","sourceRoot":"","sources":["../../src/helpers/getClientConfigurationFromEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAO7C,SAAS,OAAO,CAAC,KAAyB;IACxC,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,kBAAkB,CAAC,OAA6B;IACvD,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,SAAS,GAAG,GAAG,eAAe,IAAI,cAAc,KAAK,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,OAAO,GAAG,CAAC;IAEpG,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,sBAAsB,CAAC,UAAgC,EAAE;IAChE,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CACb,6KAA6K,CAC9K,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAE9C,OAAO;QACL,YAAY,EAAE,SAAS;QACvB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qCAAqC;IACnD,OAAO,sBAAsB,CAAC;QAC5B,WAAW,EAAE,GAAG,CAAC,gBAAgB,CAAC,IAAI,GAAG,CAAC,oBAAoB,CAAC;QAC/D,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,iBAAiB,CAAC;KACrD,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"getClientConfigurationFromEnvironment.js","sourceRoot":"","sources":["../../src/helpers/getClientConfigurationFromEnvironment.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAO7C,SAAS,OAAO,CAAC,KAAyB;IACxC,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,SAAS,GAAG,GAAG,eAAe,IAAI,cAAc,KAAK,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,OAAO,GAAG,CAAC;IAEpG,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,sBAAsB,CAAC,UAAgC,EAAE;IAChE,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CACb,6KAA6K,CAC9K,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,kBAAkB,EAAE,CAAC;IAEvC,OAAO;QACL,YAAY,EAAE,SAAS;QACvB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qCAAqC;IACnD,OAAO,sBAAsB,CAAC;QAC5B,WAAW,EAAE,GAAG,CAAC,gBAAgB,CAAC,IAAI,GAAG,CAAC,oBAAoB,CAAC;QAC/D,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC,iBAAiB,CAAC;KACrD,CAAC,CAAC;AACL,CAAC"}
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { registerTools } from "./tools/index.js";
5
5
  import { Command } from "commander";
6
6
  import dotenv from "dotenv";
7
7
  import { createToolsetConfig } from "./utils/parseConfig.js";
8
- import { DEFAULT_TOOLSETS } from "./types/toolConfig.js";
8
+ import { DEFAULT_TOOLSETS, printToolVersionAnalysis } from "./types/toolConfig.js";
9
9
  import { getClientConfigurationFromEnvironment } from "./helpers/getClientConfigurationFromEnvironment.js";
10
10
  import { setClientInfo } from "./utils/clientInfo.js";
11
11
  import { logger } from "./utils/logger.js";
@@ -25,15 +25,25 @@ program
25
25
  .option("--log-level <level>", "Minimum log level (info, error)", "info")
26
26
  .option("--log-file <path>", "Log file path or filename (default: mcp-server-log.txt)")
27
27
  .option("-q, --quiet", "Disable file logging, only log errors to console", false)
28
+ .option("--list-tools-by-version", "List all registered tools by their supported Octopus Server version and exit")
28
29
  .parse();
29
30
  const options = program.opts();
30
- // Configure logger based on command line options
31
+ const server = new McpServer({
32
+ name: "Octopus Deploy",
33
+ description: "Official Octopus Deploy MCP server.",
34
+ version: SEMVER_VERSION,
35
+ });
36
+ const toolsetConfig = createToolsetConfig(options.toolsets, options.readOnly);
37
+ registerTools(server, toolsetConfig);
38
+ if (options.listToolsByVersion) {
39
+ printToolVersionAnalysis();
40
+ process.exit(0);
41
+ }
31
42
  if (options.logFile) {
32
43
  logger.setLogFilePath(options.logFile);
33
44
  }
34
45
  logger.setLogLevel(logger.parseLogLevel(options.logLevel));
35
46
  logger.setQuietMode(options.quiet);
36
- // Pass CLI options to tools registration
37
47
  if (options.serverUrl) {
38
48
  process.env.CLI_SERVER_URL = options.serverUrl;
39
49
  }
@@ -42,13 +52,6 @@ if (options.apiKey) {
42
52
  }
43
53
  // Test configuration
44
54
  getClientConfigurationFromEnvironment();
45
- // Create toolset configuration
46
- const toolsetConfig = createToolsetConfig(options.toolsets, options.readOnly);
47
- const server = new McpServer({
48
- name: "Octopus Deploy",
49
- description: "Official Octopus Deploy MCP server.",
50
- version: SEMVER_VERSION,
51
- });
52
55
  // Set up initialization callback to capture client info
53
56
  server.server.oninitialized = () => {
54
57
  const clientInfo = server.server.getClientVersion();
@@ -60,7 +63,6 @@ server.server.oninitialized = () => {
60
63
  logger.info("Client initialized but no client info available");
61
64
  }
62
65
  };
63
- registerTools(server, toolsetConfig);
64
66
  logger.info(`Starting Octopus Deploy MCP server (version: ${SEMVER_VERSION})`);
65
67
  // Start server
66
68
  async function runServer() {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,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AAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAC1B,MAAM,CAAC,KAAK,CAAC,+BAA+B,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IAC7E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerGetAccountTool(server: McpServer): void;
3
+ //# sourceMappingURL=getAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAccount.d.ts","sourceRoot":"","sources":["../../src/tools/getAccount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAQzE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QAuCvD"}
@@ -0,0 +1,40 @@
1
+ import { Client, resolveSpaceId } from "@octopusdeploy/api-client";
2
+ import { z } from "zod";
3
+ import {} from "@modelcontextprotocol/sdk/server/mcp.js";
4
+ import { registerToolDefinition } from "../types/toolConfig.js";
5
+ import { getClientConfigurationFromEnvironment } from "../helpers/getClientConfigurationFromEnvironment.js";
6
+ import { mapAccountResource } from "../types/accountTypes.js";
7
+ export function registerGetAccountTool(server) {
8
+ server.tool("get_account", `Get details for a specific account by its ID
9
+
10
+ This tool retrieves detailed information about a specific account using its ID. The space name and account ID are both required.`, {
11
+ spaceName: z.string(),
12
+ accountId: z.string().describe("The ID of the account to retrieve"),
13
+ }, {
14
+ title: "Get a specific account by ID from an Octopus Deploy space",
15
+ readOnlyHint: true,
16
+ }, async ({ spaceName, accountId }) => {
17
+ const configuration = getClientConfigurationFromEnvironment();
18
+ const client = await Client.create(configuration);
19
+ const spaceId = await resolveSpaceId(client, spaceName);
20
+ const response = await client.get("~/api/{spaceId}/accounts/{id}", {
21
+ spaceId,
22
+ id: accountId,
23
+ });
24
+ const account = mapAccountResource(response);
25
+ return {
26
+ content: [
27
+ {
28
+ type: "text",
29
+ text: JSON.stringify(account),
30
+ },
31
+ ],
32
+ };
33
+ });
34
+ }
35
+ registerToolDefinition({
36
+ toolName: "get_account",
37
+ config: { toolset: "accounts", readOnly: true },
38
+ registerFn: registerGetAccountTool,
39
+ });
40
+ //# sourceMappingURL=getAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAccount.js","sourceRoot":"","sources":["../../src/tools/getAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,qCAAqC,EAAE,MAAM,qDAAqD,CAAC;AAC5G,OAAO,EAEL,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAElC,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,IAAI,CACT,aAAa,EACb;;iIAE6H,EAC7H;QACE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;KACpE,EACD;QACE,KAAK,EAAE,2DAA2D;QAClE,YAAY,EAAE,IAAI;KACnB,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE;QACjC,MAAM,aAAa,GAAG,qCAAqC,EAAE,CAAC;QAC9D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAExD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAC/B,+BAA+B,EAC/B;YACE,OAAO;YACP,EAAE,EAAE,SAAS;SACd,CACF,CAAC;QAEF,MAAM,OAAO,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAE7C,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;iBAC9B;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC;AAED,sBAAsB,CAAC;IACrB,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC/C,UAAU,EAAE,sBAAsB;CACnC,CAAC,CAAC"}
@@ -5,8 +5,8 @@ import { registerToolDefinition } from "../types/toolConfig.js";
5
5
  import { getClientConfigurationFromEnvironment } from "../helpers/getClientConfigurationFromEnvironment.js";
6
6
  import { getProjectBranches } from "../helpers/vcsProjectHelpers.js";
7
7
  export function registerGetBranchesTool(server) {
8
- server.tool("get_branches", `Get Git branches for a version-controlled project
9
-
8
+ server.tool("get_branches", `Get Git branches for a version-controlled project
9
+
10
10
  This tool retrieves Git branches for a specific project in a space. The space name and project ID are required. Optionally provide searchByName, skip, and take parameters for filtering and pagination.`, {
11
11
  spaceName: z.string(),
12
12
  projectId: z.string(),
@@ -50,6 +50,7 @@ This tool retrieves Git branches for a specific project in a space. The space na
50
50
  registerToolDefinition({
51
51
  toolName: "get_branches",
52
52
  config: { toolset: "context", readOnly: true },
53
- registerFn: registerGetBranchesTool
53
+ registerFn: registerGetBranchesTool,
54
+ minimumOctopusVersion: "2021.2",
54
55
  });
55
56
  //# sourceMappingURL=getBranches.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBranches.js","sourceRoot":"","sources":["../../src/tools/getBranches.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,2BAA2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AC;iBACH;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC;AAED,sBAAsB,CAAC;IACrB,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC9C,UAAU,EAAE,uBAAuB;IACnC,qBAAqB,EAAE,QAAQ;CAChC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerGetCertificateTool(server: McpServer): void;
3
+ //# sourceMappingURL=getCertificate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCertificate.d.ts","sourceRoot":"","sources":["../../src/tools/getCertificate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,QAuC3D"}