mcp-socket
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HOST | No | HTTP bind address | 127.0.0.1 |
| PORT | No | HTTP bind port | 8000 |
| LOG_LEVEL | No | Logging level | INFO |
| TRANSPORT | No | Transport type: stdio, streamable-http, or sse | stdio |
| MAX_SOCKETS | No | Max concurrent sockets | 128 |
| MAX_RECV_BYTES | No | Max recv payload | 1048576 |
| MAX_SEND_BYTES | No | Max send payload | 1048576 |
| CLEANUP_INTERVAL | No | Cleanup scan interval | 5 |
| SOCKET_IDLE_TIMEOUT | No | Idle seconds before auto-close | 300 |
| ALLOW_PRIVATE_NETWORK | No | Allow RFC1918/loopback/ULA/etc. | false |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| resolve_dnsA | Resolve a hostname into IPv4 (A) and IPv6 (AAAA) addresses. Address ordering follows the OS resolver. Use this before tcp_connect/udp_send because those tools require IP literals, not hostnames. |
| tcp_connectA | Create a TCP socket and connect to an IP:port. address must be an IPv4 or IPv6 literal (call resolve_dns first for hostnames). Returns socket_id for subsequent send/recv/close operations. |
| udp_openA | Create an unbound outbound UDP socket. Use udp_send to send datagrams and udp_recv to receive them. Returns socket_id. |
| list_socketsA | List open sockets and their metadata (state, remote/local endpoints, idle time, byte/packet counters). Pass socket_id as a string, list of strings, or omit/null for all sockets. |
| close_socketA | Close a socket and remove it from the registry. For TCP, reset=false performs a graceful FIN shutdown; reset=true attempts an abortive close (TCP RST). For UDP, reset is ignored. |
| tcp_sendA | Send bytes over a connected TCP socket. encoding=utf8 encodes data as UTF-8; encoding=base64 base64-decodes data first. |
| udp_sendC | Send a UDP datagram to address:port. address must be an IP literal. encoding=utf8 or base64 as with tcp_send. |
| socket_pollA | Check whether a socket currently has readable data. If timeout_seconds > 0, wait until readable or timeout. Most clients can rely on timeout support in tcp_recv/udp_recv instead. |
| tcp_recvA | Receive bytes from a TCP socket. timeout_seconds=0 (default) is non-blocking; >0 waits for at least one byte or timeout. Returns base64 (and text if valid UTF-8). bytes_received=0 with empty data indicates timeout or EOF (peer closed). |
| udp_recvA | Receive one or more UDP datagrams (up to max_packets). timeout_seconds=0 (default) is non-blocking; >0 waits for at least one packet. Each packet includes source address/port, length, base64 data, and optional text. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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