MCP server for Pangram Labs AI-generated-text detection
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pangram_mcp-0.1.1.tar.gz.
File metadata
- Download URL: pangram_mcp-0.1.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bcb2a497547cd69975a4754193423c0c023145c45c630669b49fed7f866c6c1
|
|
| MD5 |
5d345e85d2bf38084fbcc4cbd040249c
|
|
| BLAKE2b-256 |
d6c2fe322c16f89241687298776ec455b04987bd725dd89de7910a8c5752ddf6
|
Provenance
The following attestation bundles were made for pangram_mcp-0.1.1.tar.gz:
Publisher:
release.yml on Consiliency/pangram-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pangram_mcp-0.1.1.tar.gz -
Subject digest:
1bcb2a497547cd69975a4754193423c0c023145c45c630669b49fed7f866c6c1 - Sigstore transparency entry: 2220872605
- Sigstore integration time:
-
Permalink:
Consiliency/pangram-mcp@0d4536d366a7f0218ddea6cc728b9fbafc8f450e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Consiliency
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d4536d366a7f0218ddea6cc728b9fbafc8f450e -
Trigger Event:
push
-
Statement type:
File details
Details for the file pangram_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pangram_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c94f84fab724f9ccaed0415caac63ea3862c34fae109c48747de534d556d2d3
|
|
| MD5 |
46ef35ef45f192392d2189dc9cadb50b
|
|
| BLAKE2b-256 |
9bdea5519b2a2d1b2d5fa716e68ff01bd27462e553e3470fadfdb30678dabefe
|
Provenance
The following attestation bundles were made for pangram_mcp-0.1.1-py3-none-any.whl:
Publisher:
release.yml on Consiliency/pangram-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pangram_mcp-0.1.1-py3-none-any.whl -
Subject digest:
2c94f84fab724f9ccaed0415caac63ea3862c34fae109c48747de534d556d2d3 - Sigstore transparency entry: 2220873153
- Sigstore integration time:
-
Permalink:
Consiliency/pangram-mcp@0d4536d366a7f0218ddea6cc728b9fbafc8f450e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Consiliency
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0d4536d366a7f0218ddea6cc728b9fbafc8f450e -
Trigger Event:
push
-
Statement type: