haproxy-mcp-server

HAProxy MCP Server Tools

This document describes the MCP tools supported by the HAProxy MCP Server, which allow AI assistants to interact with HAProxy’s Runtime API through the Model Context Protocol (MCP).

Each tool maps directly to HAProxy Runtime API commands and is implemented using the client-native library’s Runtime client.

1. Statistics & Process Info

show_stat

Retrieves the full statistics table for HAProxy.

show_info

Displays HAProxy version, uptime, and process information.

debug_counters

Shows internal HAProxy counters.

clear_counters_all

Resets all statistics counters.

dump_stats_file

Writes current statistics to a file.

2. Topology Discovery

show_frontend

Lists all frontends with their configurations.

show_backend

Lists all backends and their configurations.

show_servers_state

Displays per-server state and statistics.

show_map

Shows entries in a map file.

show_table

Shows entries in a stick table.

3. Dynamic Pool Management

add_server

Dynamically registers a new server in a backend.

del_server

Removes a dynamic server from a backend.

enable_server

Takes a server out of maintenance mode.

disable_server

Puts a server into maintenance mode.

set_weight

Changes a server’s load-balancing weight.

set_maxconn_server

Sets the maximum number of connections for a server.

set_maxconn_frontend

Sets the maximum number of connections for a frontend.

4. Session Control

show_sess

Lists all active sessions.

shutdown_session

Terminates a specific client session by ID.

shutdown_sessions_server

Terminates all sessions on a given server.

5. Maps & ACLs

add_map

Adds an entry to a map file.

del_map

Deletes a single entry from a map file.

set_map

Updates the value of an existing map entry.

clear_map

Deletes all entries from a map file.

commit_map

Commits a prepared map‐file transaction.

add_acl

Adds a value to an ACL list.

del_acl

Removes a value from an ACL list.

clear_acl

Deletes all entries from an ACL list.

commit_acl

Commits a prepared ACL transaction.

6. Health Checks & Agents

enable_health

Enables active health checks on a server.

disable_health

Disables active health checks on a server.

enable_agent

Resumes agent-based health probes.

disable_agent

Stops agent-based health probes.

7. Miscellaneous

show_errors

Lists protocol violation errors.

echo

Returns a string (connectivity test).

help

Shows available Runtime API commands.