Grok-1 Stop Signs
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Grok-1 Stop Signs (MCP plugin)

Grok-1 with stop signs, as tools any agent can call. A small "driver" model drafts words, and Grok-1 (the "checker") checks the whole draft in one pass each time a stop sign comes up. Every word Grok-1 agrees with is kept; at the first disagreement Grok-1's own word is used instead. Because the check is greedy, the output is identical to plain greedy decoding, token for token, while the big model runs fewer times.
This is a free, Apache-2.0 MCP server (stdio and streamable HTTP) packaged as a Grok Build / Cursor plugin. It builds on:
fitzyracing1/grok-1-stopsigns, stop signs added to xAI's open Grok-1 JAX code (vendored at commit
82a1f0f), andfitzyracing1/stopsigns, the Hugging Face / PyTorch version (pinned at
ddf8c28for thehfbackend).
Not made, endorsed or verified by xAI.
Tools
Tool | What it does |
| Generates text with stop signs. Returns the text plus stats: checker passes used, plain-greedy passes, passes saved, driver passes, accepted / rejected draft tokens, stop signs, wall time. With |
| One plain-greedy baseline, then each policy; every row is checked for identical output. |
| The stop-sign policies. |
| The backends, what they need, and whether they are tested. |
Stop-sign policies
Policy | Stops the draft when |
| N tokens have been drafted |
| a drafted token contains |
| the driver's top-token probability drops below T (max 16 tokens) |
| any of the listed policies fires |
Backends
Backend | Status | What it is |
| Tested on CPU in CI | Grok-1's real architecture (8-expert top-2 MoE, GQA, RoPE) and real 131,072-token tokenizer, shrunk to 4 layers with random weights. The driver is the checker's first layer. No GPU, no download, no sign-in. The text is gibberish; the mechanics are real. |
| Tested (CPU in CI; GPU by hand) | Any Hugging Face driver/checker pair that shares a tokenizer, e.g. |
| Untested | Full-size Grok-1 (314B) from your own checkpoint: set |
Related MCP server: inference-lab
Install and run
Requires Python 3.10 to 3.12 (JAX 0.4.25, which Grok-1's code is pinned to, has no 3.13 wheels) and uv or pip.
As a plugin, the bundled mcp.json starts the server with:
uv run --directory <plugin folder> --python 3.11 grok1-stopsigns-mcpThe first start installs the dependencies (JAX, Haiku, SentencePiece, the MCP SDK; about 150 MB) into the plugin folder, which can take a minute.
By hand:
git clone https://github.com/fitzyracing1/grok-1-stopsigns-plugin
cd grok-1-stopsigns-plugin
pip install -e . # add ".[hf]" for the Hugging Face backend
grok1-stopsigns-mcp # stdio
grok1-stopsigns-mcp --transport http --host 127.0.0.1 --port 8765
# streamable HTTP at http://127.0.0.1:8765/mcpAny MCP client config:
{
"mcpServers": {
"grok1-stopsigns": { "command": "grok1-stopsigns-mcp" }
}
}The HTTP transport has no authentication. It binds to 127.0.0.1 by default; put it behind your own auth before exposing it.
Sample generate result (grok1-tiny, CPU)
generate(prompt="The answer to life the universe and everything is of course", policy="every:4", max_new_tokens=32, check_lossless=true):
{
"text": "cerealAddToAddToAddTo...ictionary Guilty Guilty Guilty ...",
"stats": {
"new_tokens": 32, "checker_passes": 9, "walk_checker_passes": 32,
"checker_passes_saved": 23, "checker_pass_reduction": 3.556,
"driver_passes": 34, "accepted_draft_tokens": 24, "rejected_draft_tokens": 3,
"bonus_tokens": 5, "stop_signs": 9, "acceptance_rate": 0.889, "wall_time_s": 4.37
},
"lossless": { "checked": true, "identical": true, "plain_greedy_wall_time_s": 3.75, "speedup": 0.858 }
}Grok-1 ran 9 times instead of 32 and the output matched plain greedy exactly. It was still slower in wall time, which is expected on a CPU with a tiny model (see limits).
Honest limits
grok1-tiny is a demo. Random weights, so the text is nonsense. It proves the output is lossless and counts the checker passes saved; it says nothing about quality.
Fewer checker passes is not the same as faster. On CPU, and with small models, driving is usually slower than walking. The wall-clock win shows up when the checker is much bigger than the driver and runs on a GPU: with the
hfbackend on an RTX 5070,distilgpt2→gpt2-large, 128 tokens,every:8took 0.843 s vs 1.994 s (2.37x faster, identical output). Tiny pairs likedistilgpt2→gpt2were slower on the same GPU.Full-size Grok-1 is untested. The
grok1backend wires the 314B checkpoint into the same code, but nobody has run it: it needs the ~300 GB checkpoint and about 8 large GPUs. No speedup is claimed for it.The Grok-1 backends re-run the whole context each pass (no KV cache), like Grok-1's reference code. The
hfbackend uses a KV cache.Greedy only; no sampling or temperature.
One request at a time per server process (models are shared behind a lock).
Network and credentials
grok1-tiny: no network calls, no credentials.hf: downloads model weights from huggingface.co on first use. No token needed for public models.grok1: reads a local checkpoint folder; no network.Installing fetches Python packages from PyPI (and, for
[hf],stopsignsfrom GitHub at a pinned commit).No telemetry. The server reads only the environment variables listed above.
Testing instructions for reviewers
No sign-in, API key, GPU or download beyond the Python packages is needed. Everything
below uses the default CPU backend grok1-tiny. The first call takes about 10 to 20
seconds while JAX compiles the tiny model; later calls take a few seconds. Expect
gibberish text: the weights are random. What to check is lossless.identical: true and
checker_passes lower than walk_checker_passes.
Example prompts:
"Use grok1-stopsigns to list the stop-sign policies and the backends, and tell me which backend works on CPU."
"With grok1-stopsigns, generate 32 tokens from 'The answer to life the universe and everything is of course' using policy every:4 with check_lossless on. How many Grok-1 checker passes did stop signs save, and was the output identical?"
"Benchmark the stop-sign policies every:2, every:4, every:8, sentence and conf:0.5 on grok1-tiny. Which one saved the most checker passes, and were all of them lossless?"
"Generate 20 tokens from 'Stop signs let the driver go fast' with the policy sentence,conf:0.5,every:6 and check that it matches plain greedy decoding."
Development
pip install -e ".[test]" # add hf for the hf-backend test
python -m pytest -v # starts the server over stdio and HTTP, calls the toolsCI (.github/workflows/ci.yml) runs the same tests on CPU, plus the hf backend with
sshleifer/tiny-gpt2 → distilgpt2.
License
Apache-2.0. See LICENSE and NOTICE. Grok-1 code © 2024 X.AI Corp.
(Apache-2.0); stop-sign code © 2026 fitzyracing1 (Apache-2.0 for the Grok-1 port, MIT for
stopsigns). The Grok-1 weights are not included.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Free OpenAI-compatible inference with signed provenance receipts and 3 focused MCP tools.
Multiple MCP tools, persistent graph memory, token-saving data pointers, and more.
12 read-only MCP tools for AI communication rules, instruction linting & 25-model benchmarks.
Zero-LLM guardrail MCP to detect prompt injections, redact/HMAC PII, and validate tool args.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables agents to orchestrate speculative decoding runs and deterministically verify draft-model acceptance probabilities via MCP.7-
- AlicenseNot gradedqualityBmaintenanceEnables agents to inspect GPU status, size KV cache and vLLM/llama.cpp deployments, read live backend metrics, and run benchmarks over MCP.MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible clients to manage and run local or cloud LLMs, generate completions and embeddings, and perform web search/fetch through exposed tools.790 npmAGPL 3.0
- AlicenseNot gradedqualityNot gradedmaintenanceEnables real-time indirect prompt injection fuzzing, exfiltration canary detection, least-privilege tool sandboxing, and cryptographic audit proofs over MCP.MIT