mcp-server-tester: Instructions file for Codex

AGENTS.md

mcp-server-tester AGENTS.md is an instructions file for Codex, OpenCode from gleanwork/mcp-server-tester. It costs 7,248 tokens per session, scanned A, original, MIT.

Repository instructions for a TypeScript testing framework built with Playwright, a tool for automating web browsers, to test MCP servers. MCP is a standard way for AI tools to connect to external services.

In plain words
What is it for?
Use them when changing MCP client code, browser-based integration tests, evaluation datasets or the test-reporting interface.
Why use it?
They collect the commands and project structure needed to build, test, type-check and lint the framework without having to discover them manually.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions Claude Code; mentions AGENTS.md.

This is gleanwork/mcp-server-tester's own configuration. It tells Codex and OpenCode how to work on mcp-server-tester 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 mcp-server-tester configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import type { AuthType, GraderType } from '../types/index.js';.

Reuse

Borrowing it

Nothing to install: this file belongs to gleanwork/mcp-server-tester. 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/gleanwork/mcp-server-tester/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/gleanwork/mcp-server-tester

Made for: Codex, OpenCode.

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 mcp-server-tester AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gleanwork/mcp-server-tester/agents-md/github.svg)](https://agentmods.dev/instructions/gleanwork/mcp-server-tester/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/gleanwork/mcp-server-tester/agents-md"><img src="https://agentmods.dev/badge/instructions/gleanwork/mcp-server-tester/agents-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 mcp-server-tester AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gleanwork/mcp-server-tester/agents-md"><img src="https://agentmods.dev/badge/instructions/gleanwork/mcp-server-tester/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,248 This file is loaded in full into every session.
When invoked 7,248 The same file — it is already loaded in full.
Security scan A 0 findings. 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.07248 $0.07248
Opus 5.5 $0.02899 $0.02899
Sonnet 5.5 $0.01450 $0.01450
Haiku 4.5 $0.00725 $0.00725

Measured 8d ago against content hash 31427966ef71, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp-server-tester AGENTS.md scanned grade A with 0 findings 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 8d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 402 lines

How it starts

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

AGENTS.md

This file provides guidance to coding agents when working with code in this repository.

Project Overview

@gleanwork/mcp-server-tester is a Playwright-based testing and evaluation framework for Model Context Protocol (MCP) servers. It provides Playwright fixtures for automated testing and data-driven eval datasets with optional LLM-as-a-judge scoring.

Common Commands

# Build (includes UI reporter build)
npm run build

# Unit tests (Vitest)
npm test                    # Run all unit tests
npm run test:watch          # Watch mode
npm test -- src/mcp/clientFactory.test.ts  # Run single test file
npm test -- -t "creates client"            # Run tests matching pattern

# Integration tests (Playwright)
npm run test:playwright

# Code quality
npm run typecheck           # TypeScript validation
npm run lint                # ESLint
npm run lint:fix            # Auto-fix lint issues
npm run format              # Prettier formatting
npm run format:check        # Check formatting

Architecture

Core Modules (src/)

  • config/ - MCPConfig types and Zod validation for stdio/HTTP transports, protocolMatrix()
  • mcp/ - Client factory (createMCPClientForConfig), fixtures (MCPFixtureApi), protocol selection (protocol.ts), wire tap, and response normalization. Built on the MCP TypeScript SDK v2 (@modelcontextprotocol/client). mcp/connection.ts is the one record of what MST knows about a client it created (requested protocol, connection target for raw probes, wire tap, owned undici agent); read it with connectionOf(client), and add new per-connection facts there rather than in a new side table
  • skills/ - Agent Skills over MCP (SEP-2640): wire schemas, entry validation, and a skills client (the SDK has no skills API yet)
  • auth/ - OAuth 2.1 with PKCE (PlaywrightOAuthClientProvider) and static token utilities. auth/grants/ holds connectors and refresh grants: connector lookup and grant grouping (connectors.ts), sign-in, refresh and revocation (grants.ts), and the built-in credential store mst/credential-store/local (localStore.ts). A run stages and renews connector tokens in evals/connectorServers.ts
  • assertions/ - Unified assertion architecture (see below)
  • evals/ - Dataset types, loader, and runner (uses validators internally). evals/caseExecution.ts is the only place a case runs: every path (the mst client on a Playwright test's connection, an eval's client, a custom executeCase) returns a typed CaseExecution (completed or failed), and the runner reads its fields instead of inspecting response. caseExecution.golden.test.ts pins the resulting EvalCaseResult for every path. evals/grading.ts grades a case's assertions block: it decides once whether the evidence can support tool-call assertions (toolEvidenceGap), builds the toolCallTrace view, resolves judge settings (including the eval config's judges), then calls the validators. Desktop clients (Cowork, ChatGPT) run batches through evals/desktopBatch.ts (lease, per-case reset policy, failure diagnosis before a reset, client-native session ledger, redaction, cleanup) and share one MCP readiness rule (isMcpServerReady in evals/mcpReadiness.ts); a new desktop client supplies only prepare, one case, reset, an optional diagnose and dispose. macOS Swift controllers build and run through evals/nativeHelper.ts, which owns their environment policy
  • llm/ - resolveLLMEndpoint(): the one place MST's own LLM calls (SDK client, judges) get their base URL and credential, including gateway bearer tokens and MST_LLM_AUTH_COMMAND. New LLM consumers resolve through it rather than reading *_API_KEY themselves. See docs/llm-gateways.md
  • evals/runFormat.ts - The mst.run/v1 run directory: run IDs, paths, the writer and the Zod schemas schema/run/v1/ is generated from (npm run schema:generate)
  • judge/ - LLM-as-a-judge. llmJudge.ts is the one core (prompt, verdict parser, output guard); each provider in JUDGE_PROVIDER_KINDS (anthropic, vertex-anthropic, anthropic-agent-sdk, openai, google) is a completion adapter mapped in judgeClient.ts. judge/agentic/ holds agentic judges (agenticJudge, agenticPairwiseJudge), which run an agent over a workspace of the trial's evidence on the claude-agent or codex runtime, and stagedPairwiseJudge (stagedJudge.ts), which runs a staged judge: a serialized bundle of files, prepare programs and agent stages. builtinJudges.ts has the built-in rubric judge
  • proxy/ - The dry-run proxy (dryRunProxyServer()), which a connector's launch puts in front of a vendor server to let reads through and block writes, and simulated writes (simulatedWrites.ts), which answer blocked writes with a success reply when an eval config sets simulateWrites
  • evals/environments/ - Where trials are collected (ADR 0004): the env kind's built-ins local (builtinEnvironments.ts) and docker (docker.ts: containers from the Linux Cowork image in docker/cowork-linux/, one per Docker context at a time, over the Docker CLI; dockerContainers.ts removes them when MST exits or its process is gone; mst env setup docker builds the image), the channel helper machineEnvironment (channel.ts), the mst.shard/v1 messages (protocol.ts), the coordinator's sharded collect (shardedCollect.ts), the worker behind the hidden mst collect (collect.ts), and the run-wide limits (limiter.ts)
  • plugins/ - ESLint-style plugins: the Plugin shape and validation (plugin.ts), the process-wide extension table keyed by <namespace>/<kind>/<name> (names parsed and kind-checked in plugin.ts and extensions.ts), where each kind's lookup (next to its built-ins) adds them under bare names (extensions.ts), and the loader (loadPlugins.ts). evals/evalPlugins.ts loads an eval's plugins and checks it only references namespaces it loads. Domain terms are in CONTEXT.md; decisions in docs/adr/
  • spec/ - Conformance check registry (checks/core.ts, checks/modern.ts, checks/skills.ts), raw probe channel, and cross-era checks
  • reporters/ - The run report UI (React) and the MCP Playwright reporter, which reports evals only: each Playwright run's eval results are a mst.run/v1 run (a variant per project) with the same report mst run writes (evals/runReport.ts). Tests and conformance checks are in Playwright's own reporter. reporters/channel.ts owns every attachment the reporter reads (names, payload types, read-side Zod schemas). Write with attachReporterData(testInfo, { kind, data }), never testInfo.attach('mcp-...') directly
  • cli/ - The CLI, shipped as mst and mcp-server-tester (the same binary): init, generate, login, token, auth, datasets, judges, run, grade, batch, cowork, open, and the hidden collect that a worker runs

Read the full file on GitHub · 402 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. 8d ago Changed · +1 lines · +111 tokens per session 31427966ef71
  2. 10d ago Changed · -16 tokens per session 7467e8be15b2
  3. 13d ago Changed · +26 tokens per session b855b022e25e
  4. 14d ago Changed · +53 lines · +535 tokens per session 59b2cfdd8835
  5. 16d ago Changed · +1 lines · +174 tokens per session b9f756d98aa2
  6. 17d ago Changed · +3 lines · +473 tokens per session 9257d78e76d4
  7. 18d ago Changed · +6 tokens per session 95291147f3d7
  8. 19d ago Changed · +1 lines · +145 tokens per session e8acef7e31aa
  9. 20d ago Changed · -8 lines · +59 tokens per session d96b390b75c1
  10. 21d ago First seen · 351 lines · 5,735 tokens per session scan A dacb8b85691e

Subscribe to this mod's changes

mcp-server-tester AGENTS.md is an instructions file published in the GitHub repository gleanwork/mcp-server-tester (19 stars, last pushed yesterday), licensed MIT. It adds 7,248 tokens to every session, about $0.0290 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

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 · 9,715 tokens

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,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens