Skip to main content
Glama
SuriyaMurthy

pid_controller

by SuriyaMurthy

Agentic PID Tuner (via MCP)

An interactive, real-time PID controller dashboard integrated with the Model Context Protocol (MCP). This project allows AI agents (like Claude) to actively read, analyze, and tune a simulated control loop using natural language commands, with changes reflecting instantly in the web browser.

Dashboard Screenshot

✨ Features

  • Real-time Web Dashboard: Adjust $K_p$, $K_i$, and $K_d$ gains manually using UI sliders.

  • Live Waveform Visualization: See overshoot, settling time, and system response instantly (powered by simple-pid and matplotlib).

  • AI-Agent Control: Includes an MCP server that exposes tools for LLMs to read current gains and push new ones.

  • Bi-directional Sync: If you move a slider, the AI sees the new value. If the AI changes a value, your browser updates automatically within 1 second.

Related MCP server: agentic-mcp-server

🛠️ Prerequisites

🚀 Installation

  1. Clone the repository:

gh repo clone SuriyaMurthy/agentic-pid-controller
cd agentic-pid-controller
  1. Create and activate a virtual environment:

python -m venv .venv

# On Windows:
.venv\Scripts\activate
# On Mac/Linux:
source .venv/bin/activate
  1. Install dependencies:

pip install -r requirements.txt

🎮 Usage

1. Start the Web Dashboard

Run the Flask server to host the simulation and web interface:

python app.py

Open your browser and navigate to http://127.0.0.1:5000.

2. Connect to Claude Desktop (MCP)

To let Claude interact with your dashboard, add the MCP server to your Claude Desktop configuration.

Open your Claude Desktop config file:

  • Linux: ~/.cursor/mcp.json

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

Add the following configuration. IMPORTANT: You must replace with the actual full paths on your computer!

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

Note for Windows users: Use your .venv\Scripts\python.exe path and ensure backslashes are escaped (\\).

Restart Claude Desktop after saving the file.

3. Talk to the AI

With the Flask app running, open Claude Desktop. You can now use prompts like:

  • "Check the current PID parameters on my dashboard."

  • "The system has too much overshoot. Can you adjust the parameters to bring the overshoot below 5%?"

  • "Increase the proportional gain by 0.5 and tell me how it affects the settling time."

Watch the web dashboard automatically update as Claude tunes the system!

📂 Project Structure

  • app.py: The Flask web server, PID simulation loop, and API endpoints.

  • mcp_server_pid.py: The FastMCP server that exposes get_pid_parameters and update_pid_parameters tools to the LLM over standard I/O.

  • requirements.txt: Python dependencies (flask, mcp, simple-pid, matplotlib).

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