DM

duplocloud/mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

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

GitHub で README 全文を見る

インストール

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" } } } }