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 集成