mcp-server

Design, implement, review, and publish Model Context Protocol servers with tools, transports, and authorization.

22|Updated Sep 10, 2026
One-click install
npx skills add https://github.com/Lynricsy/HyperSkills --skill mcp-server-lynricsy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-server
Source: https://github.com/Lynricsy/HyperSkills/tree/main/skills/mcp-server
Command: npx skills add https://github.com/Lynricsy/HyperSkills --skill mcp-server-lynricsy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @modelcontextprotocol/server, @modelcontextprotocol/core, zod, ajv, ajv-formats, mcp, and includes references (resource) components.

What problem does it solve? Building an MCP server involves version-sensitive protocol rules, SDK divergences, and security pitfalls that silently break clients: tools the model never picks, truncated results, corrupted stdio streams, and misconfigured OAuth. This Skill encodes the measured, revision-gated rules for the 2026-07-28 specification so a server works correctly the first time. ## Core Features & Use Cases - Server design and implementation: Decide primitives (tools vs resources vs prompts), write tool descriptions and schemas the model can act on, budget result sizes, and construct recoverable errors. - Transport and protocol compliance: Configure stdio framing and Streamable HTTP with the required headers, handle the modern/legacy era split, and migrate across specification revisions. - Security review and publishing: Audit authorization (audience validation, no token passthrough, scope minimization), defend against tool poisoning and command injection, and verify the published install config with the Inspector CLI. - Use Case: Given an existing TypeScript MCP server where agents pick the wrong tool and the process randomly hangs, the Skill identifies stdout logging as the protocol-framing bug, splits a multiplexed op-dispatch tool, and produces fixed tool definitions. ## Quick Start Ask the agent to review your MCP server file and fix its tool definitions, transport setup, and authorization configuration against the 2026-07-28 specification.

Frequently Asked Questions about mcp-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an MCP server with the 2026-07-28 specification?

Implement server/discover, carry protocol version and client capabilities in each request's _meta envelope, and use Streamable HTTP or stdio as the transport. There is no initialize handshake or session header; cross-call state becomes a server-minted handle passed as a tool argument.

Why does my MCP server randomly hang over stdio?

Writing anything to stdout that is not a JSON-RPC frame corrupts the protocol stream. A write without a trailing newline prefixes the next frame, the client loses that response, and the call times out. Route all logging to stderr.

What is the difference between @modelcontextprotocol/sdk and @modelcontextprotocol/server?

@modelcontextprotocol/sdk is the retired v1 single package ending at 1.30.0. The v2 line ships as scoped packages (@modelcontextprotocol/core, @modelcontextprotocol/server) at 2.0.0, and migration is a dependency change aided by the official codemod.

How do I secure OAuth authorization for an MCP server?

Validate the token's audience against your server's canonical URI on every request, never forward the inbound token to upstream APIs, and request the narrowest scopes needed. Return 401 with WWW-Authenticate for invalid tokens and 403 with a scope challenge for insufficient scope.

Why does my MCP tool throw an error the model cannot use?

Thrown exceptions are handled inconsistently: mcp 2.2.0 discards the message while TypeScript SDKs forward it verbatim, secrets included. Catch exceptions in the handler and return a result with isError: true plus text naming the next recovery action.

When should I not use this MCP server skill?

It does not cover operating someone else's published server, writing agent skills, general language idioms, container deployment, or full-codebase security audits. Those belong to operator tasks, the skill-authoring, language, cloud, and security-review skills respectively.