Puppet Enterprise MCP Server

Puppet Enterprise MCP Server

Exposes the full Puppet Enterprise API to AI assistants, enabling management of Puppet infrastructure through natural language.

Category
访问服务器

README

Puppet Enterprise MCP Server

An MCP (Model Context Protocol) server that exposes the full Puppet Enterprise API to AI assistants. Connect Claude, Cursor, or any MCP-compatible client to manage your Puppet infrastructure through natural language.

Tools (60+)

Orchestrator

Tool Description
puppet_run Run Puppet on nodes (enforce or noop)
run_task Execute a Puppet task on nodes
run_plan Execute a Puppet plan
stop_job Stop a running job
stop_plan Stop a running plan
list_jobs List orchestrator jobs
get_job Get job details
get_job_nodes Get nodes in a job
get_job_report Get job report
get_job_events Get job events
list_plan_jobs List plan jobs
get_plan_job Get plan job details
get_plan_job_events Get plan job events
list_tasks List available tasks
get_task Get task details
list_plans List available plans
get_plan Get plan details
list_scheduled_jobs List scheduled jobs
delete_scheduled_job Delete a scheduled job
check_inventory Check node reachability
get_usage Get node usage details

Node Classifier

Tool Description
list_node_groups List all node groups
get_node_group Get a node group
create_node_group Create a node group
update_node_group Update a node group
delete_node_group Delete a node group
classify_node Get classification for a node
list_classes List known classes
list_environments List environments
get_node_check_ins Get node check-in history
update_classes Refresh class definitions
unpin_nodes Unpin nodes from all groups

RBAC

Tool Description
list_users List all PE users
get_user Get user details
get_current_user Get current authenticated user
create_user Create a local user
update_user Update a user
delete_user Delete a user
revoke_user Revoke user access
reinstate_user Reinstate a revoked user
list_roles List RBAC roles
get_role Get a role
create_role Create a role
list_user_groups List user groups
list_permissions List available permissions
generate_token Generate an auth token

Code Manager

Tool Description
deploy_code Deploy code to environments
get_deploy_status Check deployment status

PuppetDB

Tool Description
puppetdb_query Run a PQL query
list_nodes List all nodes
get_node Get node details
get_node_facts Get node facts
list_facts List facts
list_reports List Puppet reports
list_catalogs List catalogs
get_resources Query resources
list_fact_names List all fact names
list_pdb_environments List PuppetDB environments
get_inventory Get inventory data

Status

Tool Description
get_pe_status PE console services status
get_orchestrator_status Orchestrator status
get_puppet_server_status Puppet Server status
get_puppetdb_status PuppetDB status

Setup

Prerequisites

  1. A Puppet Enterprise instance
  2. A PE API token (generate via puppet-access login or the RBAC API)
  3. Node.js 20+

Environment Variables

Variable Required Description
PUPPET_HOST Yes PE primary server hostname
PUPPET_TOKEN Yes PE API authentication token
PUPPET_CA_CERT No CA certificate PEM content
PUPPET_TLS_VERIFY No Set true to enforce TLS verification

Install & Build

npm install
npm run build

Run Directly

PUPPET_HOST=puppet.example.com PUPPET_TOKEN=your-token node dist/index.js

Docker

docker build -t puppet-mcp-server .
docker run -e PUPPET_HOST=puppet.example.com -e PUPPET_TOKEN=your-token puppet-mcp-server

MCP Client Configuration

Claude Desktop / Claude Code

Add to your MCP settings:

{
  "mcpServers": {
    "puppet": {
      "command": "node",
      "args": ["/path/to/puppet-mcp/dist/index.js"],
      "env": {
        "PUPPET_HOST": "puppet.example.com",
        "PUPPET_TOKEN": "your-pe-api-token"
      }
    }
  }
}

Hosting for Customers (SSE/Streamable HTTP)

To host this as a remote MCP server over HTTP for multiple customers, wrap the stdio server with a transport adapter. For example using @modelcontextprotocol/sdk's SSEServerTransport or StreamableHTTPServerTransport:

import express from "express";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";

// Create per-customer server instances with their own PUPPET_HOST/PUPPET_TOKEN

See the MCP specification for transport options.

Generating a PE API Token

# On the PE primary server:
puppet-access login --lifetime 1y

# Or via the API:
curl -k -X POST https://puppet.example.com:4433/rbac-api/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{"login": "admin", "password": "your-password", "lifetime": "1y"}'

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选