skynet-mcp
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., "@skynet-mcplist all services and their memory usage"
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.
skynet-mcp
Wraps the DebugConsole
debug commands of the skynet game server framework into MCP (Model Context Protocol) tools, letting coding agents (such as opencode)
drive the skynet debug console directly through natural language—no need to memorize commands like list / mem / call / inject anymore.
用户: "看看现在 skynet 里跑了哪些服务"
AI: → 调用 list 工具
用户: "帮我把 watchdog 服务的卡住的任务栈打出来"
AI: → 调用 task 工具(地址来自 list 输出)Features
32 MCP tools, covering all debug console commands (see the tool list below)
raw_commandfallback tool: passes any command line through verbatim, compatible with future new commands2 resources:
skynet://services(real-time service list),skynet://help(command help)1 prompt template:
skynet_troubleshoot(generates troubleshooting steps in "read-only → dangerous" order)Commands with side effects (kill/exit/inject/call/signal/...) are never auto-retried; read-only commands are retried once automatically on transport failure
Related MCP server: mc-mcp-server
Communication Principle
The skynet debug console supports an HTTP channel (POST / HTTP/1.0, the body is the command line, the response is raw text +
a <CMD OK> / <CMD Error> marker, then the connection closes). This project hand-crafts that request using the standard library socket:
Why not http.client/requests: skynet's response has no HTTP status line (curl needs
--http0.9), standard HTTP clients cannot parse itWhy POST instead of GET: the POST body is executed verbatim as a command line by the server's
docmd(body), so quotes, commas, and slash paths incall 3 "foo", 1, "bar"/inject 3 /home/x/patch.luaare not mangled by URL encoding
Project Structure
skynet-mcp/
├── skynet_mcp/
│ ├── main.py # FastMCP 入口(工具注册 + 资源 + 提示词)
│ ├── config.py # host/port/timeout(env + 命令行参数)
│ ├── backend.py # 裸 socket HTTP POST 通信层
│ ├── parser.py # 裸文本响应解析(去 Welcome/CMD 标记)
│ └── tools.py # 32 个工具定义
├── tests/ # mock console + 单元测试
├── examples/ # opencode 集成示例
└── scripts/smoke_test.pyInstallation (Linux, same machine as skynet)
# 1. 获取代码(git clone,或拷贝已有目录到 ~/skynet-mcp)
mkdir -p ~/skynet-mcp && cp -r <代码路径>/* ~/skynet-mcp/
# 2. 创建 venv 并安装依赖(python3 需 >= 3.10)
cd ~/skynet-mcp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/pip install -e .
# 3. 验证
.venv/bin/python scripts/smoke_test.py --port 8000Startup
The MCP server starts independently via streamable-http (manually, or managed by a process manager such as systemd / supervisor), listening on a fixed port, with clients like opencode connecting remotely over HTTP—no longer auto-spawned as a child process by the client.
# WSL 内启动,默认监听 127.0.0.1:8765(Windows 侧经 WSL2 localhost 转发访问)
.venv/bin/python -m skynet_mcp.main
# 自定义 HTTP 监听端口
.venv/bin/python -m skynet_mcp.main --http-port 8765HTTP listening parameters:
Parameter | Default | Description |
|
| HTTP listen address |
|
| HTTP listen port (distinct from the skynet console port) |
skynet debug console connection parameters:
Parameter | Environment variable | Default |
|
|
|
|
|
|
|
|
|
Endpoint URL:
http://127.0.0.1:8765/mcp(MCP streamable-http protocol), clients such as opencode / skynet-mcp-client all connect through this endpointSecurity: binds to
127.0.0.1by default with DNS rebinding protection enabled; for cross-machine access, use--http-host 0.0.0.0and ensure the network is trusted (or use an SSH tunnel), never expose to the public internet
Connecting to opencode
First start the MCP server independently as described above, then connect with type: "remote". The configuration must be written on the side where opencode runs—opencode only reads the global config on its own process side ~/.config/opencode/opencode.json +
the project-level opencode.json in the current directory; opencode launched on the Windows side cannot see config inside WSL
(shown as opencode mcp list displaying No MCP servers configured).
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"skynet": {
"type": "remote",
"url": "http://127.0.0.1:8765/mcp",
"enabled": true
}
}
}opencode launched inside WSL: write the WSL project root
opencode.json(already included in this repo) or the global~/.config/opencode/opencode.jsonopencode launched on the Windows side (PowerShell / Desktop): write the Windows global
C:\Users\Admin\.config\opencode\opencode.json(merge and keep existing content such asinstructions) or the project-levelopencode.jsonin the launch directory. Theurlstill useshttp://127.0.0.1:8765/mcp—WSL2 localhost forwarding passes the Windows-side127.0.0.1:8765straight through to the MCP process listening inside WSL, no need to change the MCP listen addressThe MCP server must be started independently (manually or managed by a process manager); opencode no longer auto-spawns child processes; if the server is not running, opencode will show a connection failure
For LAN/public network access, restart MCP with
--http-host 0.0.0.0—but the server has no authentication and includes dangerous commands likekill/inject/raw_command, so only an SSH tunnel (ssh -L 8765:127.0.0.1:8765 user@remote) or Bearer Token authentication is recommended; do not expose directly to the public internet
After making changes, restart opencode, type /mcp in the conversation to confirm skynet is connected, then ask it to
"use the skynet tools to list all current services" for an end-to-end verification. Full testing and troubleshooting steps are in
examples/opencode-mcp.md; test prompts covering all 32 tools are in examples/mcp-test-prompts.md.
Deployment Methods
Direct connection inside WSL/Linux (recommended): opencode, the MCP process, and skynet are all inside WSL, connecting directly to
127.0.0.1:<port>, zero forwardingSSH tunnel (remote production machine): when the MCP process and skynet are on different machines, use
ssh -L 8000:127.0.0.1:8000 user@remote, and opencode connects to local port 8000. Never expose the debug console port directly to the public internet
Tool List (32 tools)
Tool | Underlying command | Description |
|
| Help for all commands |
|
| List all services and addresses |
|
| List unique services and pending requests |
|
| Message queue/pending requests/total messages |
|
| Lua memory per service |
|
| Full-server forced GC + memory report |
|
| Network connection overview |
|
| C-layer / jemalloc memory |
|
| Heap analysis |
| same name | Start a new service (⚠) |
| same name | Terminate a service (【Dangerous】) |
|
| Interrupt an infinite loop to get a call stack (【Dangerous】) |
| same name | Call stack of pending requests |
|
| Terminate a thread (⚠) |
|
| Service internal information |
|
| Inject a patch script (【Dangerous】, path is from skynet's perspective) |
|
| Arbitrary debug protocol command (⚠) |
|
| Round-trip latency |
|
| Protocol tracing |
| same name | Record service input messages |
|
| Call a service lua interface (【Dangerous】) |
| same name | Read/write environment variables |
| pass-through | Fallback for arbitrary commands (【Dangerous】) |
Address notation: :01000001 (eight hex digits), 1 (shorthand), .name (local service name).
Security Notes
The skynet debug console has no authentication and only listens on
127.0.0.1—for remote use, go through an SSH tunnel, do not expose the port【Dangerous】commands (kill/exit/signal/inject/call/raw_command) affect running services; this is marked in the tool descriptions; the coding agent should have the user confirm before calling
The
debuginteractive command requires a persistent terminal session, which the HTTP channel does not support, so it is explicitly rejected (use telnet/nc to connect manually)The script path for
injectis from the skynet server's perspective (MCP and skynet may be on different file systems)
Development and Testing
Copy-paste prompts for end-to-end testing of all 32
skynet_*tools through opencode are inexamples/mcp-test-prompts.md; below are developer-side unit/smoke tests.
# 单元测试
python -m pytest tests/ -v
# 冒烟测试(先起 mock console)
python -m tests.mock_console # 打印 mock 端口
python scripts/smoke_test.py --port <mock端口>
# 或对真实 skynet 冒烟
python scripts/smoke_test.py --port 8000
# 手工验证(nc 直连真实 console)
printf 'POST / HTTP/1.0\r\nContent-Length: 4\r\n\r\nlist' | nc 127.0.0.1 8000Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Generate game-ready 3D models, textures, and audio from natural language, over MCP.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
One AI endpoint to search and call 22k+ MCP servers; 50+ hosted tools work instantly, no key.
31Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables control of a Minecraft server through RCON commands via natural language, including game commands, chat-based AI interactions, and server management capabilities.6-
- AlicenseNot gradedqualityFmaintenanceEnables AI-driven interactions with Minecraft through a WebSocket-based server and MCP protocol, allowing external MCP clients and in-game chat to trigger AI tools.4MIT
- AlicenseNot gradedqualityBmaintenanceA Linux-native MCP server that gives AI assistants direct access to DMA-based memory operations for memory inspection, process analysis, reverse engineering, and game engine SDK extraction via natural language.13AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceLocal MCP server that gives AI agents 44 engine tools to build, run, and debug real 2D and 3D games through conversation.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/losophy/skynet-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server