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.

Informações da origem

Repositório
MCPJam/inspector
Última atividade na origem
11 de outubro de 2026 às 07:23
Idioma detectado do SKILL.md
inglês
Estrelas
2.280
Forks
297

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
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.
Ver no GitHub