mcp-development

Build MCP servers with correlation ID tracing, file logging, and Zod-validated tool registration.

6|1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/nathanvale/side-quest-marketplace-old --skill mcp-development-nathanvale
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcp-development
Source: https://github.com/nathanvale/side-quest-marketplace-old/tree/main/plugins/dev-toolkit/skills/mcp-development
Command: npx skills add https://github.com/nathanvale/side-quest-marketplace-old --skill mcp-development-nathanvale

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @side-quest/core, and includes references (resource) components.

What problem does it solve? Building Model Context Protocol servers from scratch involves repetitive boilerplate for tool registration, error handling, logging, and debugging, and mistakes like nested package.json files silently break MCP discovery. ## Core Features & Use Cases - Declarative Tool Registration: Register tools with Zod input schemas, MCP annotations (readOnlyHint, destructiveHint), and dual markdown/JSON response formats using @side-quest/core/mcp. - Observability Built In: Correlation ID tracing, subsystem-based file logging to ~/.claude/logs/<plugin>.jsonl, and structured error responses with recovery hints. - CLI Wrapper Pattern: Wrap external CLI tools using spawnSyncCollect and buildEnhancedPath from @side-quest/core/spawn. - Use Case: Create a new plugin with /plugin-template:create, add an mcp/index.ts that registers tools following the 6-step handler pattern, and debug it by tailing JSONL logs filtered by correlation ID. ## Quick Start Ask the AI to scaffold a new MCP server with a greeting tool using @side-quest/core/mcp, including file logging and correlation ID tracing, then test it with bun run mcp/index.ts.

Frequently Asked Questions about mcp-development

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

FAQPage Schema
How do I create an MCP server with Bun and TypeScript?▼

Import tool, startServer, log, createCorrelationId, and z from @side-quest/core/mcp, register tools with Zod input schemas and annotations, then call startServer with a version and fileLogging config. Add a .mcp.json pointing to bun run mcp/index.ts and test with bun run mcp/index.ts.

How do I wrap an external CLI tool as an MCP tool?▼

Use spawnSyncCollect and buildEnhancedPath from @side-quest/core/spawn to execute the CLI and capture stdout/stderr. Return stdout on exit code 0, otherwise return stderr with isError set to true, logging the duration with a correlation ID.

Why is my MCP tool not appearing in Claude Code?▼

The most common cause is a nested package.json inside the mcp directory, which breaks MCP server discovery. Also verify the .mcp.json path uses ${CLAUDE_PLUGIN_ROOT}, the tool name follows conventions, and the server starts without errors via bun run mcp/index.ts.

How do I debug MCP server errors with logs?▼

Enable fileLogging in startServer with named subsystems, then logs are written to ~/.claude/logs/<plugin>.jsonl. Tail the file with jq and filter by correlation ID using jq 'select(.cid == "abc123")' to trace a single request end to end.

What MCP annotations should I use for read-only tools?▼

For read-only tools like search or list operations, set readOnlyHint: true, destructiveHint: false, idempotentHint: true, and openWorldHint: false. Destructive tools should set destructiveHint: true and openWorldHint: true so LLMs invoke them appropriately.

How should MCP tools return errors to Claude?▼

Return a content array containing JSON with error, hint, and isError fields, plus a top-level isError: true flag. Include a recovery hint telling the user how to fix the issue, and log the error with a correlation ID before returning.