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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pangram_mcp-0.1.4.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pangram_mcp-0.1.4-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pangram_mcp-0.1.4.tar.gz.

File metadata

  • Download URL: pangram_mcp-0.1.4.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pangram_mcp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 82cabcaea686efaa672a26b6beb3b1e0673408936768841c93a247475b4dbda6
MD5 fc335504b81a5687476994fab309ce2c
BLAKE2b-256 9ff70b840122afb6e5d719a32f783fe36ad9405f177877134660d7160845426e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pangram_mcp-0.1.4.tar.gz:

Publisher: release.yml on Consiliency/pangram-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pangram_mcp-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: pangram_mcp-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pangram_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ce4b813417a2980f074eab752f5589697970fa48974b7f25f04e76f74be47724
MD5 7d16944a6e7cbc1a0742d30cb991bed0
BLAKE2b-256 3f1408e039986ff9d02ee1c2e0d066482d1ac4c4356176e793789facbe498931

See more details on using hashes here.

Provenance

The following attestation bundles were made for pangram_mcp-0.1.4-py3-none-any.whl:

Publisher: release.yml on Consiliency/pangram-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page