jax-mcp
MCP (Model Context Protocol) server for JAX documentation.
Enables LLMs to access up-to-date JAX documentation and validate generated code.
Installation
pip install -e .
Or run directly:
python -m jax_mcp
Usage with Claude Code
# Add as MCP server
claude mcp add -t stdio -s user jax -- python -m jax_mcp
# Or if installed globally
claude mcp add -t stdio -s user jax -- jax-mcp
Configuration
| Environment Variable | Default | Description |
|---|---|---|
JAX_DOCS_PATH |
(none) | Path to local JAX docs directory (offline mode) |
JAX_MCP_CACHE_DIR |
~/.cache/jax-mcp |
Cache directory for online mode |
JAX_MCP_CACHE_TTL |
24 |
Cache TTL in hours |
JAX_MCP_NO_CACHE |
0 |
Set to 1 to disable caching |
Offline Mode
Point to a local JAX clone for offline access:
export JAX_DOCS_PATH=/path/to/jax/docs
python -m jax_mcp
Online Mode (Default)
Fetches docs from GitHub with local caching:
python -m jax_mcp
# Fetches from: raw.githubusercontent.com/google/jax/main/docs/
Available Tools
| Tool | Description |
|---|---|
list-sections |
List all documentation sections by category |
get-documentation |
Fetch specific documentation content |
jax-checker |
Validate JAX code for common gotchas |
Documentation Categories
- concepts: Core JAX concepts (pytrees, transformations, tracing)
- gotchas: Common mistakes and how to avoid them
- transforms: jit, vmap, grad, scan patterns
- advanced: Distributed computing, custom pytrees
- performance: GPU tips, profiling, benchmarking
- api: Module overviews (jax.numpy, jax.lax, jax.random)
- examples: Practical code examples
JAX Checker
The jax-checker tool catches common JAX mistakes:
- In-place array mutations (
array[idx] = value) - Side effects in jitted functions (print, globals)
- PRNG key reuse without splitting
- Python control flow in traced code
- Missing
block_until_ready()for benchmarks - Float64 usage without config
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
License
MIT
Metadata
Release files for jax-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jax_mcp-0.1.0.tar.gz | 66.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jax_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 80.3 kB
Release files / jax_mcp-0.1.0.tar.gz
| Download URL | jax_mcp-0.1.0.tar.gz |
|---|---|
| Size | 66.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21667b504ba291e1910efd3f1bffc4c33b65aa9df31cb9460b2b6cb7d98fefd2
|
|
BLAKE2b-256 checksum How to use checksums |
4a4da3556390db12c21e992e93913ef40c3d6c7769c2cd6243b2b7eccafa76a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Release files / jax_mcp-0.1.0-py3-none-any.whl
| Download URL | jax_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7722d21a2cbfc51319bec47cbdb9cdb2f5dea5d08312054f16daa001517f5073
|
|
BLAKE2b-256 checksum How to use checksums |
27964387e701a8399e12d50c709ac7b552a8d42c0de8623118eb5a94fa161f71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Security for jax-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.