NanoJev MCP
Click on "Deploy 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., "@NanoJev MCPAt (2,2), is north passable? What's the best move?"
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.
NanoJev MCP
Wraps NanoJev's decision service as an MCP server, letting any MCP-capable agent (Claude Code, ccwitch, Cline, Cursor, ...) query the NanoJev model in natural language.
agent ──stdio(MCP)──> mcp_nanojev.py ──HTTP──> NanoJev repo's serve_decisions.py :8765 (model loaded once)The MCP process is a thin proxy that never loads the model; multiple agents can share the same inference service simultaneously.
Prerequisite: Install NanoJev
git clone https://github.com/TianyuCodings/NanoJev.git
cd NanoJev
python -m pip install -r requirements-toy.txt huggingface_hubDownload the checkpoint (~2.3 GB; see the NanoJev README for details):
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="C-Tianyu/NanoJev",
revision="unified-games-v1",
local_dir="checkpoints/NanoJev-unified",
allow_patterns=["best.safetensors", "config.json", "tokenizer/*", "backbone_config/*"],
)Related MCP server: jev-mcp
Setup
1. Download this package (clone / unzip to any directory, e.g. D:\nanojev_mcp)
2. One-command configuration
python setup_mcp.pyThe script will: install the mcp SDK -> probe the inference service -> register nanojev into Claude Code (user scope) -> print JSON for other clients. Common options:
python setup_mcp.py --service-url http://127.0.0.1:9000/api/evaluate # non-default port
python setup_mcp.py --python D:\NanoJev\.venv\Scripts\python.exe # use NanoJev's venv
python setup_mcp.py --skip-claude # only print JSON, leave claude config untouched3. Start the NanoJev inference service (in the NanoJev repo directory)
python scripts/serve_decisions.py --checkpoint-dir checkpoints/NanoJev-unified --web-root web --port 8765 --disable-native-tritonDone. Just ask your agent in natural language, e.g.:
Use nanojev to decide: the agent is at (2,2), is the cell to the north passable? Which of the four directions is the best move?
Running Directly (stdio)
The MCP server uses the stdio transport (JSON-RPC over stdin/stdout) and listens on no port. Launch it directly with:
python mcp_nanojev.py # default service URL http://127.0.0.1:8765/api/evaluateOverride the service URL with the NANOJEV_EVALUATE_URL environment variable:
# Linux / macOS
NANOJEV_EVALUATE_URL=http://127.0.0.1:9000/api/evaluate python mcp_nanojev.py
# Windows PowerShell
$env:NANOJEV_EVALUATE_URL = "http://127.0.0.1:9000/api/evaluate"; python mcp_nanojev.pyAgents spawn it as a subprocess and communicate over stdin/stdout; when run standalone the terminal only shows raw JSON-RPC traffic. Ctrl+C to exit.
Manual MCP Client Configuration
If you prefer to register manually (or use a client other than Claude Code), copy config.json and adjust the paths:
{
"mcpServers": {
"nanojev": {
"command": "python",
"args": ["D:\\nanojev_mcp\\mcp_nanojev.py"],
"env": {
"NANOJEV_EVALUATE_URL": "http://127.0.0.1:8765/api/evaluate"
}
}
}
}command — path to a Python interpreter that has the
mcppackage installed.args — absolute path to
mcp_nanojev.pyin this package.env.NANOJEV_EVALUATE_URL — (optional) override the default service URL
http://127.0.0.1:8765/api/evaluate.
Drop this into your client's config file:
Client | Config file |
Claude Desktop |
|
Cursor |
|
Cline |
|
Tools Available to the Agent
Tool | Input | Output |
|
| Per-question probability distributions, argmax verdicts, inference time |
| — | Whether the inference service is ready |
Four Decision-Loop Stages Where the Agent Uses the Model
Feasibility gate (Boolean) — Before moving, ask per-direction "is one cell north passable?" to prune illegal actions first.
Action selection (Choice) — Choose the next step from candidate actions; a single forward pass returns the full distribution over 2-255 candidates.
Risk / urgency (Score) — Ask "how urgent is it to change direction?" (0-3); set a threshold on the expected score to turn it into a rule.
Look-ahead planning (Boolean + Choice) — Batch-encode future states from candidate action sequences into a single
nanojev_evaluatecall, compare branch scores, then commit.
See docs/MCP.md for more examples and troubleshooting. When not using an agent, you can also use the interactive terminal client:
python ask_nanojev.pyThis server cannot be deployed
Maintenance
Related MCP Connectors
Decision Layer for AI Agents — 58+ tools, Advisor, MCP. Free key: POST /v1/register {}.
MCP-Native LLM Orchestration Agent
MCP delegation fallback for AI agents to discover capabilities, knowledge, tools, and collaborators.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables to run structured QuReDec decision briefs from inside MCP-compatible clients, submitting questions and receiving evidence-backed recommendations with citations.24 PyPIMIT
- AlicenseAqualityBmaintenanceProvides coding agents and CI with a typed decision layer that sends bounded state and questions to Jev, then returns deterministic actions for review, risk assessment, requirement checks, and verification.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to query a locally running Kev decision model through MCP tools, returning calibrated probabilities for typed questions such as yes/no, choice, and score.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables MCP hosts to query Jev's typed decision model—yes/no, choice, and score—with calibrated probabilities, while defaulting to an offline mock and disclosing all egress unless explicitly enabled.Apache 2.0