@alexbuzo/pati-mcp
v0.1.2
Published
PATI-compatible REST API MCP server exposing Swagger operations over stdio.
Readme
PATI MCP Server
MCP server for a PATI-compatible Swagger 2.0 REST API.
This server exposes every PATI Swagger operation as an MCP tool over stdio. It also includes one convenience promotion tool that can resolve a PATI build id from Artifactory artifact properties and then call the PATI Swagger promotion API.
Installation
npm install -g @alexbuzo/pati-mcpOr run it without a global install:
npx -y @alexbuzo/pati-mcpDevelopment
npm install
npm run generate:operations
npm test
npm run buildMCP Configuration
{
"mcpServers": {
"pati-mcp": {
"command": "npx",
"args": ["-y", "@alexbuzo/pati-mcp"],
"env": {
"PATI_BASE_URL": "https://pati.example.com",
"PATI_USERNAME": "your-login",
"PATI_PASSWORD": "your-password",
"PATI_ALLOW_WRITE": "false",
"ARTIFACTORY_BASE_URL": "https://artifactory.example.com",
"ARTIFACTORY_USERNAME": "your-login",
"ARTIFACTORY_PASSWORD": "your-password"
}
}
}
}Environment Variables
| Variable | Required | Description |
|---|---:|---|
| PATI_BASE_URL | Yes | PATI base URL. |
| PATI_USERNAME | For Basic auth | Username for PATI Basic auth. |
| PATI_PASSWORD | For Basic auth | Password for PATI Basic auth. |
| PATI_BASIC_TOKEN | Alternative | Precomputed Basic auth token, without the Basic prefix. |
| PATI_ALLOW_WRITE | No | Set to true to allow mutating operations. Default: false. |
| PATI_TLS_INSECURE | No | Set to true only for local certificate troubleshooting. |
| PATI_TIMEOUT_MS | No | Request timeout in milliseconds. Default: 30000. |
| PATI_RETRIES | No | Retry attempts for transient failures. Default: 1. |
| ARTIFACTORY_BASE_URL | For artifact lookup | Artifactory base URL. Not required when using an explicit buildId. |
| ARTIFACTORY_USERNAME | For Basic auth | Username for Artifactory Basic auth. |
| ARTIFACTORY_PASSWORD | For Basic auth | Password for Artifactory Basic auth. |
| ARTIFACTORY_TOKEN | Alternative | Bearer token for Artifactory. |
| ARTIFACTORY_BASIC_TOKEN | Alternative | Precomputed Basic auth token, without the Basic prefix. |
| ARTIFACTORY_TLS_INSECURE | No | Set to true only for local certificate troubleshooting. |
| ARTIFACTORY_TIMEOUT_MS | No | Request timeout in milliseconds. Default: 30000. |
Simple Promotion Tool
Use pati_promote_from_artifact for the shortest promotion flow.
Minimal input:
appVersion: application/build coordinate likeapp-name:release-d1-20260531.143556-971
Optional overrides:
mode:plan,simulate, orpromote. Default:promote.repos: Artifactory repositories to narrow search. By default Artifactory searches all accessible repositories.versionName: inferred fromrelease-<version>-<timestamp>-<build>build versions.naming: inferred asNEWunless the build version already ends with-RELEASE.artifactSelection: defaultEVERYTHING.
Provide exactly one source:
buildIdappVersionartifactUrlrepoKey+artifactPathartifactName+repos
plan resolves the build id and returns the PATI request without calling PATI.
simulate calls the PATI promotion endpoint with execution=SIMULATE.
promote calls it with execution=PROMOTE.
simulate and promote require PATI_ALLOW_WRITE=true because they call a PATI POST endpoint.
Example plan request:
{
"appVersion": "app-name:release-d1-20260531.143556-971"
}Tool Naming
Tool names are generated from Swagger operation IDs with a pati_ prefix.
Example: closeDeliverableUsingPOST becomes pati_close_deliverable_using_post.
Operation Generation
The checked-in operation catalog was generated from Swagger. To regenerate it, provide the Swagger URL or a local Swagger JSON file through environment variables:
PATI_SWAGGER_URL="https://pati.example.com/v2/api-docs" npm run generate:operations
PATI_SWAGGER_FILE="./swagger.json" npm run generate:operationsPublishing
Review the package contents before publishing:
npm pack --dry-runPublish the scoped package publicly:
npm publish --access public