Pangram MCP serverand Python AI tasks
qbash hosts a Pangram MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse.
Developers use qbash Tasks to write cloud-hosted Python functions that pair Pangram with models such as Claude and GPT.
MCP server
Build a Pangram MCP server
Give ChatGPT, Claude and your other AI tools access to Pangram through one server. You pick which Pangram tools it shares, and you can add other connectors, memory folders and Tasks to the same server.
How to set it up
- Connect Pangram on the qbash Connectors page.
- Create an MCP server and add the Pangram tools you want to share.
- Paste the server URL into your client. It connects with OAuth or an access token.
Python AI task
Write a Pangram task in Python
A qbash Task is a hosted Python function that calls Pangram and AI models.
Write an editor's note on a freelance draft
Send a draft from the task's inputs to Pangram and pass the labeled segments to an inline prompt, which quotes the passages flagged as AI-generated or AI-assisted.
check = qbash.integrations.pangram.detect_ai(
text=qbash.inputs.get("draft"),
max_wait_seconds=120,
)
if check["result"]:
note = qbash.ai.run_prompt(
slug="pangram-draft-review",
variables={"detection": check["result"]},
)
qbash.output(note)
else:
qbash.output(f"Pangram is still checking the draft. Pass task_id {check['task_id']} to get_detection().")
Sample detect_ai response
{
"status": "success",
"task_id": "6f1c2d9e-3b7a-4c2e-9a51-0d8e7f4b2a10",
"stage": "STAGE_SUCCESS",
"complete": true,
"result": {
"prediction_short": "Mixed",
"headline": "Mixed: AI and human writing",
"prediction": "We believe this text contains a mix of AI-generated and human-written passages.",
"fraction_ai": 0.42,
"fraction_ai_assisted": 0,
"fraction_human": 0.58,
"num_ai_segments": 1,
"num_ai_assisted_segments": 0,
"num_human_segments": 1,
"version": "4.0",
"text": "We moved our warehouse to Leeds in March and the first week was rough. Two pallets of returns went missing. In today's fast-paced logistics landscape, seamless inventory visibility empowers teams to unlock operational excellence.",
"windows": [
{
"text": "We moved our warehouse to Leeds in March and the first week was rough. Two pallets of returns went missing.",
"label": "Human Written",
"ai_assistance_score": 0.04,
"confidence": "High",
"start_index": 0,
"end_index": 107,
"word_count": 20,
"token_length": 26,
"is_humanized": false,
"humanizer_score": 0.02
},
{
"text": "In today's fast-paced logistics landscape, seamless inventory visibility empowers teams to unlock operational excellence.",
"label": "AI-Generated",
"ai_assistance_score": 0.97,
"confidence": "High",
"start_index": 108,
"end_index": 229,
"word_count": 14,
"token_length": 22,
"is_humanized": false,
"humanizer_score": 0.05
}
]
}
}
What the Pangram connector can do
- List the Pangram detection models this API key can use, in Pangram's order
- Check whether a text was written by AI, edited with AI or written by a person. Returns the share of each and a label for every segment. Pangram bills it per 100 words
- Read a detection task that detect_ai or detect_ai_with_dashboard_link returned before it finished
- Run detect_ai and publish the result as a Pangram dashboard page that anyone with the link can open
- Start a bulk AI detection job for many texts, billed 20% below detect_ai. Returns a bulk_id for get_bulk and list_bulk_results
- Check a bulk job's status and item counts, optionally waiting for it to finish
- Page through a bulk job's results: each item's detection result, and the items that failed
- Page through a bulk job's items with each one's stage and error, without the results
- Check a stored document, such as a PDF or Word file, for AI writing. Pangram reads the text out of the file
- Check a stored document for AI writing and publish the result as a Pangram dashboard page that anyone with the link can open
- Check a text against online sources for copied passages. Returns each copied passage with the source URL it matched
qbash Tasks: AI applications in Python
A Task is a Python function that calls Pangram, your other connectors and models such as Claude, GPT, Gemini and Grok. qbash hosts and runs it.
Run Tasks on a schedule or from your team's tools
- Deterministic where it counts Write the logic in Python and call a model only for the steps that need judgement, so the rest runs the same way every time.
- Version controlled Every save is a revision you can compare and roll back.
- Logged Each run records its inputs, output, errors and what started it.
- Shared credentials Connections belong to your organization, so a Task keeps working when its author is away.
Pangram MCP questions
What does a Pangram check cost?
Pangram bills detect_ai per 100 words against the API key’s credits. Bulk jobs started with submit_bulk are billed 20% below detect_ai.
Can the Pangram MCP server publish results?
Two tools can. detect_ai_with_dashboard_link and its file version publish the result as a Pangram dashboard page that anyone with the URL can open. Every other tool returns the result only to the caller.
Related productivity connectors
Build a Pangram task
Write it in Python with AI steps, and qbash hosts it with versions and run logs.
Build a Pangram MCP server
Pick the Pangram tools to share and connect ChatGPT, Claude or Grok Bot.