MCPInstall
pd-mcp-ctl logo

pd-mcp-ctl

by JmPotato JmPotato/pd-mcp-ctl

Connects the Model Context Protocol (MCP) with PD Control, enabling LLMs to interact with and manage TiKV cluster efficiently and intelligently.

READMEmain

pd-mcp-ctl

Connects the Model Context Protocol (MCP) with PD Control, enabling LLMs to interact with and manage TiKV cluster efficiently and intelligently.

Prerequisites

  • Deno
  • Access to a TiKV cluster with PD Control

Usage

  1. Clone the repository:
git clone https://github.com/JmPotato/pd-mcp-ctl.git
cd pd-mcp-ctl
  1. Compile:
deno run build
./dist/pd-mcp-ctl --help
  1. Take Claude Desktop as an example, edit your claude_desktop_config.json like:
{
    "mcpServers": {
        "pd-mcp-ctl": {
            "command": "{PATH_TO_PD_MCP_CTL_REPO}/dist/pd-mcp-ctl",
            "args": [
                "stdio"
            ],
            "env": {
                "PD_ENDPOINT": "http://127.0.0.1:2379",
                "PD_CTL_PATH": "{PATH_TO_PD_CTL_BINARY}"
            }
        }
    }
}

More details can be found in Model Context Protocol Docs.

Implemented MCP Tools

Tool NameDescription
execute-commandExecute any pd-ctl command
get-cluster-infoGet the current cluster info
get-config-infoGet the current config info
get-health-infoGet the current health info
get-region-infoGet the current region info
get-scheduler-infoGet the current scheduler info
get-store-infoGet the current store info

License

MIT License - see the LICENSE file for details.