# JWT Tools

> JWT Tools is an open-source MCP server for security. Decode JWTs without trusting them, flag risky claims, verify signatures, mint test tokens. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, macOS, Windows
- **Website:** https://basitalisandhu.github.io/dev-mcp-servers/
- **Repository:** https://github.com/basitalisandhu/dev-mcp-servers/tree/HEAD/packages/jwt-tools
- **MCP Registry name:** io.github.basitalisandhu/mcp-jwt-tools
- **Categories:** security, developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `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.

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/jwt-tools
