mcp-socket
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-socketSend HTTP GET to example.com and show the response headers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-socket
Stateful outbound TCP/UDP MCP server for LLMs.
Sockets stay open across tool calls until you close them or they hit the idle timeout. That makes multi-step protocols practical: HTTP/1.x, SMTP, Redis, DNS (UDP), custom text/binary protocols, and more.
See DESIGN.md for the full design.
Install
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Related MCP server: WireMCP
Run
# stdio (default) — typical for MCP clients
mcp-socket
# or
python -m mcp_socket
# HTTP transport
mcp-socket --transport streamable-http --host 127.0.0.1 --port 8000CLI options
Option | Default | Description |
|
|
|
|
| HTTP bind address |
|
| HTTP bind port |
|
| Idle seconds before auto-close |
|
| Cleanup scan interval |
| off | Allow RFC1918/loopback/ULA/etc. |
|
| Max concurrent sockets |
|
| Max send payload |
|
| Max recv payload |
|
| Logging level |
Tools
Tool | Purpose |
| Hostname → A/AAAA |
| Connect TCP to IP:port |
| Create UDP socket |
| Send ( |
| Receive (base64 + optional text) |
| Check readability |
| Inspect open sockets |
| Close (optional TCP RST) |
tcp_connect / udp_send require IP literals. Call resolve_dns first for hostnames.
Private and local destinations are blocked by default (ADDRESS_BLOCKED). Use --allow-private-network for local testing.
Example (TCP HTTP/1.0)
resolve_dns(hostname="example.com")
→ { "ipv4": ["93.184.216.34"], ... }
tcp_connect(address="93.184.216.34", port=80)
→ { "socket_id": "...", "state": "connected" }
tcp_send(socket_id="...", encoding="utf8",
data="GET / HTTP/1.0\r\nHost: example.com\r\n\r\n")
tcp_recv(socket_id="...", max_bytes=65536, timeout_seconds=5)
→ { "bytes_received": N, "data_base64": "...", "text": "HTTP/1.0 200 ..." }
close_socket(socket_id="...")Security
Before every connect() / sendto():
Destination must be a valid IP literal
Private/local ranges are denied unless
--allow-private-networkMulticast / unspecified / reserved ranges are always denied
No TLS, no listening sockets, no proxy support — higher-level servers can layer those on top.
Develop
pip install -e ".[dev]"
pytestLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/cinit/mcp-socket'
If you have feedback or need assistance with the MCP directory API, please join our Discord server