ctx
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., "@ctxstart a trace for investigating alert INC-123"
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.
ctx-mcp
Local MCP server for decision trace capture and deterministic explanations.
Requirements
Node.js 18+
Related MCP server: AgentTrace
Install
npm installRun (stdio MCP server)
npm run devArchitecture (high level)
flowchart LR
Client[MCP client] -->|stdio| Server[ctx MCP server]
Server --> Tools[Trace tools]
Tools --> Store[(Trace store)]
Server --> Resources[trace:// resources]
Store --> ResourcesUsage contract (agents)
You MUST call
trace.startwhen a user-requested task begins (once intent is clear).You MUST call
trace.finishwhen that task is completed, even if the conversation continues, to mark outcome/status for downstream analysis.Treat a "task" as a single user goal; if the user pivots to a new goal, start a new trace.
If a task is completed and the user continues with a new goal, start a new trace (optionally link the prior trace in metadata).
Core tools
trace.starttrace.add_nodetrace.add_edgetrace.attach_artifacttrace.finishtrace.querytrace.get_subgraphtrace.find_pathstrace.explain_decisiontrace.similaritytrace.risk_check
Example tool calls
{
"tool": "trace.start",
"input": {
"intent": "Investigate alert",
"tags": ["incident", "p1"],
"metadata": { "ticket": "INC-123" }
}
}{
"tool": "trace.add_node",
"input": {
"trace_id": "trace-uuid",
"type": "Decision",
"summary": "Roll back release",
"data": { "reason": "error rate spike" },
"confidence": 0.8
}
}{
"tool": "trace.add_edge",
"input": {
"trace_id": "trace-uuid",
"from_node_id": "decision-node-id",
"to_node_id": "action-node-id",
"relation_type": "causes"
}
}{
"tool": "trace.explain_decision",
"input": {
"trace_id": "trace-uuid",
"decision_node_id": "decision-node-id",
"depth": 4
}
}{
"tool": "trace.similarity",
"input": {
"decision_node_id": "decision-node-id",
"scope": "all",
"limit": 5
}
}{
"tool": "trace.risk_check",
"input": {
"decision_node_id": "decision-node-id",
"threshold": 0.6
}
}Resources
trace://{trace_id}trace://{trace_id}/timelinetrace://{trace_id}/graphtrace://{trace_id}/subgraph?center=...&depth=...&dir=...trace://{trace_id}/explain?decision=...&depth=...trace://search?text=...&trace_id=...&type=...trace://{trace_id}/similarity?decision=...&scope=...&limit=...&depth=...&max_traces=...trace://{trace_id}/risk?decision=...&scope=...&limit=...&depth=...&threshold=...&max_traces=...
MCP config example
{
"mcpServers": {
"ctx": {
"command": "npx",
"args": ["ctx-mcp"]
}
}
}Testing
npm testSeed a sample trace
npm run seedCLI examples
npm run risk-check -- decision-node-idnpm run similarity -- decision-node-idTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
111Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for AI access to Swagger by SmartBear.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that gives AI agents access to your application's OpenTelemetry traces for querying, analysis, and debugging.5162MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for tracing, logging, and debugging multi-agent systems by capturing sessions, spans, and events in a queryable trace tree.1MIT
- AlicenseBqualityCmaintenanceA local MCP server for managing engineering context across Components, Repos, Tasks, and Governance entities. It enables capturing reusable context and composing it per-task with typed relationships and cross-cutting guidelines.361MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for writing structured traces, spans, and decisions, enabling observability and EU AI Act traceability compliance for AI agent tasks.49MIT
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/mhingston/ctx'
If you have feedback or need assistance with the MCP directory API, please join our Discord server