Skip to main content

server-change

Rules for changes to the inspector's Hono server (mcpjam-inspector/server), including routes, services, logging, error reporting and the browserd daemon. Use before editing anything under mcpjam-inspector/server.

소스 정보

저장소
MCPJam/inspector
최근 소스 활동
2026년 10월 11일 07:23
감지된 SKILL.md 언어
영어
스타
2,290
포크
300

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
server-change
description
Rules for changes to the inspector's Hono server (mcpjam-inspector/server), including routes, services, logging, error reporting and the browserd daemon. Use before editing anything under mcpjam-inspector/server.
# Server change ## Logging and errors Never use `console.*` in `server/`. ```ts import { logger } from "@/utils/logger"; ``` - `logger.error` goes to Sentry and Axiom. Use it only for real failures in MCPJam's own code. - `logger.warn`, `logger.info` and `logger.debug` go to Axiom only. - Route catch sites call `reportRouteFailure` from `server/utils/route-error-report.ts`, not `logger.error`. Pass the hop that failed, so a user's broken MCP server does not page MCPJam: ```ts reportRouteFailure("[mcp/chat-v2] stream error", error, { source: "mcp.chat-v2.stream", hop: "user_server_hop", // or "mcpjam_internal" }); ``` Anything under `/api/mcp/*` that proxies to a user's server is `user_server_hop`. - Never log tokens, access links, API keys or request bodies that may hold them. Background: `mcpjam-inspector/docs/server-error-reporting.md`. ## Tests - Route tests: `server/routes/mcp/__tests__/`. Helpers in `server/routes/mcp/__tests__/helpers/` (`createTestApp()`, `createMockMcpClientManager()`, `postJson()`, `expectError()`). - Anything whose correctness depends on WorkOS behavior (refresh tokens, API key revocation, JWKS) uses the emulator suites (`*.emulator.test.ts`) and `server/test/support/workos-emulator.ts`. Do not stub `fetch` for those. Do not export `WORKOS_API_BASE_URL` in the shell. - Cover the happy path, validation errors, error handling and empty/null input. ```bash npm run test -w @mcpjam/inspector -- server/routes/<area> ``` ## browserd daemon `server/services/browserd/dist/` is checked in and is what ships. After changing anything under `server/services/browserd/daemon/`, or anything it imports (`protocol.ts`, the WebMCP launch flags): ```bash npm run bundle:browserd -w @mcpjam/inspector ``` Commit both files in `dist/`. `pretest` fails if the bundle is stale. ## Auth-sensitive areas Changes to `server/routes/workos-authkit.ts`, `server/services/authkit-jwt.ts`, `server/services/guest-token*.ts`, `server/services/api-keys-relay.ts` or `server/middleware/` need a PR description that states who can reach the code path before and after the change.
GitHub에서 보기