turret_mcp_server
This project is an MCP (Model Context Protocol) server that controls a turret using serial communication.
claude mcp add --transport stdio gofmanaa-turret_mcp_server /path/to/turret_mcp_server/target/release/turret_mcp_server
How to use
The Turret Controller MCP Server exposes MCP tools to remotely control a turret over a serial connection. Core capabilities include firing the turret, setting its pan/tilt position, querying the current bullets count, and an echo tool for testing connectivity. To use these tools, connect your MCP client to the server using the appropriate server name configured in your environment (as shown in the example settings.json). The server expects the MPC commands named fire, set_turret_position, get_bullets, and echo. When you issue set_turret_position, provide x and y coordinates within the 0-180 range to pan and tilt the turret accordingly. You can also perform simple echo tests to verify connectivity and latency before issuing motion or firing commands.
How to install
Prerequisites:
- Rust toolchain (rustc, cargo)
- Access to a Rust-compatible environment (Linux/macOS; Windows with WSL or msys2)
- USB serial connection to the turret hardware
Installation steps:
- Clone the repository: git clone https://github.com/your-org/turret_mcp_server.git cd turret_mcp_server
- Build the project in release mode: cargo build -r
- Locate the built binary: target/release/turret_mcp_server
- Prepare the MCP configuration (settings.json) to point to the binary, for example: { "mcpServers": { "turret-mcp-server": { "command": "/path/to/turret_mcp_server/target/release/turret_mcp_server", "alwaysAllow": ["set_turret_position", "get_bullets", "fire"] } } }
- Run the server using your preferred method (direct binary execution or within a process manager) and ensure the local serial port is accessible (e.g., /dev/ttyUSB0). If you want to run with Docker, refer to the Docker section in the README for specifics.
- If you modify the serial port, update the turret_mcp_server.rs source and recompile.
Docker alternative:
- Build and run the container as described in the README, mapping the host serial device into the container and exposing the MCP endpoint as configured.
Additional notes
Tips and common issues:
- The server uses the serial port at /dev/ttyUSB0 by default. Update the code to use the correct port for your system if needed.
- Ensure your user has permissions to access the serial device (e.g., add to dialout group on Linux).
- The alwaysAllow list in the settings.json controls which tools can be invoked without extra permissions; adjust as needed for your security model.
- When running in Docker, you must pass the host's serial device into the container (e.g., --device=/dev/ttyUSB0).
- If you encounter initialization errors, verify the serial connection and that the turret hardware is powered and responsive.
- The Maven/Rust dependencies listed (anyhow, rmcp, serialport, serde_json, tracing_subscriber) are resolved by Cargo during build; ensure network access for crates.io if you build in a restricted environment.
Related MCP Servers
goose
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
cunzhi
告别AI提前终止烦恼,助力AI更加持久
probe
AI-friendly semantic code search engine for large codebases. Combines ripgrep speed with tree-sitter AST parsing. Powers AI coding assistants with precise, context-aware code understanding.
mcp-center
A centralized platform for managing and connecting MCP servers. MCP Center provides a high-performance proxy service that enables seamless communication between MCP clients and multiple MCP servers.
backlog -rust
MCP server for Backlog, project management service.
perplexity-web-api
🔍 Perplexity AI MCP without API key