Skip to main content
Glama
SuriyaMurthy

pid_controller

by SuriyaMurthy

Agentic PID Tuner (via MCP)

这是一个交互式实时 PID 控制器仪表盘,集成了 Model Context Protocol (MCP)。本项目允许 AI 智能体(如 Claude)使用自然语言命令主动读取、分析和调优模拟控制回路,更改会即时反映在 Web 浏览器中。

仪表盘截图

✨ 功能

  • 实时 Web 仪表盘: 使用 UI 滑块手动调整 $K_p$、$K_i$ 和 $K_d$ 增益。

  • 实时波形可视化: 即时查看超调量、调节时间和系统响应(由 simple-pidmatplotlib 提供支持)。

  • AI 智能体控制: 包含一个 MCP 服务器,向 LLM 暴露用于读取当前增益和更新增益的工具。

  • 双向同步: 如果你移动滑块,AI 会看到新值。如果 AI 更改了某个值,你的浏览器会在 1 秒内自动更新。

Related MCP server: agentic-mcp-server

🛠️ 先决条件

🚀 安装

  1. 克隆仓库:

gh repo clone SuriyaMurthy/agentic-pid-controller
cd agentic-pid-controller
  1. 创建并激活虚拟环境:

python -m venv .venv

# On Windows:
.venv\Scripts\activate
# On Mac/Linux:
source .venv/bin/activate
  1. 安装依赖:

pip install -r requirements.txt

🎮 使用

1. 启动 Web 仪表盘

运行 Flask 服务器以托管模拟和 Web 界面:

python app.py

打开浏览器并访问 http://127.0.0.1:5000

2. 连接 Claude Desktop (MCP)

要让 Claude 与你的仪表盘交互,请将 MCP 服务器添加到你的 Claude Desktop 配置中。

打开你的 Claude Desktop 配置文件:

  • Linux: ~/.cursor/mcp.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

添加以下配置。重要: 你必须将其替换为计算机上的实际完整路径!

{
  "mcpServers": {
    "pid_controller": {
      "command": "/absolute/path/to/mcp-pid-tuner/.venv/bin/python3",
      "args": [
        "/absolute/path/to/mcp-pid-tuner/mcp_server_pid.py"
      ]
    }
  }
}

Windows 用户注意事项:请使用你的 .venv\Scripts\python.exe 路径,并确保反斜杠已转义(\\)。

保存文件后,重新启动 Claude Desktop

3. 与 AI 对话

在 Flask 应用运行的情况下,打开 Claude Desktop。你现在可以使用如下提示语:

  • "检查我仪表盘上的当前 PID 参数。"

  • "系统超调量过大。你能调整参数让超调量降至 5% 以下吗?"

  • "将比例增益提高 0.5,并告诉我这对调节时间有什么影响。"

观察 Web 仪表盘在 Claude 调优系统时自动更新!

📂 项目结构

  • app.py:Flask Web 服务器、PID 模拟回路和 API 端点。

  • mcp_server_pid.py:FastMCP 服务器,通过标准 I/O 向 LLM 暴露 get_pid_parametersupdate_pid_parameters 工具。

  • requirements.txt:Python 依赖(flaskmcpsimple-pidmatplotlib)。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SuriyaMurthy/agentic-pid-controller'

If you have feedback or need assistance with the MCP directory API, please join our Discord server