Skip to main content

pangram-mcp

An MCP server for Pangram Labs AI-generated-text detection. Exposes a single analyze tool that classifies text as human-written, AI-generated, or AI-assisted — with an overall verdict, per-class fractions, and a per-segment breakdown.

The API key stays in the server's environment and is sent as the x-api-key header; it is never returned to the model or logged. Callers pass text and receive a classification — they never handle the credential.

Install / run

Requires an API key from Pangram Labs:

export PANGRAM_API_KEY="your-key"
uvx pangram-mcp

MCP client config

{
  "mcpServers": {
    "pangram": {
      "command": "uvx",
      "args": ["pangram-mcp"],
      "env": { "PANGRAM_API_KEY": "your-key" }
    }
  }
}

Configuration

Env var Required Default Purpose
PANGRAM_API_KEY yes Pangram Labs API key.
PANGRAM_API_BASE no https://text.api.pangram.com/v3 Endpoint override.
PANGRAM_TIMEOUT no 60 Request timeout (seconds).

Tool: analyze

Detect AI-generated text.

Parameter Type Description
text string Text to classify (required).
public_dashboard_link bool Request a public shareable Pangram dashboard link (default false; only for non-sensitive text).

The tool takes inline text only — not a file path. Reading files server-side would let a caller exfiltrate any file the process can read, bypassing the harness's permission-gated file tools. Read files with your own tools and pass the text.

Returns structured output: prediction, prediction_short, headline, fraction_ai / fraction_ai_assisted / fraction_human (0.0–1.0), num_ai_segments / num_ai_assisted_segments / num_human_segments, a windows array (per-segment label, ai_assistance_score, confidence, indices), and an optional dashboard_link.

Development

uv sync --extra dev
uv run pytest
uv run ruff check .
uv run mypy src

License

MIT — see LICENSE.

Release files for pangram-mcp 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pangram-mcp 0.1.4
File Size Uploaded
pangram_mcp-0.1.4.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pangram-mcp 0.1.4
File Interpreter ABI Platform
pangram_mcp-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 20.0 kB

Release files / pangram_mcp-0.1.4.tar.gz

Download URL pangram_mcp-0.1.4.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
82cabcaea686efaa672a26b6beb3b1e0673408936768841c93a247475b4dbda6
BLAKE2b-256 checksum
How to use checksums
9ff70b840122afb6e5d719a32f783fe36ad9405f177877134660d7160845426e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Release files / pangram_mcp-0.1.4-py3-none-any.whl

Download URL pangram_mcp-0.1.4-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce4b813417a2980f074eab752f5589697970fa48974b7f25f04e76f74be47724
BLAKE2b-256 checksum
How to use checksums
3f1408e039986ff9d02ee1c2e0d066482d1ac4c4356176e793789facbe498931
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page