Logo: Mcp Server

Mcp Server

Communautéit
nimadorostkar
mcp-server

Use when building a Model Context Protocol server. Covers tool, resource, and prompt design, transport choice, authentication, error handling, and testing an MCP server against a real client. Trigger on "build an mcp server", "expose our api to claude", "the model keeps calling my mcp tool wrong". Do not use for packaging the server into a distributable plugin — see the plugin-development skill; for the agent loop that calls tools, see the agent-design skill.

Iwwersiicht

Editeurnimadorostkar
RepositoryClaude-Skills-collection
Skill-Nummmcp-server
Stären
34
Forks
4
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    nimadorostkar huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Mcp Server an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/mcp-server
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/ai/mcp-server .claude/skills/mcp-server
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Mcp Server an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Mcp Server automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Mcp Server net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

MCP Server

Purpose

Build an MCP server that a model can use correctly. The protocol is straightforward; the difficulty is designing a tool surface that a language model uses well, which is a different problem from designing an API for a programmer.

When to Use

  • Exposing a system's capabilities to an LLM client.
  • Wrapping an internal API for agent use.
  • Improving an MCP server whose tools the model uses incorrectly.

Capabilities

  • Tool design: granularity, naming, schema, and descriptions.
  • Resources for read-only context.
  • Prompts as reusable, parameterized templates.
  • Transports: stdio for local, HTTP/SSE for remote.
  • Authentication and authorization.
  • Error returns that let a model recover.

Inputs

  • The underlying system and its API.
  • The tasks a model should be able to accomplish.
  • The security boundary: what the model may do, and on whose behalf.

Outputs

  • A server whose tool descriptions unambiguously state when each tool applies.
  • Errors that are instructive rather than merely accurate.
  • A test suite exercising the tools as a model would call them.

Workflow

  1. Design around tasks, not endpoints — Do not mirror your REST API one-to-one. A model needs find_order_by_customer, not GET /orders with fourteen optional query parameters.
  2. Write the description as if it were the prompt — Because it is. State what the tool does, when to use it, when not to use it, and what it returns. This text determines whether the model uses the tool correctly.
  3. Constrain the inputs — Enums, not free strings. Required parameters, not optional ones the model must guess.
  4. Return errors a model can act on — What went wrong, and what to do instead. An error that names the valid values lets the model self-correct in one step.
  5. Keep responses compact — Return what the model needs. A tool returning a 40 KB JSON blob spends the model's context on noise.
  6. Test as a client — Not with unit tests on the handlers. Connect a real client and watch which tools the model picks and how it uses them. It will surprise you.

Best Practices

  • The tool description is the single highest-leverage text in an MCP server. If the model calls the wrong tool, the description is wrong — not the model.
  • Twelve well-designed tools beat forty thin wrappers around API endpoints. Every additional tool is a decision the model must make correctly.
  • Distinguish tools (actions with side effects, model-invoked) from resources (read-only context, application-selected). Modeling read-only data as a tool forces the model to call it, which wastes a turn.
  • Destructive tools should be clearly marked and, where the client supports it, require confirmation.
  • Validate every input server-side. The model will send a malformed argument eventually, and the tool must not act on it.
  • Never trust the model's authorization reasoning. Enforce permissions in the server, scoped to the authenticated user — not to the model's belief about who it is acting for.

Examples

A tool designed for a model:

typescript
server.registerTool(
  "find_orders",
  {
    title: "Find orders",
    description: [
      "Search for orders by customer, status, or date range.",
      "",
      "Use this when you do NOT already know the order ID. If you have an order ID,",
      "use `get_order` instead — it is faster and returns the full detail including",
      "line items and refund history.",
      "",
      "At least one filter is required. Returns up to 20 matches, most recent first,",
      "with only the order ID, status, total, and customer email. Call `get_order`",
      "with an ID from these results to see more.",
    ].join("\n"),
    inputSchema: {
      customerEmail: z.string().email().optional()
        .describe("Exact email address. Partial matches are not supported."),
      status: z.enum(["open", "paid", "shipped", "cancelled"]).optional()
        .describe("Exact status. Use 'open' for orders not yet paid."),
      placedAfter: z.string().date().optional()
        .describe("ISO date (YYYY-MM-DD). Orders placed on or after this date."),
    },
  },
  async ({ customerEmail, status, placedAfter }, { authInfo }) => {
    if (!customerEmail && !status && !placedAfter) {
      return {
        isError: true,
        content: [{
          type: "text",
          // Instructive, not merely accurate. The model can fix this on the next turn.
          text: "At least one filter is required. Provide customerEmail, status, or placedAfter.",
        }],
      };
    }

    // Authorization is enforced here, against the authenticated principal —
    // never against what the model claims.
    const orders = await db.orders.search({
      tenantId: authInfo.tenantId,
      customerEmail, status, placedAfter,
      limit: 20,
    });

    if (orders.length === 0) {
      return { content: [{ type: "text",
        text: "No orders matched. Try widening the date range or removing the status filter." }] };
    }

    // Compact: four fields per row, not the full object graph.
    return {
      content: [{
        type: "text",
        text: orders
          .map((o) => `${o.id} | ${o.status} | ${(o.totalCents / 100).toFixed(2)} ${o.currency} | ${o.customerEmail}`)
          .join("\n"),
      }],
    };
  },
);

Resources for context the model should read, not call:

typescript
// A resource is read-only context the client can attach. Modeling this as a
// tool would force the model to spend a turn asking for something it always needs.
server.registerResource(
  "order-schema",
  "schema://orders",
  { title: "Order schema", mimeType: "text/markdown" },
  async () => ({
    contents: [{ uri: "schema://orders", text: await readFile("docs/order-schema.md") }],
  }),
);

Notes

  • Test by connecting a real client and giving the model realistic tasks. Unit tests confirm the handler works; only a real client shows you that the model consistently reaches for the wrong tool because two descriptions overlap.
  • stdio transport is right for local, single-user servers. HTTP with SSE is right for remote, multi-user servers — and immediately raises authentication and multi-tenancy questions that stdio lets you ignore.
  • If a tool's description needs to explain a workflow ("first call X, then call Y with the result"), consider whether it should be one tool that does both.

Heefeg gestallte Froen

Wat mécht de KI-Skill Mcp Server?

Use when building a Model Context Protocol server. Covers tool, resource, and prompt design, transport choice, authentication, error handling, and testing an MCP server against a real client. Trigger on "build an mcp server", "expose our api to claude", "the model keeps calling my mcp tool wrong". Do not use for packaging the server into a distributable plugin — see the plugin-development skill; for the agent loop that calls tools, see the agent-design skill.

Firwat Mcp Server op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Mcp Server besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Mcp Server an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/mcp-server an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Mcp Server benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Mcp Server benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Mcp Server domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Mcp Server gratis?

Jo. nimadorostkar huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇