Home / MCP / MCP2TCP MCP Server
Bridges TCP devices with AI models via MCP for natural-language hardware control and real-time parameter tuning.
Configuration
View docs{
"mcpServers": {
"mcp2tcp": {
"command": "uv",
"args": [
"run",
"src/mcp2tcp/server.py"
]
}
}
}The MCP server mcp2tcp bridges TCP devices with AI models using the Model Context Protocol, enabling you to control hardware with natural language and receive real-time AI-driven adjustments to physical parameters.
You connect your MCP client to the mcp2tcp server and leverage natural language prompts to control and monitor TCP-connected devices. The server accepts commands and translates them into TCP messages that your hardware can understand, while the AI model context provides reasoning, tool access, and dynamic parameter tuning. Use supported MCP clients to send prompts, manage resources, and call tools as needed. Start with a simple test device to verify connectivity, then expand to more complex hardware and workflows.
Typical usage patterns include establishing a TCP connection to your hardware, sending a command to set a device parameter (for example, PWM or sensor readouts), and requesting status updates. You can also load multiple configuration profiles to switch between different devices or setups without editing code. When you issue a natural language request, the MCP client routes it through the MCP protocol, enabling the AI model to interpret, plan, and execute actions on the hardware.
Prerequisites: Python 3.11 or later.
Clone the project, set up a virtual environment, and install development dependencies.
# Clone the repository
git clone https://github.com/mcp2everything/mcp2tcp.git
cd mcp2tcp
# Create and activate a virtual environment
uv venv .venv
# Activate the virtual environment
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate
# Install development dependencies in editable mode
uv pip install --editable .Configure your MCP client to load and start the MCP server. You can run the server directly and optionally specify a configuration profile.
{
"mcpServers": {
"mcp2tcp": {
"command": "uv",
"args": [
"run",
"src/mcp2tcp/server.py"
]
}
}
}{
"mcpServers": {
"mcp2tcp": {
"command": "uv",
"args": [
"run",
"src/mcp2tcp/server.py",
"--config",
"Pico"
]
}
}
}{
"mcpServers": {
"mcp2tcp2": {
"command": "uv",
"args": [
"run",
"src/mcp2tcp/server.py",
"--config",
"Pico2"
]
}
}
}Full support for the Model Context Protocol with resource management and tool invocation to enable AI-driven hardware control.