MCP (Model Context Protocol) server and client engineering. Protocol design, schemas, transports, extensions, security, and migration.
60
72%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/mcp-builder/SKILL.mdBuild interoperable MCP implementations against the stable 2026-07-28 specification. Treat extensions as negotiated, opt-in capabilities rather than core protocol guarantees.
-32002 while emitting -32602 for invalid parameters in the current protocol.| Layer | Status | Engineering rule |
|---|---|---|
| Base protocol, versioning, message patterns | Stable core | Required for every implementation |
| Resources, prompts, tools, elicitation | Optional core features | Advertise and check capabilities before use |
| Tasks, Skills over MCP, MCP Apps | Extensions | Opt-in; require explicit support from both peers |
| Draft or vendor extensions | Experimental/vendor-specific | Isolate behind adapters and feature flags |
Never label an extension as stable merely because one SDK or host supports it. Check the extension's own official status and version.
MCP uses JSON-RPC 2.0 between hosts, clients, and servers.
host application
└─ MCP client / runtime adapter
├─ stdio transport
└─ Streamable HTTP transport
└─ MCP server
├─ resources
├─ prompts
└─ toolsEvery request must carry the protocol metadata required by the negotiated version. For 2026-07-28 this includes per-request protocol version and client capability metadata under reserved _meta keys.
Servers must implement server/discover for protocol-version and capability discovery. Clients may call it before normal requests or use it as a backward-compatibility probe for stdio peers.
Do not:
Do:
| Transport | Typical use | Security baseline |
|---|---|---|
stdio | Local process integration | Read credentials from the environment; constrain process and filesystem access |
| Streamable HTTP | Remote or shared service | Use the MCP HTTP authorization framework, validate origins where applicable, and enforce network boundaries |
WebSocket is not a standard MCP transport unless defined by a separately negotiated extension or vendor adapter.
Transport concerns must not leak into protocol semantics. Reconnection or process replacement must not destroy logical state that is represented by an explicit durable handle.
MCP defaults to JSON Schema 2020-12 when $schema is absent. Implementations must support that dialect and should document any additional dialects.
additionalProperties: false where forward compatibility does not require open objects.Use structured content and outputSchema when consumers need typed, predictable results. Keep human-readable text concise and ensure structured output remains the source of truth for automation.
$ref and validator safety$ref values automatically.Extensions are negotiated independently from the core protocol.
| Extension | Use | Guardrail |
|---|---|---|
| Tasks | Long-running work, polling, durable handles, mid-flight input | Do not use the older experimental task API; negotiate the extension |
| Skills over MCP | Discoverable structured agent instructions | Treat skill content as untrusted input and apply host policy |
| MCP Apps | Interactive UI rendered in conversations | Constrain origins, content, data access, and action permissions |
An adapter must fail gracefully when an extension is absent. Never silently downgrade a security requirement to preserve feature parity.
The 2026-07-28 specification deprecates legacy roots, sampling, and logging shapes while keeping a compatibility window. Do not remove compatibility abruptly, but avoid designing new architecture around deprecated forms.
initialize handshake with stateless per-request metadata.server/discover for version and capability selection.$ref resolution by default and add validation resource limits.-32002 resource-not-found responses, but emit current error semantics.resultType from older servers as "complete"; require it for current-version results.| Test | Expected evidence |
|---|---|
| Contract | Invalid JSON-RPC, missing metadata, unsupported version/capability, schema dialect handling |
| Statelessness | Interleaved requests, reconnects, process reuse, explicit-handle recovery |
| Schema security | External $ref, recursive/composed schemas, depth/count/time limits |
| Authorization | Denied resource/tool access, approval gates, credential isolation |
| Extension negotiation | Extension absent, version mismatch, feature enabled, graceful fallback |
| Compatibility | Current peer plus supported older protocol revision |
| Failure handling | Timeouts, cancellation, partial results, structured errors, no secret leakage |
$ref resolution is disabled by default.211561c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.