Skip to content
Back to skills

Mcp Protocol Stinger

ASecurity

Design and audit MCP servers. Use for tools and resources, schemas, transport, JSON-RPC errors, auth, testing, or registration. Read README.md for the guide map.

  • 85 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
ai-agentsgotestinggitapibackendsecurity

Works with

  • claude code
  • cursor
  • api
  • mcp

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add legioncodeinc/vibe-coding-tools --skill mcp-protocol-stinger --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mcp Protocol Stinger?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mcp Protocol Stinger
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/legioncodeinc-mcp-protocol-stinger/badge)](https://www.skillsdirectory.com/skills/legioncodeinc-mcp-protocol-stinger)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "mcp-protocol-stinger"
description: "Design and audit MCP servers. Use for tools and resources, schemas, transport, JSON-RPC errors, auth, testing, or registration. Read README.md for the guide map."

license: AGPL-3.0-or-later
compatibility: Claude Code, Cursor, ChatGPT Codex, Claude Cowork. Any MCP server built with @modelcontextprotocol/sdk (or an equivalent SDK in another language) over stdio or Streamable HTTP transport.
metadata:
  hive-tier: worker
  paired-drone: mcp-protocol-wasp-drone
  research-window: 2026-06-16 (original Hivemind-era research, kept) plus 2026-08-14 (four-harness reuse + general MCP broadening pass)
---

# mcp-protocol Stinger

Procedural arsenal for `mcp-protocol-wasp-drone`, the MCP protocol authority for The Wasp Nest.

This stinger encodes the reference material needed to build and audit **any** MCP server's protocol correctness and tool contract against the MCP specification, `@modelcontextprotocol/sdk` (or an equivalent), and JSON-RPC 2.0 - plus how to register a server in each of the four harnesses The Wasp Nest supports. It is organized around general, server-agnostic guides (00-08), a fully worked example applied to one real server (09, the Wasp Nestmind agent-memory server this pair originally shipped for), templates for common deliverables, and worked examples for frequent tasks.

**Paired Drone:** `../../agents/mcp-protocol-wasp-drone.md`

---

## First action when this stinger is loaded

Read these in order before doing anything:

1. **`guides/00-principles.md`** - spec-first reasoning; tool idempotency + side-effect declaration; tools vs resources vs prompts; JSON-RPC error-code honesty. This is the foundation every other guide builds on.
2. The guide most relevant to the current task (see index below).

Then pick the appropriate template from `templates/` for the deliverable the Drone is producing. If the server under review is Hivemind specifically, also read `guides/09-hivemind-worked-example.md` for the concrete, ground-truthed version of every rule.

---

## Guide index

| Guide | Topic | When to open |
|---|---|---|
| `guides/00-principles.md` | Spec-first reasoning; idempotency; tools vs resources vs prompts; error-code honesty | Every invocation |
| `guides/01-transport.md` | stdio vs Streamable HTTP; stdio hygiene; when a transport change is really an auth-model change | Transport-choice questions; "stdio or HTTP?" |
| `guides/02-tool-resource-prompt-design.md` | Tool vs resource vs prompt; anatomy of a well-formed tool; content types and output schemas | Designing or auditing a tool; "tool or resource?" |
| `guides/03-zod-schemas.md` | zod input schemas; the versioned zod v3/v4 SDK-compatibility trap | Schema authoring; "why is the schema empty?"; "why does zod v4 break the schema?" |
| `guides/04-error-model.md` | Two failure channels; JSON-RPC codes; classifying raw backend errors | Error reviews; "what code do I return?" |
| `guides/05-capability-negotiation.md` | initialize/discovery lifecycle; capabilities as a contract; deprecated primitives | Handshake questions; capability mismatches |
| `guides/06-authentication.md` | Auth patterns for remote/HTTP servers: API keys, bearer tokens, OAuth 2.1 | "How do I add auth to my MCP server?"; auditing a remote server's auth boundary |
| `guides/07-testing-mcp.md` | Layered testing model (protocol, unit, integration, tool-selection, transport); the boundary-mock pattern | Writing or auditing MCP tests |
| `guides/08-harness-registration.md` | Registering a server in Claude Code, Cursor, Codex, and Cowork; the Codex TOML trap; Cowork's public-reachability constraint | "Register this MCP server in \<harness\>" |
| `guides/09-hivemind-worked-example.md` | Every principle above, applied concretely to the Wasp Nestmind server | Auditing Hivemind specifically; wanting a full worked example |

---

## Template index

| Template | Use when |
|---|---|
| `templates/findings-report.md` | Producing the MCP server / tool audit findings report |
| `templates/tool-contract-checklist.md` | Evaluating whether a tool is well-formed and contract-stable |
| `templates/error-channel-matrix.md` | Routing a failure to the correct channel (JSON-RPC error vs tool result) |
| `templates/transport-decision.md` | Choosing stdio vs HTTP, or diagnosing stdio hygiene |

---

## Example index

| Example | Shows |
|---|---|
| `examples/add-hivemind-tool.md` | Add a new `hivemind_*` tool with a zod/v3 schema, matching the Wasp Nestmind worked example's contract |
| `examples/expose-a-resource.md` | Expose a stable document as an MCP resource (the tool-vs-resource decision) |
| `examples/test-mcp-tool.md` | Test an MCP tool with the Vitest boundary-mock pattern |

These worked examples are grounded in the Wasp Nestmind codebase (see `guides/09-hivemind-worked-example.md`); the design decisions they walk through generalize per `guides/00-08`.

---

## Critical directives (lifted from Command Brief)

- **Cite the spec section or SDK symbol for every ruling.** Why: it is the only way the developer can verify the ruling and learn the principle, not just take the Drone's word.
- **Never conflate the JSON-RPC error channel with the tool-result channel.** Why: dressing a protocol fault as a success (or vice versa) is the MCP analog of HTTP "200 with error body" and poisons the agent's context.
- **The zod import at the SDK boundary MUST be `zod/v3`.** Why: the SDK generates tool JSON Schemas against v3 internals; v4 produces a wrong/empty schema and breaks param validation.
- **Treat tool names + arg shapes + parseable output as a cross-harness contract.** Why: Hermes, OpenClaw, pi, Claude Code, Codex, and Cursor all depend on them; a rename is breaking, not a refactor.
- **Do not audit Deeplake credential/OAuth lifecycle** - hand off to `security-wasp-drone`. **Do not audit Deeplake query/schema internals** - hand off to `vector-store-wasp-drone`.

---

## Scope note: general MCP work vs the Wasp Nestmind worked example

This pair originally shipped scoped to one product (Hivemind, an npm-distributed agent-memory MCP server: tools `hivemind_search`/`hivemind_read`/`hivemind_index`, Deep Lake credentials, a `mcp/bundle` build output). It has been broadened to cover building and auditing MCP servers **generally** - any tool/resource/prompt design question, any zod schema question, any transport or auth or testing or harness-registration question applies to any MCP server, not just Hivemind's. The Wasp Nestmind material was not deleted: it is preserved in full as `guides/09-hivemind-worked-example.md`, a clearly labeled worked example showing every general principle applied to one real, shipped server. Use guides 00-08 for anything general; use guide 09 when the server actually under review is Hivemind, or when you want to see the general rules exercised end to end.

---

## Folder layout

```
mcp-protocol-stinger/
+- SKILL.md                                  (this file - master index)
+- README.md                                 (one-page human overview)
+- guides/
|  +- 00-principles.md                       (spec-first reasoning; idempotency; primitives; error honesty)
|  +- 01-transport.md                        (stdio vs HTTP, general; stdio hygiene)
|  +- 02-tool-resource-prompt-design.md      (tool vs resource vs prompt; anatomy of a well-formed tool)
|  +- 03-zod-schemas.md                      (zod input schemas; the versioned v3/v4 SDK trap)
|  +- 04-error-model.md                      (two channels; JSON-RPC codes; classifying raw errors)
|  +- 05-capability-negotiation.md           (initialize/discovery lifecycle; capabilities; deprecated primitives)
|  +- 06-authentication.md                   (auth patterns for remote/HTTP servers: API keys, bearer, OAuth 2.1)
|  +- 07-testing-mcp.md                      (layered testing model; boundary-mock Vitest pattern)
|  +- 08-harness-registration.md             (Claude Code / Cursor / Codex / Cowork registration; the Codex TOML trap; Cowork public-reachability)
|  +- 09-hivemind-worked-example.md          (every principle above, applied to the Wasp Nestmind server - WORKED EXAMPLE, not general guidance)
+- examples/
|  +- add-hivemind-tool.md                   (new hivemind_* tool with a zod/v3 schema)
|  +- expose-a-resource.md                   (expose a document as an MCP resource)
|  +- test-mcp-tool.md                       (test an MCP tool with Vitest)
+- templates/
|  +- findings-report.md                     (audit output template)
|  +- tool-contract-checklist.md             (tool well-formedness + contract stability)
|  +- error-channel-matrix.md                (JSON-RPC error vs tool-result routing)
|  +- transport-decision.md                  (stdio vs HTTP + stdio hygiene)
+- reports/
|  +- README.md                              (how audit findings accumulate)
+- research/
   +- distilled-mcp-protocol.md              (NEW - the general MCP distillation: tool/resource/prompt design, zod v3/v4 trap, transport, JSON-RPC, capabilities, auth, testing, four-harness registration)
   +- research-plan.md, research-summary.md, index.md   (original Hivemind-era research trail, kept)
   +- 2026-06-16-*.md                        (6 files, original Hivemind-era MCP SDK + protocol notes, kept)
   +- external/                              (NEW - 8 general-purpose sources archived 2026-08-14: MCP spec pages, zod v3/v4 ecosystem issues, MCP server testing guides)
```

---

*Part of The Wasp Nest, curated by [Mario Aldayuz a.k.a @thenotoriousllama](https://github.com/thenotoriousllama).*

Files in this skill

  • README.md958 B
  • SKILL.md10.2 KB
  • examples/add-hivemind-tool.md3.9 KB
  • examples/expose-a-resource.md3.4 KB
  • examples/test-mcp-tool.md5.3 KB
  • guides/00-principles.md8.1 KB
  • guides/01-transport.md7.5 KB
  • guides/02-tool-resource-prompt-design.md7.6 KB
  • guides/03-zod-schemas.md7.5 KB
  • guides/04-error-model.md5.5 KB
  • guides/05-capability-negotiation.md5.2 KB
  • guides/06-authentication.md8.2 KB
  • guides/07-testing-mcp.md8.9 KB
  • guides/08-harness-registration.md8.5 KB
  • guides/09-hivemind-worked-example.md11 KB
  • reports/README.md934 B
  • research/2026-06-16-jsonrpc-error-model.md1.2 KB
  • research/2026-06-16-mcp-sdk-typescript.md1.6 KB
  • research/2026-06-16-mcp-spec-lifecycle.md1.6 KB
  • research/2026-06-16-mcp-tool-contract-stability.md1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…