# MCP Server Authoring Guide

> Architect and package MCP servers for local tools or hosted services with proper schemas and listing metadata.

MCP Server Authoring Guide is a paid AI agent skill on Agensi by Khristian Kopachelli, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $15 (one-time purchase)
- Creator: [Khristian Kopachelli](https://www.agensi.io/creators/khristian-kopachelli)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-29
- Security: scan passed (2026-11-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/mcp-server-authoring-guide
- Tags: llm-ops, api, node-js, json-rpc, mcp

## About this skill

Building a Model Context Protocol (MCP) server involves navigating transport selection, JSON-RPC schemas, and strict marketplace requirements. This skill provides the architectural constraints and implementation patterns required to build servers that agents can actually use. It focuses on the transition from raw API to structured MCP tools, ensuring your server passes listing requirements for platforms like Glama or npm.

### What it does
- **Transport selection** guides you between stdio for local tools and streamable HTTP for hosted, multi-user services.
- **Project scaffolding** defines the minimal file structure including `package.json` bins, `index.mjs` entries, and required licensing.
- **Tool design** enforces naming conventions, Zod/JSON-schema validation, and agent-centric descriptions.
- **Error handling** replaces standard stack traces with structured `{error, hint}` objects designed for LLM consumption.
- **Distribution prep** formats your README and configuration snippets for Claude Desktop, Cursor, and Glama.

### How it works
1. **Define scope** by choosing between stdio for simplicity or HTTP for remote auth and scaling.
2. **Implement tools** using the official SDK to handle JSON-RPC requests for listing and calling capabilities.
3. **Validate schemas** using Zod to ensure the agent receives strict input requirements.
4. **Audit for listing** by verifying the presence of LICENSE files, `glama.json` metadata, and copy-paste client configs.

### Frameworks & tools
Uses the `@modelcontextprotocol/sdk` for Node.js. Optimized for distribution via npm, Glama, and mcprush.

### Why this beats prompting it yourself
Generic prompts often fail to include the specific `ListToolsRequestSchema` requirements or the strict LICENSE file necessity for marketplace builders. This skill enforces the exact JSON-RPC patterns and folder structures that prevent silent failures in agent-to-server communication.

### Use cases
- Convert an existing REST API into a set of MCP tools for Claude Desktop.
- Build a local filesystem utility available via npx.
- Prepare a TypeScript MCP server for submission to the Glama directory.
- Debug transport-layer issues in JSON-RPC stdio implementations.

### Known limitations
Requires Node.js 18 or higher for the official SDK. Does not cover Python-based SDK implementations.

## Requires

Nothing beyond your AI agent.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the MCP Server Authoring Guide skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What specific problems does the MCP Server Authoring skill solve for developers?

This skill provides the specific architectural patterns, JSON-RPC schemas, and distribution-ready scaffolding required to build Model Context Protocol servers that are fully compatible with marketplaces like Glama and platforms like Claude Desktop.

### What are the technical requirements and supported programming languages?

The skill is optimized for the official Node.js SDK and requires Node.js 18 or higher; please note that Python-based MCP implementations are not currently supported by this specific skill.

### Does this skill help with getting my server listed on public directories like Glama?

Yes, this skill includes dedicated guidance on formatting READMEs, licensing, and glama.json metadata to ensure your server meets the strict submission requirements for major MCP directories.

### Can I use this to build both local desktop tools and hosted cloud services?

This skill provides the logic to bridge both local stdio environments (like Claude Desktop and Cursor) and remote HTTP services, including the necessary patterns for handling multi-user authentication.

### How does this skill handle errors compared to traditional API development?

Standard error logs are often unhelpful for AI; this skill implements a specialized 'LLM-first' error handling pattern that provides structured hints to help the agent self-correct its tool calls.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
