mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
Sweeps the last holdouts my code-extension pass missed: 28 doc/script files (READMEs, USAGE, CONTRIBUTING, insights-xcode.sh) and their host URLs -> insights.hanzo.ai. Guard now covers .md and .sh too. CHANGELOG.md is deliberately EXCLUDED from both the sweep and the guard: published release notes are immutable history — rewriting them would be dishonest about what shipped when. Verified: zero posthog across code+docs+scripts, zero posthog-named files.
829 B
829 B
@insights/mcp
Insights SDK for instrumenting Model Context Protocol (MCP) servers. Tracks tool calls, tool listing, initialization, user intent, identity, and errors — without changing your tool handler logic.
Install
npm install @insights/mcp
Usage
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
import { track } from '@insights/mcp'
const server = new McpServer({ name: 'my-mcp-server', version: '1.0.0' })
track(server, {
apiKey: 'phc_your_project_api_key',
})
// Register your tools as usual — `track()` instruments them automatically.
See the documentation in docs/ for the full configuration reference, including identify, intentFallback, redactSensitiveInformation, eventProperties, enableConversationId, and reportMissing.