DM

duplocloud/mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars 2 forks Качество 67 Тренд 0MIT

MCP Server for the duplocloud API

Обзор

A Model Context Protocol (MCP) server for DuploCloud. Dynamically discovers duploctl commands and exposes them as MCP tools so AI agents and compatible clients can query infrastructure state and perform auditable actions. Built on FastMCP and the duplocloud-client Python package. Installs as a duploctl plugin — no separate command needed. - -- registers as a duploctl resource via entry points; run with duploctl mcp - -- all duploctl @Command methods are registered as MCP tools at startup - -- regex-based filters to control which tools are exposed - -- commands with models get typed input schemas instead of raw dicts - -- built-in config tool and GET /config route showing live server state - -- @custom_tool and @custom_route decorators with context injection - -- stdio (default) or HTTP for persistent servers - Python 3.

README

Показан фрагмент оригинального README. Открыть оригинал.

DuploCloud MCP Server

A Model Context Protocol (MCP) server for DuploCloud. Dynamically discovers duploctl commands and exposes them as MCP tools so AI agents and compatible clients can query infrastructure state and perform auditable actions.

Built on FastMCP and the duplocloud-client Python package. Installs as a duploctl plugin — no separate command needed.

Table of Contents

Features

  • duploctl plugin – registers as a duploctl resource via entry points; run with duploctl mcp
  • Automatic tool discovery – all duploctl @Command methods are registered as MCP tools at startup
  • Resource and command filtering – regex-based filters to control which tools are exposed
  • Pydantic model integration – commands with models get typed input schemas instead of raw dicts
  • Config display – built-in config tool and GET /config route showing live server state
  • Custom tool/route framework – @custom_tool and @custom_route decorators with context injection
  • Dual transport – stdio (default) or HTTP for persistent servers

Prerequisites

  • Python 3.10+
  • DuploCloud credentials (DUPLO_HOST, DUPLO_TOKEN)
  • A DuploCloud tenant (DUPLO_TENANT)

Installation

pip install duplocloud-mcp

For pinned version installs and alternative methods (GitHub release artifact, git tag), see the release notes.

For development:

git clone https://github.com/duplocloud/mcp.git
cd mcp
pip install -e ".[test]"

Quick Start

Set your DuploCloud credentials and start the server:

export DUPLO_HOST="https://your-portal.duplocloud.net"
export DUPLO_TOKEN="your-token"
export DUPLO_TENANT="your-tenant"

duploctl mcp

By default the server starts in stdio transport with compact mode (5 tools). To use HTTP:

duploctl mcp --transport http

Verify it’s running:

curl http://localhost:8000/health
# {"status":"healthy","service":"duplocloud-mcp"}

curl http://localhost:8000/config
# Full server configuration including registered tools

Configuration

Открыть полный README на GitHub

Установка

docker run -e DUPLO_HOST=... -e DUPLO_TOKEN=... -e DUPLO_TENANT=... duplocloud-mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "duploctl": { "command": "duploctl", "args": ["mcp"], "env": { "DUPLO_HOST": "https://your-portal.duplocloud.net", "DUPLO_TOKEN": "your-token", "DUPLO_TENANT": "your-tenant" } } } }