mcp-server

mcp-server is a skill for Claude Code, Codex from fmind/dot. It costs 43 tokens per session (1,172 once invoked), scanned A, original, MIT.

A guide to building an MCP server in Go, Python, or TypeScript. MCP, or Model Context Protocol, is a standard way for an AI agent to access tools, data, and prompts.

In plain words
What is it for?
Use it to create typed agent tools, expose resources and prompts, choose local or network communication, and test the server with MCP Inspector.
Why use it?
It helps keep tool definitions, input schemas, communication methods, and tests consistent with the server code.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/fmind/dot/mcp-server
Any agent
npx skills add fmind/dot --skill mcp-server
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/mcp-server.svg)](https://agentmods.dev/skills/fmind/dot/mcp-server)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/mcp-server"><img src="https://agentmods.dev/badge/skills/fmind/dot/mcp-server.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,172 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00043 $0.01172
Opus 5 $0.00022 $0.00586
Sonnet 5 $0.00009 $0.00234
Haiku 4.5 $0.00004 $0.00117

Measured yesterday against content hash 71332833a8f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-server 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 yesterday.

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.

skills/mcp-server/SKILL.md · 61 lines

How it starts

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

MCP Server

Author a Model Context Protocol server that exposes typed tools, resources, and prompts to agents. Go with the official github.com/modelcontextprotocol/go-sdk is the default; Python and TypeScript use their official SDKs. Registering a finished server in a host belongs to agent-mcp.

Workflow

  1. Pick the stack: Go for a binary that ships by go install or ko; Python or TypeScript when the project already lives there.
    go get github.com/modelcontextprotocol/go-sdk@latest                      # package mcp; skip -pre tags
    uv add "mcp[cli]"                                                        # from mcp.server import MCPServer (formerly FastMCP)
    pnpm add @modelcontextprotocol/server @modelcontextprotocol/node         # McpServer + stdio; node adds Streamable HTTP
    
  2. Define typed tools: one struct (or type-hinted function) per tool; the SDK derives the JSON Schema from struct tags or type hints, so the schema never drifts from the code. Go: mcp.NewServer(&mcp.Implementation{Name: "<slug>", Version: "v0.1.0"}, nil) then mcp.AddTool(server, &mcp.Tool{Name: "...", Description: "..."}, handler).
  3. Choose the transport: stdio for a local tool, Streamable HTTP for a hosted one, mounted as a plain http.Handler.
    err := server.Run(ctx, &mcp.StdioTransport{}) // local
    handler := mcp.NewStreamableHTTPHandler(func(*http.Request) *mcp.Server { return server }, &mcp.StreamableHTTPOptions{Stateless: true})
    err = http.ListenAndServe(":"+os.Getenv("PORT"), handler) // Cloud Run injects PORT
    
    Python: uv run mcp run server.py --transport streamable-http; TypeScript: StdioServerTransport from @modelcontextprotocol/server/stdio or the HTTP transport from @modelcontextprotocol/node.
  4. Test locally with the Inspector before wiring any host; unit-test through the in-memory transport (mcp.NewInMemoryTransports() in Go, Client(mcp) in Python) so the suite needs no subprocess.
    npx @modelcontextprotocol/inspector ./bin/<slug>                            # stdio, web UI (Python: uv run mcp dev server.py)
    npx @modelcontextprotocol/inspector --cli ./bin/<slug> --method tools/list  # scripted
    npx @modelcontextprotocol/inspector --transport http --server-url http://localhost:8080/mcp
    
  5. Ship: local servers install as a binary (go install, uv tool install); hosted servers containerize per containerize and deploy per cloud-run, private by default with an identity token or OAuth in front.
  6. Register the server in each host with agent-mcp and verify one real tool call end to end.

Read the full file on GitHub · 61 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. yesterday First seen · 61 lines · 43 tokens per session scan A 71332833a8f5

Subscribe to this mod's changes

mcp-server is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 1,172 once invoked, about $0.0002 per session on Opus 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-03.