Skip to content

[CI] (81b9a8c) typescript-sdk/stdio-server - #3837

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-81b9a8c-typescript-sdk-stdio-server
Closed

[CI] (81b9a8c) typescript-sdk/stdio-server#3837
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-81b9a8c-typescript-sdk-stdio-server

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: context-mill-pr
Trigger ID: 81b9a8c
App: typescript-sdk/stdio-server
App directory: apps/typescript-sdk/stdio-server
Workbench branch: wizard-ci-81b9a8c-typescript-sdk-stdio-server
Wizard branch: main
Context Mill branch: codex/mcp-modern-capture-wizard
PostHog (MCP) branch: master
Timestamp: 2026-09-03T21:16:19.596Z
Duration: 172.2s

YARA Scanner

✓ 17 tool calls scanned, 0 violations detected

No violations: ✓ 17 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown
Author

PR Evaluation Report

Summary

This PR instruments a minimal MCP stdio server (workbench-stdio-server) with PostHog analytics using the @posthog/mcp package and posthog-node. The instrument(server, posthog) wrapper is applied to the existing McpServer instance, automatically capturing MCP protocol events (, , etc.). Environment variables are used for configuration, and a SIGTERM shutdown handler ensures event flush.

Files changed Lines added Lines removed
4 +63 -2

Confidence score: 4/5 👍

  • No .env.example file is committed; env var documentation exists only in the report markdown, which is less discoverable for developers setting up the project. [MEDIUM]

File changes

Filename Score Description
src/index.ts 5/5 Adds PostHog Node client initialization with env var guards, instrument() call with captureModel: true, and SIGTERM shutdown handler. Clean and minimal.
package.json 5/5 Adds @posthog/mcp and posthog-node as dependencies with appropriate version ranges.
.gitignore 5/5 Adds .env to prevent committing secrets.
posthog-mcp-analytics-report.md 4/5 Documents setup, events captured, and manual steps. References a potentially hardcoded key placeholder phx_API_KEY_IS_HARDCODED.

App sanity check ✅

Criteria Result Description
App builds and runs Yes Valid TypeScript, correct imports, no missing dependencies
Preserves existing env vars & configs Yes Existing tools (echo, add) and main() function fully preserved
No syntax or type errors Yes All code is syntactically and semantically correct
Correct imports/exports Yes PostHog from posthog-node and instrument from @posthog/mcp are correct
Minimal, focused changes Yes Only PostHog-related additions; no unrelated modifications
Pre-existing issues None Base app is clean

Issues

  • No .env.example committed: The env vars POSTHOG_PROJECT_TOKEN and POSTHOG_HOST are documented in the report markdown file but there is no .env.example file for quick developer onboarding. The .env file exists locally (with a real key) but is gitignored. Adding a .env.example with placeholder values would be more conventional. [MEDIUM]

Other completed criteria

  • All changes are relevant to PostHog integration
  • Code quality matches existing codebase patterns (stderr writes, async/await, TypeScript conventions)
  • Build configuration is valid (package.json scripts and dependencies are correct)

PostHog implementation ✅

Criteria Result Description
PostHog SDKs installed Yes posthog-node@^5.51.6 and @posthog/mcp@^0.13.0 added to package.json dependencies
PostHog client initialized Yes new PostHog(token, { host, enableExceptionAutocapture: true }) followed by instrument(server, posthog, { captureModel: true }) — correct pattern for MCP server instrumentation
capture() Yes instrument() automatically captures , , , and events
identify() N/A Server-only MCP application
Error tracking Yes enableExceptionAutocapture: true on the PostHog client, and instrument() captures `` on tool errors
Reverse proxy N/A Server-only application using posthog-node

Issues

No issues found.

Other completed criteria

  • API key loaded from process.env.POSTHOG_PROJECT_TOKEN with runtime guard warning
  • Host loaded from process.env.POSTHOG_HOST with runtime guard warning
  • posthog.shutdown() called on SIGTERM to flush queued events before exit
  • captureModel: true enriches tool call events with the agent's self-reported model

PostHog insights and events ✅

Filename PostHog events Description
src/index.ts , , , instrument() automatically captures MCP protocol lifecycle events: client handshakes, tool listing, tool invocations (echo, add), and exceptions. With captureModel: true, tool calls include `` property.

Issues

No issues found.

Other completed criteria

  • Events represent real MCP protocol actions (tool calls, initialization handshakes)
  • Events enable product insights (tool usage frequency, error rates, model distribution)
  • Events are enriched with model metadata via captureModel: true
  • No PII in event properties
  • Event names follow PostHog's standard * naming convention

Reviewed by wizard workbench PR evaluator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants