tne-ci-mcp
v1.0.1
Published
MCP server for TNE CI/CD operations - deployable with npx
Maintainers
Readme
TNE CI MCP Server
A Model Context Protocol (MCP) server that provides deployment and cleanup tools for applications. This server converts existing shell scripts into programmatic tool calls that can be used by MCP clients.
Features
- deploy-app: Deploy applications to AWS S3 and Kubernetes with full workflow automation
- cleanup-app: Clean up application resources from AWS and Kubernetes
- check-deployment-status: Check current deployment status across environments
Tools
deploy-app
Deploy applications with full workflow automation.
Parameters:
appName(optional): Application name (defaults from package.json)environment(optional): Deployment environment (devorprod, defaults todev)baseDomain(optional): Base domain for the application (defaults totne.ai)region(optional): AWS region (defaults tous-west-2)skipBuild(optional): Skip npm build step (defaults tofalse)skipK8s(optional): Skip Kubernetes VirtualService setup (defaults tofalse)
Example Response:
{
"success": true,
"deploymentId": "app-dev-20250606-134555",
"urls": {
"s3Direct": "http://app-dev.s3-website-us-west-2.amazonaws.com/",
"customDomain": "https://app.dev.tne.ai/"
},
"resources": {
"s3Bucket": "app-dev",
"virtualService": "app-dev",
"namespace": "dev"
},
"buildInfo": {
"buildTime": "45.2s",
"bundleSize": "2.1MB"
}
}cleanup-app
Clean up application resources from AWS and Kubernetes.
Parameters:
appName(optional): Application name (defaults from package.json)environment(optional): Environment to clean up (dev,prod, orboth, defaults toboth)baseDomain(optional): Base domain for the application (defaults totne.ai)region(optional): AWS region (defaults tous-west-2)quickMode(optional): Quick cleanup, skip CloudFront wait (defaults tofalse)skipK8s(optional): Skip Kubernetes cleanup (defaults tofalse)skipConfirmation(optional): Skip confirmation prompts (defaults tofalse)
check-deployment-status
Check current deployment status across environments.
Parameters:
appName(optional): Application name (defaults from package.json)environment(optional): Environment to check (dev,prod, orboth, defaults toboth)baseDomain(optional): Base domain for the application (defaults totne.ai)region(optional): AWS region (defaults tous-west-2)
Installation
Option 1: From npm Registry (When Published)
Once published to npm, you can run it directly with npx:
# Run directly without installation
npx tne-ci-mcp
# Or install globally
npm install -g tne-ci-mcp
tne-ci-mcpOption 2: From Source (Current)
Clone and build from source:
git clone <repository-url>
cd tne-ci-mcp
npm install
npm run build
# Run locally with npx
npx .
# Or run directly
node dist/index.jsOption 3: Local Development
For local development and testing:
cd tne-ci-mcp
npm install
npm run build
npm link # Creates global symlink for testingThen you can run tne-ci-mcp from anywhere.
Usage
With npx
You can run the MCP server directly using npx:
# Run the MCP server
npx tne-ci-mcp
# Or run from a published package (when published to npm)
npx tne-ci-mcp@latestWith MCP Client
Add to your MCP client configuration:
Using npx:
{
"mcpServers": {
"tne-ci": {
"command": "npx",
"args": ["tne-ci-mcp@latest"]
}
}
}Using npx with working directory (recommended for deployment tools):
{
"mcpServers": {
"tne-ci": {
"command": "npx",
"args": ["tne-ci-mcp@latest"],
"cwd": "/path/to/your/app"
}
}
}Using local installation:
{
"mcpServers": {
"tne-ci": {
"command": "node",
"args": ["/path/to/tne-ci-mcp/dist/index.js"],
"cwd": "/path/to/your/app"
}
}
}Example Tool Calls
Deploy to development:
{
"tool": "deploy-app",
"arguments": {
"environment": "dev"
}
}Deploy to production:
{
"tool": "deploy-app",
"arguments": {
"environment": "prod",
"appName": "my-app"
}
}Clean up all environments:
{
"tool": "cleanup-app",
"arguments": {
"environment": "both",
"quickMode": true
}
}Troubleshooting
MCP Client Connection Issues
If the MCP client can't connect to the server, try these steps:
Test the server manually:
npx tne-ci-mcp@latestYou should see:
TNE CI MCP Server running on stdioCheck if the package is published:
npm view tne-ci-mcpTry with explicit version:
{ "mcpServers": { "tne-ci": { "command": "npx", "args": ["[email protected]"] } } }Add environment variables if needed:
{ "mcpServers": { "tne-ci": { "command": "npx", "args": ["tne-ci-mcp@latest"], "env": { "NODE_ENV": "production" } } } }Check MCP client logs for specific error messages about the connection failure.
Architecture
This MCP server provides a programmatic interface to deployment operations that were previously handled by shell scripts:
- Shell scripts → MCP tools for programmatic access
- New:
check-deployment-statustool for status monitoring - Comprehensive error handling and logging
- Structured JSON responses for easy parsing
Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
# Lint code
npm run lintProject Structure
tne-ci-mcp/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # MCP server implementation
│ ├── tools/ # Tool implementations
│ │ ├── deploy.ts # Deploy tool
│ │ ├── cleanup.ts # Cleanup tool
│ │ └── status.ts # Status tool
│ ├── services/ # Core services
│ │ ├── aws.ts # AWS operations
│ │ ├── build.ts # Build operations
│ │ └── kubernetes.ts # Kubernetes operations
│ └── utils/ # Utility functions
│ ├── config.ts # Configuration management
│ ├── logger.ts # Logging utilities
│ └── tempFiles.ts # Temporary file management
├── config/
│ └── domains.json # Domain configuration
└── dist/ # Compiled JavaScriptPublishing
To make this package available via npx tne-ci-mcp, publish it to npm:
# Build the project
npm run build
# Login to npm (if not already logged in)
npm login
# Publish to npm registry
npm publish
# Or publish with public access if scoped
npm publish --access publicAfter publishing, users can run:
npx tne-ci-mcp@latestRequirements
- Node.js 18+
- AWS CLI configured with appropriate permissions
- kubectl configured for Kubernetes access
- npm or yarn for package management
