write-mcp-test

write-mcp-test is a skill for Claude Code, Codex from gleanwork/mcp-server-tester. It costs 99 tokens per session (3,458 once invoked), scanned A, original, MIT.

A guide for generating Playwright tests for MCP server tools. MCP is a protocol for connecting applications to tools, and Playwright is a framework for automated browser and integration tests.

In plain words
What is it for?
Use it when writing tests for MCP tools. It helps check dependencies and configuration, connect over a subprocess or HTTP, identify available tools, and create direct-mode Playwright test files.
Why use it?
It ensures the tests use the required MCP test fixtures and a working connection to the server. It also makes the tested tools and transport method explicit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import checks from '../tool-checks.json' with { type: 'json' };.

Good fit Use it when writing tests for MCP tools. It helps check dependencies and configuration, connect over a subprocess or HTTP, identify available tools, and create direct-mode Playwright test files.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/gleanwork/mcp-server-tester
agentmods
npx agentmods add skills/gleanwork/mcp-server-tester/write-mcp-test

Made for: Claude Code, Codex.

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 write-mcp-test

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/gleanwork/mcp-server-tester/write-mcp-test"><img src="https://agentmods.dev/badge/skills/gleanwork/mcp-server-tester/write-mcp-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,458 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 164
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 322
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00099 $0.03458
Opus 5.5 $0.00040 $0.01383
Sonnet 5.5 $0.00020 $0.00692
Haiku 4.5 $0.00010 $0.00346

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

Security

Grade A, and why

write-mcp-test 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 22d 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.

skills/write-mcp-test/SKILL.md · 341 lines

How it starts

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

Write MCP server tests

A test checks a server directly: it calls a tool with fixed arguments through MST's mcp fixture and asserts on the response with MST's matchers. Tests are fast and deterministic, so run each once, in CI.

A test has no client and no model, so it can't tell you whether a model would pick the tool. That is an eval: use the write-mcp-eval skill.

Before you start

  1. Check that the project has @gleanwork/mcp-server-tester and @playwright/test (npm install --save-dev @gleanwork/mcp-server-tester@beta @playwright/test).
  2. Find the tools to test and their input schemas: the server source, or await mcp.listTools() in a test.
  3. Check playwright.config.ts for an mcpConfig (Step 1).

npx mst generate connects to a server, lets you call tools interactively, and writes the calls as a spec (default tests/generated.spec.ts) you can edit. npx @gleanwork/mcp-server-tester@beta init scaffolds a new project.

Step 1: Configure the server

Each Playwright project's use.mcpConfig says how to reach the server:

// playwright.config.ts
import { defineConfig } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  reporter: [['list'], ['@gleanwork/mcp-server-tester/reporters/mcpReporter']],
  projects: [
    {
      name: 'local',
      use: {
        mcpConfig: {
          transport: 'stdio',
          command: 'node',
          args: ['./dist/server.js'],
          env: { LOG_LEVEL: 'warn' },
        },
      },
    },
    {
      name: 'staging',
      use: {
        mcpConfig: {
          transport: 'http',
          serverUrl: 'https://staging.example.com/mcp',
          auth: { accessToken: process.env.MCP_ACCESS_TOKEN },
        },
      },
    },
  ],
});

HTTP servers take serverUrl (not url) and optional headers. For auth:

Need auth setting
A token you already have { accessToken: process.env.MCP_ACCESS_TOKEN }
CI, service account, no browser { clientCredentials: { tokenEndpoint: 'https://auth.example.com/oauth/token' } } (reads MCP_CLIENT_ID and MCP_CLIENT_SECRET)
A user logs in once Run npx mst login <server-url>; the mcp fixture uses the stored login and refreshes it
A browser OAuth flow in global setup { oauth: { serverUrl, scopes, authStatePath } } (see docs/authentication.md)

Read the full file on GitHub · 341 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. 22d ago Changed · +18 lines · +47 tokens per session 51bee5fb6a8a
  2. 23d ago Changed 84c12e0c2322
  3. 27d ago Changed dc15e2a9d51d
  4. 2mo ago First seen · 323 lines · 52 tokens per session scan A bc16beb83175

Subscribe to this mod's changes

write-mcp-test is a skill published in the GitHub repository gleanwork/mcp-server-tester (19 stars, last pushed today), licensed MIT. It adds 99 tokens to every session and 3,458 once invoked, about $0.0004 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 skills, from other repositories

verify-omnigent

Drive Omnigent the way a user does and prove a behavior with recorded evidence, using an isolated server, runner, and mock model plus a feature map of every user entry point. Load before reproducing a user-facing bug, before claiming a fix works, or when reviewing whether a change covered every surface (session vs.…

omnigent-ai/omnigent · 100 tokens

test-master

Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation…

Jeffallan/claude-skills · 104 tokens

eval-dataset-design

A guide to creating reliable test sets for AI agents. Each evaluation task includes the request, the simulated user's behaviour, a reset starting state, and a success check that can be independently verified.

bojieli/ai-agent-book · 138 tokens

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.

callstack/agent-device · 55 tokens

cua-driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

davidondrej/skills · 68 tokens

test-warp-ui

Guides testing Warp UI features and changes using the computer use tool. Use this skill only when computer-use testing was requested (explicit request or accepted offer) and the computeruse tool is available to the agent. Covers launching Warp and verifying UI behavior.

warpdotdev/warp · 55 tokens