qmetrymcp: Instructions file for Claude Code

CLAUDE.md

qmetrymcp CLAUDE.md is an instructions file for Claude Code from salehrifai42/qmetrymcp. It costs 1,941 tokens per session, scanned B, original, MIT.

Repository instructions for a QMetry MCP server, including its Claude Code command, architecture notes, build commands, and testing guidance. QMetry is a test-management system, and MCP is a way for an assistant to call an external tool.

In plain words
What is it for?
Use it when developing or operating this TypeScript QMetry integration, running its unit tests, building it, or calling its live API endpoint.
Why use it?
It gives contributors the commands and constraints needed to build, test, run, and restart the server, including how to perform authenticated checks.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is salehrifai42/qmetrymcp's own configuration. It tells Claude Code how to work on qmetrymcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything qmetrymcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to salehrifai42/qmetrymcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/salehrifai42/qmetrymcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/salehrifai42/qmetrymcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for qmetrymcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/salehrifai42/qmetrymcp/claude-md/github.svg)](https://agentmods.dev/instructions/salehrifai42/qmetrymcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/salehrifai42/qmetrymcp/claude-md"><img src="https://agentmods.dev/badge/instructions/salehrifai42/qmetrymcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for qmetrymcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/salehrifai42/qmetrymcp/claude-md"><img src="https://agentmods.dev/badge/instructions/salehrifai42/qmetrymcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,941 This file is loaded in full into every session.
When invoked 1,941 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01941 $0.01941
Opus 5 $0.00971 $0.00971
Sonnet 5 $0.00388 $0.00388
Haiku 4.5 $0.00194 $0.00194

Measured 10d ago against content hash 0cdfbe95470c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

qmetrymcp CLAUDE.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

const res = await fetch('https://qtmcloud.qmetry.com/rest/api/latest/<path>', { method: 'POST',
CLAUDE.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Slash command

Run /qtm4j <task> in any Claude Code session in this repo to get a QMetry-aware assistant with all real field IDs pre-loaded (defined in .claude/commands/qtm4j.md).

Commands

npm run build      # compile TypeScript → dist/
npm start          # run compiled server (requires QTM4J_API_KEY env var)
npm run dev        # run directly from source via tsx (no build step)
npm test           # run unit tests (node:test via tsx) — no API key or network needed

Unit tests live in src/*.test.ts and run against the HTTP client's injectable transport seam (src/client.ts), so they need no API key or live network. For end-to-end checks against a real tenant, build and hit the endpoint directly:

QTM4J_API_KEY=<key> node -e "
const res = await fetch('https://qtmcloud.qmetry.com/rest/api/latest/<path>', {
  method: 'POST',
  headers: { apiKey: '<key>', 'Content-Type': 'application/json' },
  body: JSON.stringify(<body>)
});
console.log(await res.json());
"

After rebuilding, restart the MCP server in Claude Code:

claude mcp remove qtm4j && claude mcp add qtm4j \
  -e QTM4J_API_KEY=<key> -e QTM4J_REGION=US \
  -- node /absolute/path/to/qmetrymcp/dist/index.js

Architecture

Everything lives in a single file: src/index.ts.

Key patterns

Tool registration — uses a thin tool() wrapper around server.registerTool() to avoid the deprecated server.tool() overload. The SDK handles Zod → JSON Schema conversion internally (supports both Zod v3 and v4):

const tool = <Shape extends z.ZodRawShape>(name, description, inputSchema, callback) =>
  server.registerTool(name, { description, inputSchema }, callback as any);

HTTP — the client is a side-effect-free deep module in src/client.ts. createQtmClient({ apiKey, baseUrl, transport?, sleep?, maxAttempts? }) returns { fetch }, which prepends baseUrl, injects the apiKey header, auto-retries 429s with exponential back-off (default 3 attempts), and returns parsed JSON or throws QtmApiError with HTTP status + body. The network is an injectable Transport port (production = global fetch; tests = in-memory adapter); resolveBaseUrl(region) maps US/AU → base URL. src/index.ts binds one client and exposes qtmFetch(path, options?) as a thin alias, so all tool call sites are unchanged.

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 117 lines · 1,941 tokens per session scan B 0cdfbe95470c

Subscribe to this mod's changes

qmetrymcp CLAUDE.md is an instructions file published in the GitHub repository salehrifai42/qmetrymcp (0 stars, last pushed 3mo ago), licensed MIT. It adds 1,941 tokens to every session, about $0.0097 per session on Opus 5. A static security scan graded it B with 1 finding (sends data to an external url). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens