mcp-server-build

mcp-server-build is a skill for Claude Code, Codex from fabioc-aloha/Alex_Skill_Mall. It costs 41 tokens per session (1,424 once invoked), scanned A, original, MIT.

A build guide for creating a Model Context Protocol (MCP) server in TypeScript, Python, or C#/.NET and connecting it to a host. An MCP server makes defined tools available for an AI agent or other client to call.

In plain words
What is it for?
Use it to implement a server over standard input/output or HTTP, define paginated tools and input schemas, return useful errors, and register the server with a host.
Why use it?
It provides complete working examples instead of leaving the protocol connection, input validation, error handling, and tool registration unspecified.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to implement a server over standard input/output or HTTP, define paginated tools and input schemas, return useful errors, and register the server with a host.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fabioc-aloha/alex_skill_mall/mcp-server-build
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fabioc-aloha/Alex_Skill_Mall --skill mcp-server-build
Clone the repo
git clone --depth 1 https://github.com/fabioc-aloha/Alex_Skill_Mall

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-server-build

README.md
[![agentmods](https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/mcp-server-build/github.svg)](https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/mcp-server-build)
Your own site
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/mcp-server-build"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/mcp-server-build/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-server-build

Your own site · 80×15
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/mcp-server-build"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/mcp-server-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,424 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01424
Opus 5.5 $0.00016 $0.00570
Sonnet 5.5 $0.00008 $0.00285
Haiku 4.5 $0.00004 $0.00142

Measured 1mo ago against content hash fbb32389f262, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp-server-build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ai-agents/mcp-toolkit/skills/mcp-server-build/SKILL.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Build an MCP Server

Samples below are minimal but complete: each one runs.

TypeScript

npm install @modelcontextprotocol/sdk zod
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({ name: "my-mcp-server", version: "1.0.0" });

server.tool(
  "list_items",
  "List items with pagination. Use before acting on a specific item.",
  { page: z.number().default(1), limit: z.number().max(100).default(20) },
  async ({ page, limit }) => {
    try {
      const items = await api.listItems({ page, limit });
      return {
        content: [{
          type: "text",
          text: JSON.stringify({ items, page, hasMore: items.length === limit }),
        }],
      };
    } catch (error) {
      return {
        content: [{
          type: "text",
          text: `Error: ${error.message}. Try: check API key, verify endpoint, reduce page size.`,
        }],
        isError: true,
      };
    }
  },
);

await server.connect(new StdioServerTransport());

Python

pip install mcp
from mcp.server.fastmcp import FastMCP
from pydantic import BaseModel, Field

mcp = FastMCP("my-mcp-server")

class ListParams(BaseModel):
    page: int = Field(default=1, description="1-based page number")
    limit: int = Field(default=20, le=100, description="Items per page, max 100")

@mcp.tool(description="List items with pagination. Use before acting on one.")
async def list_items(params: ListParams) -> dict:
    items = await api.list_items(page=params.page, limit=params.limit)
    return {"items": items, "page": params.page, "hasMore": len(items) == params.limit}

if __name__ == "__main__":
    mcp.run()

FastMCP turns the Pydantic model into the input schema, so field descriptions and constraints reach the agent. Put the constraint in the model rather than validating by hand in the body.

Read the full file on GitHub · 199 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 199 lines · 41 tokens per session scan A fbb32389f262

Subscribe to this mod's changes

mcp-server-build is a skill published in the GitHub repository fabioc-aloha/Alex_Skill_Mall (5 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 1,424 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-14.

Related

Other skills, from other repositories

apply-change-leadership

Use when a manager's team is experiencing a significant organizational change — restructuring, strategy shift, leadership change, layoffs, or major process transition — and needs leadership that maintains team stability, preserves trust, and converts uncertainty into direction.

jeffreytse/grimoire-core · 51 tokens

apply-cross-functional-leadership

Use when a manager needs to lead a project or initiative that depends on team members or stakeholders they do not formally manage — to build voluntary cooperation, alignment, and momentum across organizational boundaries through influence rather than authority.

jeffreytse/grimoire-core · 49 tokens

apply-distributed-team-practices

Use when managing a team where members work in different locations, time zones, or on hybrid schedules — to adapt management practices so remote members have equal access to information, relationships, and advancement opportunities as in-office members.

jeffreytse/grimoire-core · 51 tokens

apply-grow-coaching

Use when a manager wants to help a direct report solve a problem, develop a skill, or reach a goal through structured questioning rather than advice-giving — because telling people answers builds dependency while coaching builds self-sufficiency.

jeffreytse/grimoire-core · 50 tokens

apply-high-performer-retention

Use when a manager wants to proactively retain top-performing direct reports — because high performers have the most options to leave and require active, differentiated management attention to stay engaged and challenged.

jeffreytse/grimoire-core · 42 tokens

apply-upward-influence

Use when a manager needs to build an effective working relationship with their own manager, secure resources or decisions for their team, or influence organizational priorities without formal authority over the outcome.

jeffreytse/grimoire-core · 41 tokens