Agentic Observability MCP

io.github.mdfifty50-boop由 GitHub 帳號 mdfifty50-boop 發布v0.1.1更新於 Oct 24, 2026

Agent tracing, cost tracking, anomaly detection for LLM agents

發布方自己的服務:agentic.no

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理記錄代理動作、追蹤 token 用量與 LLM 成本、監控工具效能並標記異常。

可以做什麼
記錄代理動作、工具呼叫與決策,附帶中繼資料與時戳,用於追蹤與稽核。依每次 LLM 呼叫追蹤 token 用量,並依內建價格表自動計算成本。產生依模型、供應商、工具或工作階段分組的成本報告。彙整工作階段的成本、token、工具統計、錯誤數與時長。偵測成本暴增、錯誤率過高、延遲暴增、重複工具迴圈與 token 爆炸等異常。讀取價格表與可觀測性最佳實務等靜態資源。
適用情境
適合為代理迴圈加入埋點,不必自建遙測即可取得成本與效能資料;也適合在生產環境執行代理時,及早發現卡死迴圈、成本失控與工具效能下降。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node.js 18 或更新版本。不需要 API 金鑰或環境變數。儲存為記憶體實作,伺服器重新啟動後資料即遺失。
安裝前請注意
README 在免費層之外還列出付費層級(Starter、Pro、Enterprise),請確認是否適用。追蹤記錄可能包含決策理由與工具參數,應避免記錄敏感資料。所有記錄僅存於記憶體,重新啟動即消失。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Agentic Observability MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

agentic-observability-mcp

AI agent observability for MCP. Tracing, cost tracking, performance monitoring, anomaly detection, and audit trails — all via Model Context Protocol.

[npm version] [License: MIT]

Why This Exists

AI agents burn tokens, call tools, make decisions, and sometimes get stuck in loops. You need to know what they're doing, what it costs, and when something goes wrong. No existing MCP server provides unified agent observability. This one does.

Track every LLM call, every tool invocation, every decision — with automatic cost calculation and anomaly detection.

What It Does

Tracing

  • trace_agent_action — Log any agent action (tool calls, LLM requests, decisions, errors) with metadata and timestamps

Cost Tracking

  • track_token_usage — Track token usage per LLM call with automatic cost calculation from built-in pricing tables (Claude, GPT, Gemini, Mistral)
  • get_cost_report — Aggregate cost breakdown across sessions, grouped by model, provider, tool, or session

Performance Monitoring

  • log_tool_call — Log MCP tool calls with latency, success/failure, and error details
  • get_session_summary — Full session report: cost, tokens, tool stats, error count, model breakdown, duration

Anomaly Detection

  • detect_anomaly — Flag unusual patterns:
    • cost_spike — Session or single-call cost exceeds thresholds
    • error_rate — Tool failure rate above 30%
    • latency_spike — Tool calls exceeding 10s
    • loop_detection — Same tool called with same params 3+ times (agent stuck)
    • token_explosion — Single call or session using excessive tokens

Resources (Static Knowledge)

  • observability://pricing — Current LLM pricing table (per-token costs for all major models)
  • observability://best-practices — Agent observability best practices guide

Installation

Claude Desktop / Claude Code

Add to your MCP configuration (~/.claude/settings.json or project .mcp.json):

json
{  "mcpServers": {    "agent-observability": {      "command": "npx",      "args": ["agentic-observability-mcp"]    }  }}

Cursor

Add to .cursor/mcp.json:

json
{  "mcpServers": {    "agent-observability": {      "command": "npx",      "args": ["agentic-observability-mcp"]    }  }}

Windsurf / VS Code

Same pattern — add the server to your MCP configuration file.

Use Cases

For agent framework developers: Instrument your agent loop with track_token_usage and log_tool_call to get real-time cost and performance data without building your own telemetry.

For teams running agents in production: Use detect_anomaly to catch stuck agents (loop detection), runaway costs (cost spike), and degraded tool performance (latency spike) before they become incidents.

For cost optimization: Use get_cost_report grouped by model to identify which models are eating your budget. Switch expensive reasoning calls to cheaper models where quality allows.

For compliance and audit: Every trace_agent_action with type "decision" creates an audit record. Include reasoning in the description for full traceability.

Example

Agent: "Track that I just used 1,500 input tokens and 800 output tokens        with claude-sonnet-4 on Anthropic for session agent_run_001"
--> Returns:  {    "call_cost": 0.016500,    "running_session_total": 0.016500,    "model": "claude-sonnet-4",    "provider": "anthropic",    "pricing_used": { "input": 0.000003, "output": 0.000015 },    "model_breakdown": {      "claude-sonnet-4": {        "calls": 1,        "input_tokens": 1500,        "output_tokens": 800,        "cost": 0.016500      }    }  }
Agent: "Check session agent_run_001 for anomalies — cost spike and loop detection"
--> Returns:  {    "anomalies_found": 0,    "anomalies": [],    "checks_performed": ["cost_spike", "loop_detection"]  }

Built-in Pricing Table

Automatically calculates costs for these models (override with custom pricing if needed):

ProviderModels
AnthropicClaude Opus 4, Sonnet 4, Haiku 4, 3.5 Sonnet, 3.5 Haiku, 3 Opus
OpenAIGPT-4o, GPT-4o Mini, GPT-4 Turbo, o1, o1-mini, o3-mini
GoogleGemini 2.5 Pro, 2.5 Flash, 2.0 Flash, 1.5 Pro
MistralLarge, Medium, Small, Codestral
LocalZero cost (self-hosted models)

Pricing

TierPriceAgentsRetentionEvents/Month
Free$017 days10,000
Starter$59/month530 days100,000
Pro$299/month2590 days1,000,000
Enterprise$999/monthUnlimited1 yearUnlimited + SOC2 reporting

Architecture

v1 uses in-memory storage (Maps). Data is lost on server restart. The storage layer (src/storage.js) is structured for easy swap to Redis or Postgres in v2.

Requirements

  • Node.js 18+
  • No API keys needed
  • No external dependencies beyond MCP SDK and Zod

License

MIT

Keywords

mcp, mcp-server, observability, agent-tracing, cost-tracking, token-usage, ai-agent, performance-monitoring, audit-trail, model-context-protocol

來源:README.md,提交 ef24de7

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Agentic 整合