Hoysal-25/Network_utility_MCP_Server
If you are the rightful owner of Network_utility_MCP_Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A minimal, high-quality Model Context Protocol (MCP) server over STDIO providing network utilities.
Network Utility MCP Server
A minimal, high-quality Model Context Protocol (MCP) server over STDIO that provides classic network utilities to an LLM/agent or a CLI client:
- 🔌 Port Check (telnet-style) – verify if a host:port is open or closed
- 🌐 DNS Lookup (nslookup-style) – A, AAAA, CNAME, MX, TXT, NS, SOA, ANY
Built with Node.js + TypeScript, with zero runtime dependencies. Implements JSON-RPC 2.0 over stdio to be MCP-friendly. Includes a small demo CLI client.
🚀 Quick Start
bash
1) Install dependencies
npm install
2) Build TypeScript
npm run build
3) Start MCP server (listens on stdio)
npm start
- Server logs → stderr
- JSON-RPC communication → stdin/stdout
🧪 Demo (No Agent Required)
Run the server and test it with the built-in demo client: bash
Terminal 1: Start server
npm run dev
Terminal 2: Run demo client
npm run demo Or send a single request using the included examples: bash
Example: Check port
node dist/mcpServer.js < examples/requests/portCheck.json
Example: DNS A record
node dist/mcpServer.js < examples/requests/dnsA.json
📡 JSON-RPC Methods
net.checkPort
Check if a TCP port is open on a given host.
Params:
json { "host": "example.com", "port": 80, "timeoutMs": 2000 }
Response:
json { "jsonrpc": "2.0", "id": 1, "result": { "open": true } }
dns.lookup
Resolve DNS records for a host.
Params:
{ "host": "example.com", "type": "A" }
**Response:**
json
{ "jsonrpc": "2.0", "id": 2, "result": ["93.184.216.34"] }
Supported record types: `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `NS`, `SOA`, `ANY`
📂 Project Structure
src/
mcpServer.ts # JSON-RPC over stdio server
utils/
portCheck.ts # host:port checker
dnsLookup.ts # DNS resolver
cli/
demoClient.ts # interactive CLI to test the server
examples/
requests/ # sample JSON-RPC requests
🤝 Contributing
1. Fork the repo
2. Create a feature branch (`git checkout -b feature/my-feature`)
3. Commit changes (`git commit -m 'Add new feature'`)
4. Push to your branch (`git push origin feature/my-feature`)
5. Open a Pull Request 🎉