단 한 줄의 코드로 MCP server에 분석, 세션 리플레이, OpenTelemetry 호환 로그 및 트레이스 내보내기 기능을 추가합니다.
다른 이름 agentcathq/agentcat-python-sdk
- 스타
- 53
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 3일
- 라이선스
- MIT
AgentCat MCP란?
AgentCat은(는) MCP server입니다. 단 한 줄의 코드로 MCP server에 분석, 세션 리플레이, OpenTelemetry 호환 로그 및 트레이스 내보내기 기능을 추가합니다.
프로젝트 README에서 생성된 요약
AgentCat MCP server 정보
AgentCat은 MCP server, Claude Connectors 또는 ChatGPT Plugins를 구축하는 개발자가 AI 에이전트와 도구 간의 상호작용을 모니터링할 수 있도록 지원합니다. 이 Python SDK는 기존 서버 코드에 단 한 줄만 추가하여 사용자 의도와 행동 패턴을 캡처하는 경량 미들웨어 역할을 합니다. 이를 통해 에이전트가 왜 특정 도구를 사용하는지, 작업 중 어디에서 어려움을 겪는지 이해할 수 있습니다.
사용자는 pip를 통해 패키지를 설치하여 로컬 Python 환경에서 이를 구현할 수 있습니다. SDK가 작동하려면 AgentCat 계정의 프로젝트 ID가 필요합니다. 이 SDK는 session_id 및 context와 같은 특정 파라미터를 도구 스키마에 주입하여 상태가 없는(stateless) 전송 방식에서도 추적을 유지합니다. 세션 리플레이 외에도 로그, 트레이스, 에러를 Datadog, Sentry 또는 OpenTelemetry 호환 collector와 같은 외부 관측성 플랫폼으로 전달하는 기능을 제공합니다.
AgentCat의 차별점은 에이전트가 찾으려 했던 기능이 무엇인지 보고하도록 요청하는 특화된 get_more_tools 도구를 통해 누락된 기능을 파악할 수 있다는 점입니다. 또한 사용자 정의 사용자 식별 및 데이터 마스킹 hook과 같은 고급 기능을 지원하여 민감한 정보가 대시보드로 전송되기 전에 안전하게 처리되도록 보장합니다.
활용 사례
- 1에이전트 혼란 디버깅특정 API 구현 방식 때문에 LLM이 정확히 어느 지점에서 막히거나 혼란을 느끼는지 식별합니다.
- 2누락된 기능 발견AI 클라이언트가 찾으려 시도했지만 찾지 못한 도구나 기능이 무엇인지 보고하도록 요청합니다.
- 3관측성 데이터 중앙 집중화MCP server 텔레메트리를 Datadog 또는 Sentry와 같은 기존 모니터링 스택으로 직접 전달합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능agentcathq/agentcat-python-sdk is public and reachablegithub.com/agentcathq/agentcat-python-sdk ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-03github.com/agentcathq/agentcat-python-sdk ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기[!NOTE] AgentCat v2 introduces compatibility with the MCP Protocol "Stateless" 2026-07-28 Update and the coinciding MCP Python SDK v2 release that puts it into effect. The stateless transition has a massive impact on analytics, as sessions were a built-in concept tying related tool calls together. AgentCat has now migrated its session tracking under guidance of the MCP core team's recommendations of using explicit handles (SEP-2567).
As a result AgentCat now injects a
session_idon every MCP tool call to associate them under the same task umbrella. Our evals show much higher tool correlation accuracy at the cost of < 1% additional context pollution.
[!IMPORTANT] MCPcat is now AgentCat 🐱 — same team, same product, new name. This package was previously published as
mcpcat, which keeps working forever, but new features land here. Upgrading takes a few minutes — see the migration guide.
AgentCat is an analytics platform for MCP server owners 🐱. It captures user intentions and behavior patterns to help you understand what AI users actually need from your tools — eliminating guesswork and accelerating product development all with one-line of code.
This SDK also provides a free and simple way to forward telemetry like logs, traces, and errors to any Open Telemetry collector or popular tools like Datadog and Sentry.
# Basic installation (includes official MCP SDK)
pip install agentcat
# With community FastMCP support
pip install "agentcat[community]"
To learn more about us, check us out here. For detailed guides visit our documentation.
Why use AgentCat? 🤔
AgentCat helps builders of MCP servers, Claude Connectors, and ChatGPT Plugins learn how to improve them by capturing any agents goals and detecting when they get stuck.
Use AgentCat for:
- Agent session replay 🎬. Follow alongside your users and their agents to understand why they're using your MCP servers, what functionality you're missing, and what clients they're coming from.
- Trace debugging 🔍. See where your users are getting stuck, track and find when LLMs get confused by your API, and debug sessions across all deployments of your MCP server.
- Existing platform support 📊. Get logging and tracing out of the box for your existing observability platforms (OpenTelemetry, Datadog, Sentry) — eliminating the tedious work of implementing telemetry yourself.
How it works
AgentCat works as a lightweight middleware inside your MCP server. When you call track(), it seamlessly modifies your registered tool schemas in place, following the MCP core team's explicit handles (SEP-2567) guidelines. Concretely, AgentCat adds the following to your server:
session_id— a parameter injected into each tool's input schema. Agents echo it back on every call, letting AgentCat group related tool calls into one task even over stateless transports. Values are validated: anything AgentCat did not issue is rejected rather than adopted, and the agent is told to re-send the ID it was given.agent_id(off by default) — enabled withenable_agent_tracking=True. Each agent self-generates its own ID, keeping parallel agents working the same task individually attributable.context— a parameter asking the agent to explain, in one sentence, why it is making this call. This is where intent data comes from.get_more_tools— an additional tool, prompt-engineered so that agents readily report the features and tools they looked for but couldn't find — surfacing your missing functionality directly from real usage.
Injected parameters are stripped from arguments before your tool handler runs, so your code never sees them. For tools that declare an output schema, issued IDs are also mirrored into structuredContent (as _mcp_instructions), so clients that only read structured results still receive them.
Getting Started
To get started with AgentCat, first create an account and obtain your project ID by signing up at agentcat.com. For detailed setup instructions visit our documentation.
Once you have your project ID, integrate AgentCat into your MCP server:
import agentcat
from mcp.server.mcpserver import MCPServer
server = MCPServer("echo-mcp", version="0.1.0")
@server.tool(description="Echo a message")
def echo(msg: str) -> str:
return msg
# Track the server with AgentCat
agentcat.track(server, "proj_0000000")
Stateless servers built on MCP 2026-07-28 create a fresh server instance per worker or per tenant, serving each request with stateless_http=True. Call track() inside the factory so every instance is tracked:
import agentcat
from mcp.server.mcpserver import MCPServer
def create_server() -> MCPServer:
server = MCPServer("echo-mcp", version="0.1.0")
# register tools...
agentcat.track(server, "proj_0000000")
return server
server = create_server()
server.run(transport="streamable-http", stateless_http=True)
Calling track() per instance is cheap — the event queue, telemetry exporters, and diagnostics are initialized once and shared across instances.
Identifying users
We strongly encourage identifying every actor. If you can't resolve a real user, return a stable anonymized ID instead — for example, a hash of the auth token or API key — so that all events from the same end user still roll up to one actor in your dashboard rather than scattering into anonymous one-off sessions.
identify (like every AgentCat hook) may be sync or async and runs on every tool call, ahead of your handler: a hook that fails outright — or returns anything that is not a UserIdentity — costs analytics data for that event, never the call itself. Every hook runs under a 5-second cap, and a slow lookup delays that call's response — so keep it cheap, and add your own caching if it does a database or API lookup.
The callback receives the tool call's request params (.name and .arguments, a plain dict) and the request context the SDK hands to handlers — the same (request, extra) shape on every supported server flavor. On HTTP transports, identity signals like headers and auth live on extra.request:
from agentcat import AgentCatOptions, UserIdentity
async def identify(request, extra):
http = getattr(extra, "request", None) # incoming HTTP request, when present
token = http.headers.get("authorization") if http else None
org_id = http.headers.get("x-org-id") if http else None
user = await myapi.get_user(token)
if not user:
return None
return UserIdentity(user_id=user.id, user_name=user.name, user_data={"org_id": org_id})
agentcat.track(server, "proj_0000000", AgentCatOptions(identify=identify))
Redacting sensitive data
AgentCat redacts all data sent to its servers and encrypts at rest, but for additional security, it offers a hook to do your own redaction on all text data returned back to our servers.
from agentcat import AgentCatOptions
async def redact(text: str) -> str:
return await redactor(text)
# or a plain sync function — both are supported
agentcat.track(server, "proj_0000000", AgentCatOptions(redact_sensitive_information=redact))
For redaction decisions that need more context than a single string — such as which tool was called or what type of event is being published — use the event-level redact_event hook. It receives the full event and returns a modified event, or None to drop the event entirely. It may be sync or async, runs before redact_sensitive_information (so it sees raw values), and can be combined with it.
Mutate the event you're given and return it, as in the example below — don't construct or return a different Event. The return value replaces the event's fields wholesale, not as a diff against the original, so returning a partial or freshly-built event will silently drop every field you didn't set.
from agentcat import AgentCatOptions
def redact_event(event):
# Drop events from tools that handle secrets entirely
if event.resource_name == "get_credentials":
return None
# Strip response payloads from a specific tool
if event.resource_name == "export_report":
event.response = None
return event
agentcat.track(server, "proj_0000000", AgentCatOptions(redact_event=redact_event))
Vendor Support
AgentCat seamlessly integrates with your existing observability stack, providing automatic logging and tracing without the tedious setup typically required. Export telemetry data to multiple platforms simultaneously:
import os
from agentcat import AgentCatOptions
agentcat.track(
server,
"proj_0000", # Project ID can optionally be None if you just want to forward telemetry
AgentCatOptions(
exporters={
"otlp": {
"type": "otlp",
"endpoint": "http://localhost:4318/v1/traces",
},
"datadog": {
"type": "datadog",
"api_key": os.environ["DD_API_KEY"],
"site": "datadoghq.com",
"service": "my-mcp-server",
},
"sentry": {
"type": "sentry",
"dsn": os.environ["SENTRY_DSN"],
"environment": "production",
},
}
),
)
Learn more about our free and open source telemetry integrations.
Internal diagnostics
To help us catch and fix broken installs, the SDK sends AgentCat a small, anonymized
signal when setup or runtime errors occur — never your tool calls, your responses,
or anything about your users. Records carry only operational metadata, such as your
project ID (or an anonymous install ID when none is set). Your local ~/agentcat.log
is unchanged.
Diagnostics are on by default and can be turned off completely with either:
track(server, project_id, AgentCatOptions(disable_diagnostics=True)), or- the
DISABLE_DIAGNOSTICSenvironment variable.
Free for open source
AgentCat is free for qualified open source projects. We believe in supporting the ecosystem that makes MCP possible. If you maintain an open source MCP server, you can access our full analytics platform at no cost.
How to apply: Email hi@agentcat.com with your repository link
Already using AgentCat? We'll upgrade your account immediately.
Community Cats 🐱
Meet the cats behind AgentCat! Add your cat to our community by submitting a PR with your cat's photo in the docs/cats/ directory.
Want to add your cat? Create a PR adding your cat's photo to docs/cats/ and update this section!
AgentCat MCP 질문
AgentCat이 MCP server를 위해 제공하는 기능은 무엇인가요?
사용자의 의도와 행동 패턴을 캡처하여 에이전트가 도구를 어떻게 사용하는지 확인할 수 있는 분석 플랫폼입니다. 또한 로그, 트레이스, 에러를 관측성 플랫폼으로 전달합니다.
AgentCat Python SDK는 어떻게 설치하나요?
pip로 설치할 수 있습니다. 기본 패키지에는 공식 MCP SDK가 포함되어 있으며, extra를 추가하면 FastMCP 지원 기능이 포함됩니다.
AgentCat은 어떤 관측성 플랫폼으로 데이터를 내보낼 수 있나요?
모든 OTLP collector와 Datadog, Sentry를 지원하며, 여러 exporter를 동시에 설정할 수 있습니다.
데이터 전송 전에 민감한 정보를 마스킹할 수 있나요?
네, redact_sensitive_information hook을 통해 모든 텍스트 데이터를 변환할 수 있으며, redact_event를 사용하여 이벤트 전체를 수정하거나 삭제할 수 있습니다.
SDK를 사용하려면 프로젝트 ID가 필요한가요?
프로젝트 ID는 서버를 AgentCat 대시보드에 연결하는 역할을 합니다. 텔레메트리 전달 기능만 사용하려는 경우 None을 전달할 수 있습니다.