Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
--hostNoExplicit bind address; wins over --local.
--httpNoServes Streamable HTTP at POST /mcp instead of stdio, on all interfaces (0.0.0.0). HTTP mode is key-gated and requires mcp.api_key from every caller.
--portNoHTTP listen port.8315
--localNoBinds the HTTP listener to loopback (127.0.0.1) only.
--configNoKeep both config files in this folder instead of ~/.ctrlpi/.
--no-scanNoNever sweep the LAN, at startup or after. A first run with no config still sweeps once.
--rotate-keysNoReplace the shipped default key on any agent still using it with a random one, and record the date under key_set.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
mcp_agents_listA

List configured agents (Pi or Pico). Returns name, ip, port, online (live /hello probe), type (pi/pico), version, has_default_key, and last_updated_at. Unreachable agents are included (online=false). The LAN is scanned automatically every hour (last_updated_at indicates the last scan time). You can pass rescan=true to forcefully sweep the LAN for new agents right now, but avoid doing this unless the user explicitly asks to find new hardware, as active scanning takes a long time. If has_default_key is true for any agent, explicitly tell the user they are using an insecure default key and ask if they want you to change it.

mcp_gpio_readB

Read a GPIO pin value on agent by number or name, or 'all' to read all pins.

mcp_gpio_writeA

Write a value to a GPIO pin on agent ('0', '1', 'on', 'off', or 'toggle'). Optional duration in seconds, after which the pin reverts to its previous state. If the pin has a configured 'max' pulse duration, the effective duration is clamped to it - and if no duration is given but 'max' is set, 'max' is used as the duration automatically.

mcp_gpio_scanA

Scan all hardware GPIO pins on agent and return their value, type, pull resistor, and name: BCM 2-27 on a Raspberry Pi, GP0-GP28 (minus the WiFi-reserved GP23/24/25/29) on a Pico. Only supported on Raspberry Pi / Pico hardware.

mcp_gpio_configA

Configure a GPIO pin on agent by number. type: input/output/vcc/gnd/remove. init: 0/1/last. pullup: up/down/none (input only). max: max pulse duration in seconds (output only). reversed: active-low logic (input/output only). watched: trigger webhook on state change (logged on the agent if no notifications.webhook is configured).

mcp_gpio_watchedB

List the GPIO pins that are currently being actively watched (the ones emitting hardware interrupts/webhooks).

mcp_sensor_configA

Configure a named sensor on agent. A sensor runs a script and its output is the reading. script is " [args...]": a bare filename in the agent's scripts/ folder (no paths - that folder is the only allowed location), with letters/digits-only arguments. On a Raspberry Pi it is a shell script run with sh; on a Pico a .py file the agent execs in-process. Pass remove=true to delete the sensor.

mcp_sensor_readA

Read sensors on agent. With no name, reads every configured sensor and returns them merged into one JSON object; with a name, reads just that sensor. Every reading is nested under its sensor's own name: a script emitting a JSON object with several fields nests whole, one emitting a single-field object contributes just that field's value, and any other output is wrapped the same way.

mcp_config_readB

Read agent's global application configuration, grouped: notifications (webhook + webhook_key), bridges (matter/homekit callbacks), settings (docs_enabled, logs_enabled, log_days), sensors, and configured pins (gpios). The agent block (platform, os, ip, cpu_temperature, version) is computed live on every read and is not stored.

mcp_config_writeA

Update agent's global configuration dynamically. These are the ungrouped (root) field names; the agent routes each into its group (webhook_url -> notifications.webhook, webhook_key -> notifications.webhook_key, docs_enabled/logs_enabled/log_days -> settings), so a read afterwards shows them nested. log_days controls how long log entries are kept (0-30, clamped; 0 clears the log immediately and keeps only the last hour). docs_enabled is Pi-only. Changing api_key changes the agent's authentication key immediately, and also updates the local config.json file to match automatically.

mcp_config_loadA

Load a full config onto agent from a dict (the agent saves a backup first). Pass an empty dict {} to reset all settings on the agent keeping only its API key.

mcp_agent_restartA

Restart agent's server process. Pass reboot=true to reboot the physical device instead - only honored on a real Raspberry Pi; on Mac/dev agents reboot is ignored and the process is restarted as usual.

mcp_agent_upgradeA

Upgrade the agent in place: runs install.sh --upgrade (re-downloads the latest release files and reinstalls dependencies), then restarts the process so the new code takes effect.

mcp_agent_logsA

Read the last 50 lines of agent's server log file.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 14 tools

Disambiguation5/5

Each tool has a distinct domain and action: GPIO read/write/scan/config/watched, sensor config/read, config load/read/write, agent lifecycle, and agent listing. Overlaps such as GPIO read-all versus scan are differentiated by scan returning pin metadata while read returns values, so selection is clear.

Naming Consistency4/5

All tools use the mcp_ prefix and snake_case with a domain_action pattern, which is highly predictable. Minor deviations include mcp_agents_list (plural domain) versus mcp_agent_* (singular) and mcp_gpio_watched using an adjective rather than a verb.

Tool Count5/5

With 14 tools, the set is well-scoped for bridging to hardware agents, covering GPIO, sensors, configuration, and agent lifecycle without obvious redundancy. Each tool earns its place and the count stays within a manageable range.

Completeness4/5

The surface covers most core operations: GPIO read/write/config/scan, sensor config/read, config load/read/write, agent list/restart/upgrade/logs. Minor gaps remain, such as no explicit sensor listing tool or dedicated agent start/stop operations, but they are largely workaroundable via existing tools.

Maintenance

ActivityMaintained
ResponsivenessNo issues