Skip to content
MCP server

JWT Tools

Decode JWTs without trusting them, flag risky claims, verify signatures, mint test tokens

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, Linux, macOS
Runs
Locally
Version
0.3.0
Listing updated
2 days ago

About JWT Tools

JWT Tools is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.

The decode tool always reports verified as false, so a token's contents are never presented as trusted. It flags findings such as an alg of none, jku or x5u headers, expired or not-yet-valid tokens, missing standard claims, lifetimes above a threshold (default 24 hours), millisecond timestamps and claims that look like secrets.

Verification is strict: the caller names the algorithm, and a token whose header says anything else fails without a cryptographic check, which guards against algorithm confusion. It supports HS, RS and ES families in 256, 384 and 512 bit variants, with optional audience, issuer and clock tolerance, and compares HMACs in constant time. A third tool signs claim sets with a key you supply, for test fixtures. Encrypted five-part tokens are rejected and PS* tokens can be decoded but not verified.

It uses only node:crypto, no network or files, and keys are not stored beyond one call. It runs as a pinned Docker image over stdio, MIT licensed.

Install

Run in a terminal

claude mcp add mcp-jwt-tools -- docker run -i --rm ghcr.io/basitalisandhu/mcp-jwt-tools:0.3.0

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-jwt-tools": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-jwt-tools:0.3.0"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-jwt-tools": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-jwt-tools:0.3.0"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "mcp-jwt-tools": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-jwt-tools:0.3.0"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-jwt-tools": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-jwt-tools:0.3.0"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-jwt-tools": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/basitalisandhu/mcp-jwt-tools:0.3.0"
      ]
    }
  }
}

Tools this server provides (3)

Taken from the project documentation; the running server may differ.

decode_jwt
Decode a token and flag risky algorithms and claims.
verify_jwt
Verify signature and claims with a key.
sign_test_jwt
Sign a claims object for tests.

What it does

Safe decoding
Shows header and payload and always marks them unverified.
Risk findings
Flags none algorithms, odd headers and missing or expired claims.
Pinned-algorithm verification
Blocks algorithm confusion by requiring the algorithm up front.
HS, RS and ES support
Verifies 256, 384 and 512-bit variants.
Test token signing
Creates signed tokens for fixtures.
No storage
Keys are used for one call only.

Good for

  • Inspect a token from a failing API call
  • Check whether a token's lifetime or claims look risky
  • Verify a token against a public key and expected issuer
  • Create a signed token for an integration test

Pricing

Open source

MIT licensed

Prices change. Check basitalisandhu.github.io before you buy.

JWT Tools FAQ

Does decoding verify the signature?

No. Output always says verified: false.

Which algorithms can it verify?

HS256/384/512, RS256/384/512 and ES256/384/512.

Can it handle encrypted tokens?

No; five-part JWE tokens are rejected.

Does it store my keys?

No. Keys are used for the one call and not stored.

Is JWT Tools free?

Yes. JWT Tools is open source, so you can use and self-host it for free.

How do I add JWT Tools to Claude Code?

Run this command in your terminal: claude mcp add mcp-jwt-tools -- docker run -i --rm ghcr.io/basitalisandhu/mcp-jwt-tools:0.3.0

What are the best alternatives to JWT Tools?

The closest alternatives to JWT Tools are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to JWT Tools

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools