MCP SysOperator

by tarnover

Integrations

  • Allows execution of Ansible playbooks with parameters, inventory management, syntax validation, and task previews for infrastructure automation

  • Supports running on Linux systems with configuration file integration for the Claude app

  • Supports running on macOS systems with configuration file integration for the Claude app

MCP 시스템 운영자

Infrastructure as Code 작업을 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버를 통해 AI 어시스턴트는 Ansible 및 Terraform과 상호 작용하고, 플레이북 및 Terraform 계획을 실행하고, 클라우드 리소스를 관리하고, 기타 인프라 작업을 직접 수행할 수 있습니다.
(이전에는 mcp-ansible 로 알려졌던 프로젝트)

예제 테스트 프로젝트

이 폴더의 모든 코드는 Cline과 mcp-sysoperator에 의해 생성되었습니다.

  • AWS LAMP 스택 - AWS에 예제 LAMP 스택을 배포하기 위한 모든 Ansible 코드
  • AWS Terraform LAMP - LAMP 스택을 배포하기 위한 Terraform 및 Ansible 코드

모든 코드는 Claude 3.7 Sonnet(OpenRouter를 통해), Cline 및 SysOperator를 사용하여 생성되었습니다.

특징

  • Ansible 플레이북 실행 : 인벤토리, 추가 변수, 태그 및 제한과 같은 매개변수를 지원하는 Ansible 플레이북을 실행합니다.
  • 인벤토리 목록 : Ansible 인벤토리 파일에서 호스트 및 그룹 보기
  • 구문 확인 : 실행 없이 Ansible 플레이북 구문 검증
  • 작업 목록 : 플레이북에서 실행될 작업을 미리 봅니다.
  • 기본 인벤토리 액세스 : 리소스 API를 통해 기본 Ansible 인벤토리 파일에 액세스합니다.
  • AWS 통합 : AWS 리소스(EC2, S3, VPC, CloudFormation 등)를 관리합니다.
  • Terraform 지원 : Terraform 명령(init, plan, apply, destroy, output 등)을 실행합니다.
  • tflocal 통합 : 로컬 클라우드 개발을 위해 LocalStack을 사용하여 Terraform 구성 테스트
  • LocalStack 지원 : 실제 AWS 자격 증명 없이 LocalStack을 사용하여 로컬에서 AWS 작업을 테스트합니다.

요구 사항

  • Node.js 18 이상
  • npm 또는 yarn
  • Ansible이 설치되고 PATH에 있음
  • @modelcontextprotocol/sdk (자동으로 설치됨)
  • AWS 작업의 경우: AWS CLI 및 유효한 자격 증명
  • LocalStack의 경우: LocalStack이 설치되고 실행 중이고 awslocal CLI가 있습니다.

설치

1. 저장소를 복제합니다.

지엑스피1

2. 종속성 설치

npm install

3. 서버를 구축하세요

npm run build

4. MCP 설정 구성

MCP 설정 구성 파일에 Ansible MCP 서버를 추가합니다.

Claude 확장 기능이 있는 VSCode의 경우:

  • ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json 파일을 편집하세요.

Claude Desktop 앱의 경우:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json 편집하세요.
  • Windows: %APPDATA%\Claude\claude_desktop_config.json 편집하세요.
  • Linux: ~/.config/Claude/claude_desktop_config.json 편집하세요.

mcpServers 섹션에 다음을 추가합니다.

{ "mcpServers": { "sysoperator": { "command": "node", "args": ["/absolute/path/to/mcp-sysoperator/build/index.js"], "env": {} } } }

/absolute/path/to/mcp-sysoperator 실제 설치 경로로 바꿔야 합니다.

사용 예

MCP 서버를 설치하고 구성하면 AI 어시스턴트에 다음 도구가 제공됩니다.

1. 플레이북 실행

<use_mcp_tool> <server_name>sysoperator</server_name> <tool_name>run_playbook</tool_name> <arguments> { "playbook": "/path/to/your/playbook.yml", "inventory": "/path/to/inventory.ini", "extraVars": { "var1": "value1", "var2": "value2" }, "tags": "setup,configure", "limit": "webservers" } </arguments> </use_mcp_tool>

2. 재고 목록

<use_mcp_tool> <server_name>sysoperator</server_name> <tool_name>list_inventory</tool_name> <arguments> { "inventory": "/path/to/inventory.ini" } </arguments> </use_mcp_tool>

3. 플레이북 구문 확인

<use_mcp_tool> <server_name>sysoperator</server_name> <tool_name>check_syntax</tool_name> <arguments> { "playbook": "/path/to/your/playbook.yml" } </arguments> </use_mcp_tool>

4. 플레이북에 작업 나열

<use_mcp_tool> <server_name>sysoperator</server_name> <tool_name>list_tasks</tool_name> <arguments> { "playbook": "/path/to/your/playbook.yml" } </arguments> </use_mcp_tool>

5. 기본 인벤토리 리소스에 액세스

<access_mcp_resource> <server_name>sysoperator</server_name> <uri>sysoperator://inventory/default</uri> </access_mcp_resource>

6. AWS S3 작업

<use_mcp_tool> <server_name>sysoperator</server_name> <tool_name>aws_s3</tool_name> <arguments> { "action": "list_buckets", "region": "us-east-1" } </arguments> </use_mcp_tool>

7. Terraform Init 및 Plan

<use_mcp_tool> <server_name>sysoperator</server_name> <tool_name>terraform</tool_name> <arguments> { "action": "init", "workingDir": "/path/to/terraform/project" } </arguments> </use_mcp_tool> <use_mcp_tool> <server_name>sysoperator</server_name> <tool_name>terraform</tool_name> <arguments> { "action": "plan", "workingDir": "/path/to/terraform/project", "vars": { "instance_type": "t2.micro", "region": "us-west-2" } } </arguments> </use_mcp_tool>

8. Terraform 적용

<use_mcp_tool> <server_name>sysoperator</server_name> <tool_name>terraform</tool_name> <arguments> { "action": "apply", "workingDir": "/path/to/terraform/project", "autoApprove": true, "vars": { "instance_type": "t2.micro", "region": "us-west-2" } } </arguments> </use_mcp_tool>

9. LocalStack(tflocal)을 사용한 Terraform

<use_mcp_tool> <server_name>sysoperator</server_name> <tool_name>terraform</tool_name> <arguments> { "action": "apply", "workingDir": "/path/to/terraform/project", "useLocalstack": true, "autoApprove": true, "vars": { "instance_type": "t2.micro", "region": "us-west-2" } } </arguments> </use_mcp_tool>

LocalStack 통합

이 프로젝트에는 실제 AWS 자격 증명 없이 로컬에서 AWS 작업을 테스트할 수 있도록 LocalStack과의 통합이 포함되어 있습니다. LocalStack 통합을 통해 다음을 수행할 수 있습니다.

  1. AWS 서비스를 로컬로 사용하는 Ansible 플레이북 테스트
  2. AWS 비용 없이 AWS 운영을 개발하고 테스트하세요
  3. 실제 AWS 자격 증명이 필요하지 않고 테스트 실행
  4. 실제 AWS에 배포하기 전에 인프라 코드를 검증하세요.

LocalStack 사용하기

LocalStack 통합을 사용하는 방법에 대한 자세한 지침은 LocalStack README를 참조하세요.

빠른 시작:

# Install LocalStack and awslocal CLI pip install localstack awscli-local # Start LocalStack localstack start # Run the sample playbook node localstack/run_sample_playbook.mjs

개발

프로젝트 구조

mcp-sysoperator/ ├── src/ │ ├── index.ts # Main entry point │ └── ansible-mcp-server/ # Will be renamed in filesystem in future updates │ ├── index.ts # MCP SysOperator server implementation │ ├── common/ # Common utilities and types │ │ ├── errors.ts # Error definitions │ │ ├── types.ts # Type and schema definitions │ │ ├── utils.ts # Utility functions │ │ └── version.ts # Version information │ └── operations/ # Operation handlers │ ├── ad_hoc.ts # Ansible ad-hoc commands │ ├── aws.ts # AWS operations │ ├── inventory.ts # Ansible inventory operations │ ├── playbooks.ts # Ansible playbook operations │ ├── terraform.ts # Terraform operations │ └── vault.ts # Ansible vault operations ├── localstack/ # LocalStack integration │ ├── README.md # LocalStack documentation │ ├── sample_playbook.yml # Sample playbook for LocalStack │ ├── inventory.ini # Sample inventory for LocalStack │ ├── run_sample_playbook.mjs # Script to run sample playbook │ └── utils.localstack.ts # Modified utils for LocalStack ├── package.json # Project configuration and dependencies ├── tsconfig.json # TypeScript configuration └── README.md # Documentation

새로운 기능 추가

MCP 서버에 새로운 기능을 추가하려면:

  1. src/ansible-mcp-server/index.ts 수정(향후: src/sysoperator/index.ts )
  2. setupToolHandlers 메서드에 새 도구를 추가합니다.
  3. 적절한 작업 파일에서 도구에 대한 핸들러 기능을 구현하세요.
  4. common/types.ts 에 스키마 정의를 추가합니다.
  5. npm run build 로 다시 빌드하세요

⚠️ 면책 조항

SysOperator는 현재 활발하게 개발 중이며 광범위한 테스트를 진행하고 있습니다. 현재 운영 환경에서의 사용은 권장하지 않습니다. 소프트웨어에 중대한 변경, 불완전한 기능 또는 예기치 않은 동작이 발생할 수 있습니다.

사용 시 모든 책임은 사용자에게 있습니다.

특허

MIT 라이선스 - 자세한 내용은 라이선스를 참조하세요.

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

AI 어시스턴트가 Ansible 및 Terraform과 같은 인프라 도구와 직접 상호 작용하여 플레이북 실행, 클라우드 리소스 관리 및 기타 인프라 작업을 수행할 수 있도록 하는 모델 컨텍스트 프로토콜 서버입니다.

  1. 예제 테스트 프로젝트
    1. 특징
      1. 요구 사항
        1. 설치
          1. 1. 저장소를 복제합니다.
          2. 2. 종속성 설치
          3. 3. 서버를 구축하세요
          4. 4. MCP 설정 구성
        2. 사용 예
          1. 1. 플레이북 실행
          2. 2. 재고 목록
          3. 3. 플레이북 구문 확인
          4. 4. 플레이북에 작업 나열
          5. 5. 기본 인벤토리 리소스에 액세스
          6. 6. AWS S3 작업
          7. 7. Terraform Init 및 Plan
          8. 8. Terraform 적용
          9. 9. LocalStack(tflocal)을 사용한 Terraform
        3. LocalStack 통합
          1. LocalStack 사용하기
        4. 개발
          1. 프로젝트 구조
          2. 새로운 기능 추가
          3. ⚠️ 면책 조항
        5. 특허

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that enables AI assistants to interact with Azure DevOps resources including projects, work items, repositories, pull requests, branches, and pipelines through a standardized protocol.
            Last updated -
            15
            602
            131
            TypeScript
            MIT License
            • Linux
            • Apple
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that exposes Cloudinary Upload & Admin API methods as tools by AI assistants. This integration allows AI systems to trigger and interact with your Cloudinary cloud.
            Last updated -
            5
            506
            JavaScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that provides persistent task management capabilities for AI assistants, allowing them to create, update, and track tasks beyond their usual context limitations.
            Last updated -
            1
            TypeScript
          • -
            security
            F
            license
            -
            quality
            A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
            Last updated -
            16
            TypeScript

          View all related MCP servers

          ID: 7ov3ozxt9a