npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@airjesus17/mcp-server-spinnaker

v1.5.1

Published

MCP server implementation for Spinnaker integrations

Downloads

292

Readme

MCP Server for Spinnaker

This package provides a Model Context Protocol (MCP) server implementation for Spinnaker integrations. It allows AI models to interact with Spinnaker deployments, pipelines, and applications through the standardized MCP interface.

AI Integration

This MCP server is a powerful example of how Anthropic's new AI model, Claude, can directly integrate with and enhance software deployment processes using the Model Context Protocol. By following MCP standards, Claude can access rich contextual information about Spinnaker applications, pipelines, and deployments, and actively manage them using well-defined tools.

Let's dive into some of the exciting possibilities this integration enables for AI-driven CI/CD:

  1. Intelligent Deployment Decisions: With access to comprehensive context about the state of applications and pipelines, AI models like Claude can analyze this information to make intelligent decisions about when and how to deploy. For example, Claude could look at factors like test coverage, code churn, and historical success rates to determine the optimal time and target environment for a deployment.

  2. Proactive Issue Detection and Autonomous Remediation: AI models can continuously monitor the CI/CD process, spotting potential issues before they cause problems. Imagine Claude detecting that a new version of a dependency has a known vulnerability and automatically creating a pull request to update it, or noticing that a deployment is taking longer than usual and proactively spinning up additional resources to prevent a timeout.

  3. Continuous Process Optimization: With each deployment, AI models can learn and adapt, continuously optimizing the CI/CD process. Claude could analyze build and deployment logs to identify bottlenecks, then experiment with different configurations to improve speed and reliability. Over time, the entire deployment process becomes more efficient and robust.

  4. Automated Root Cause Analysis and Recovery: When issues do occur, AI can rapidly diagnose the problem and even attempt to fix it autonomously. Claude could correlate errors across different parts of the system, identify the most likely root cause, and then take corrective actions like rolling back to a previous version or applying a known patch.

And these are just a few examples! As the Model Context Protocol evolves and more integrations are built, we can expect AI to take on increasingly sophisticated roles in the DevOps world. Across the entire CI/CD pipeline, AI could provide intelligent insights and recommendations, acting as a virtual assistant for product engineers.

By empowering AI to work alongside humans in the CI/CD process, MCP integrations like this Spinnaker server showcase how AI can become a proactive, intelligent partner in Developer Productivity infrastructure. It's a significant step towards more efficient, reliable, and autonomous software delivery.

Installation

npm install @airjesus17/mcp-server-spinnaker

or

yarn add @airjesus17/mcp-server-spinnaker

Usage

import { SpinnakerMCPServer } from '@airjesus17/mcp-server-spinnaker';

// Initialize the server
const server = new SpinnakerMCPServer(
  'https://your-gate-url',
  ['app1', 'app2'],  // List of applications to monitor
  ['prod', 'staging']  // List of environments to monitor
);

// Start the server
const port = 3000;
server.listen(port, () => {
  console.log(`Spinnaker MCP Server is running on port ${port}`);
});

Available Tools

The server provides the following tools for AI models to interact with Spinnaker:

get-applications

Retrieves a list of monitored Spinnaker applications and their current state.

// Example response
{
  "success": true,
  "data": [
    {
      "name": "myapp",
      "description": "My application",
      "pipelines": [
        {
          "id": "pipeline-1",
          "name": "Deploy to Production",
          "status": "SUCCEEDED"
        }
      ]
    }
  ]
}

get-pipelines

Retrieves all pipelines for a specific application.

// Parameters
{
  "application": "myapp"
}

// Example response
{
  "success": true,
  "data": [
    {
      "id": "pipeline-1",
      "name": "Deploy to Production",
      "status": "SUCCEEDED",
      "stages": [...]
    }
  ]
}

trigger-pipeline

Triggers a pipeline execution for a specific application.

// Parameters
{
  "application": "myapp",
  "pipelineId": "pipeline-1",
  "parameters": {
    "version": "1.2.3",
    "environment": "production"
  }
}

// Example response
{
  "success": true,
  "data": {
    "ref": "01HFGH2J...",
    "status": "RUNNING"
  }
}

Context Updates

The server automatically maintains context about your Spinnaker deployments. The context includes:

  • List of applications and their current state
  • Pipeline status for each application
  • Current deployments across monitored environments
  • Recent pipeline executions

Context is refreshed every 30 seconds by default.

Environment Variables

The server can be configured using the following environment variables:

  • GATE_URL: URL of your Spinnaker Gate service
  • MCP_PORT: Port to run the MCP server on (default: 3000)
  • REFRESH_INTERVAL: Context refresh interval in seconds (default: 30)

Types

The package exports TypeScript types for working with the server:

import type {
  SpinnakerApplication,
  SpinnakerPipeline,
  SpinnakerDeployment,
  SpinnakerExecution
} from '@airjesus17/mcp-server-spinnaker';

Development

To contribute to the development:

  1. Clone the repository
  2. Install dependencies: yarn install
  3. Build the project: yarn build
  4. Run tests: yarn test

License

MIT License - see LICENSE for details.