Pisama MCP Server
OfficialProvides heuristic detectors for failure detection in LangGraph agents, identifying issues such as loop patterns, coordination problems, and task deviation.
Provides heuristic detectors for failure detection in n8n workflows, catching issues like infinite loops, coordination deadlocks, and state corruption.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Pisama MCP Serveranalyze trace.json for failures"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Pisama
Find and fix failures in AI agent systems. No LLM calls required.
Pisama ships heuristic detectors that apply across frameworks including n8n, LangGraph, Dify and OpenClaw, with per-platform gating (for example coordination runs only on multi-agent platforms). They run locally with zero LLM cost on the heuristic tier.
Install
pip install pisamaRelated MCP server: Agent Analytics MCP Server
Usage
from pisama import analyze
result = analyze("trace.json") # also accepts dicts and JSON strings
for issue in result.issues:
print(f"[{issue.type}] {issue.summary} (severity: {issue.severity})")
print(f" Fix: {issue.recommendation}")CLI
pisama analyze trace.json # Analyze a trace
pisama watch python my_agent.py # Watch a live agent (pip install "pisama[auto]")
pisama replay <trace-id> # Re-run detection on stored traces
pisama smoke-test --last 50 # Batch test recent traces
pisama detectors # List all core detectors
pisama mcp-server # Start MCP server (pip install pisama[mcp])MCP Server
Works in Cursor, Claude Desktop, and Windsurf. No API key is needed:
{
"mcpServers": {
"pisama": { "command": "pisama", "args": ["mcp-server"] }
}
}Optional extras
The base pisama install has zero-cost heuristic detection covered. Two extras
add opt-in functionality on top.
Auto-instrumentation: pisama[auto]
Zero-code tracing for LLM calls. init() patches supported clients (Anthropic,
OpenAI) so every call after it emits an OTEL trace Pisama can analyze, no
manual instrumentation needed.
pip install "pisama[auto]"import pisama.auto
pisama.auto.init(api_key="ps_...")
# All subsequent LLM calls are automatically traced
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(...) # traced automaticallyThis used to require the standalone pisama-auto package. That package still
works and stays fully supported for existing installs; pisama[auto] is the
same code, folded into the base package so there is one less dependency to
track. New projects should install it this way.
Agent hooks and tools: pisama[agents]
Real-time hooks, tools, and self-check utilities for agent runtimes (built for the Claude Agent SDK), wired to Pisama's detection infrastructure for in-loop failure prevention rather than after-the-fact analysis.
pip install "pisama[agents]"from pisama.agents import pre_tool_use_hook, post_tool_use_hook
agent.hooks.pre_tool_use = pre_tool_use_hook
agent.hooks.post_tool_use = post_tool_use_hookActive self-check is available the same way:
from pisama.agents import check
result = await check(
output="The server is healthy based on the metrics.",
context={"query": "Is auth-service down?", "sources": [...]},
)
if not result["passed"]:
... # revise output based on result["issues"]This used to require the standalone pisama-agent-sdk package. That package
still works and stays fully supported for existing installs; pisama[agents]
is the recommended path for new projects, one package instead of two.
Detectors
Core detectors, gated per platform (n8n, LangGraph, Dify, OpenClaw and others). A representative selection:
Detector | What It Catches |
| Infinite loops, retry storms, stuck patterns |
| Deadlocked handoffs, message storms |
| Factual errors, fabricated tool results |
| Prompt injection, jailbreak attempts |
| State corruption, type drift |
| Persona drift, role confusion |
| Task deviation, goal drift |
| Context neglect, ignored instructions |
| Output vs. requirement mismatch |
| Inter-agent message breakdown |
| Poor task breakdown, circular dependencies |
| Unreachable nodes, missing error handling |
| Premature completion, unfinished work |
| Suppressed findings, hidden errors |
| Metric plateau, regression, thrashing |
| Context window exhaustion |
| Silent error propagation across steps |
| Fabricated citations and source misattribution |
| Inputs misrouted to the wrong specialist agent |
| MCP tool-communication failures |
Links
License
MIT
Source boundary
This repository is the public source for the MIT-licensed pisama Python
package. It does not contain the Pisama Cloud backend, dashboard, calibration
data, managed detection tiers, or paid automation.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceAnalyzes AI agent traces to diagnose failures, score performance, and provide actionable fixes using tools like judge_trace and trace_breakdown.32MIT
- Alicense-qualityDmaintenanceTracks and analyzes AI agent tool calls with event logging, dashboard, per-tool and per-agent analytics, and error monitoring.MIT
- FlicenseAqualityBmaintenanceEnables AI agents to investigate Splunk exports or live queries using deterministic detectors and an iterative analysis loop, all running locally without data leaving the machine.7
- Alicense-qualityBmaintenanceAgent trace diff and prompt regression detection — compares two agent runs to find exactly where reasoning diverged.MIT
Related MCP Connectors
Find your AI agent's likely failure mode, get runtime settings, and clarify ambiguous prompts.
The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pisama-AI/pisama-python'
If you have feedback or need assistance with the MCP directory API, please join our Discord server