mcp-context-inspector
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HOST | No | Interface to bind. Defaults to 127.0.0.1; set to 0.0.0.0 inside a container. | |
| PORT | No | TCP port the server binds. Defaults to 8787; set to 8080 to match EXPOSE. | |
| AWS_REGION | No | AWS region for DynamoDB (required if STORAGE_BACKEND is 'dynamodb'). | |
| METRICS_TABLE | No | DynamoDB table name for metrics storage (required if STORAGE_BACKEND is 'dynamodb'). | |
| MCP_AUTH_TOKEN | Yes | Bearer token the MCP server accepts on the /mcp endpoint (Authorization: Bearer <token>). Required to authenticate; the server treats any configured value as the owner token. | |
| STORAGE_BACKEND | No | Storage backend to use. Options: 'sqlite' (default) or 'dynamodb'. | sqlite |
| MCP_DISABLE_DNS_REBINDING_PROTECTION | No | Build-sandbox only: set to 1 to disable MCP DNS-rebinding Host-header protection so a container-internal caller is not rejected with 421. Leave unset in real deployments. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_session_metricsA | Full metrics for ONE recorded session: metadata plus per-prompt tokens, latency, and cost. Use when you have a session_id and need exact provider usage numbers for that session. For the block-by-block token composition of the context window use get_context_timeline instead; for a cost total across many sessions use get_cost_estimate. session_id: the opaque, case-sensitive id returned by record_session or listed by get_recent_sessions. Returns {"error": "session not found"} if the id is unknown or not owned by the caller (the two are deliberately indistinguishable). |
| get_token_breakdownA | Per-turn input/output token and latency breakdown for one session, in turn order. Use to see how token usage grew turn-by-turn within a session; use get_session_metrics for session totals. session_id: id from get_recent_sessions / record_session. Returns [] for an unknown or non-owned session. |
| get_tool_metricsA | Tool-call counts grouped by status (ok / error), for one session or aggregated. Use for a quick success/failure summary; use get_agent_trace for the ordered call list. Non-owners only ever see their own sessions; the owner token sees everyone's. session_id: optional. Omit for the aggregate across all your sessions; pass an id for just that session. |
| get_agent_traceA | The ordered sequence of tool calls for one session -- each entry {name, args, status}. Use to replay what the agent actually did, in execution order; use get_tool_metrics for aggregate counts. session_id: id from get_recent_sessions / record_session. Returns [] for an unknown or non-owned session. |
| get_cost_estimateA | Estimated USD cost as a float. Pass session_id for one session's cost, or period_seconds for the summed cost of your sessions in the last N seconds. Give exactly one; non-owners are scoped to their own sessions. These are estimates from token counts and a static price table, not billed amounts. session_id: optional session id. period_seconds: optional lookback window in seconds (e.g. 86400 for the last day). Returns 0.0 for an unknown or non-owned session_id, and for a period with no matching sessions. |
| get_recent_sessionsA | List recent sessions, newest first: [{session_id, prompt, model_id, created_at, ...}]. Call this first to discover session_ids for the other get_* tools. Non-owners see only their own sessions; the owner token sees all. limit: max rows to return (default 10), newest first. |
| get_context_timelineA | Ordered, categorized breakdown of everything that entered ONE session's context window. Each block (system prompt, tool specs, injected context, user turns, reasoning, tool calls/results, final answer) is marked user-visible vs invisible overhead, with cumulative character-based token estimates against the model's real window size. Use for context-window composition analysis; use get_session_metrics for exact provider token usage. The estimates here are character-based, not exact Bedrock counts. session_id: id from get_recent_sessions / record_session. Returns [] for an unknown or non-owned session, or one recorded without the optional context_blocks field. |
| record_sessionA | Append ONE agent execution's metrics to this server's store; returns the new session_id. This is how a remote agent gets its own runs into the server, rather than only being able to query what the server owner recorded locally. Attributed to the connected identity: your Google account if you signed in via /auth/login, or owner=None for the owner token. NOT idempotent -- each call mints a new session_id. Never updates or deletes an existing session; the get_* tools read what this writes. prompt: the user prompt that started the run. model_id: the provider model identifier, e.g. "anthropic.claude-3-5-sonnet-20241022-v2:0". loop_result: the run's token / latency / trace payload. Required keys: input_tokens (int), output_tokens (int), total_tokens (int), latency_ms (float), turns (list). Optional: trace (list), context_blocks (list -- omit if you don't have per-block context data; get_context_timeline needs it).
Example loop_result: |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/sohaibsohail98/mcp-context-inspector'
If you have feedback or need assistance with the MCP directory API, please join our Discord server