Logo di Mcp Server

Mcp Server

Community
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.

Panoramica

Pubblicato danimadorostkar
RepositoryClaude-Skills-collection
Nome della skillmcp-server
Stelle
34
Fork
4
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da nimadorostkar su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Mcp Server in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/mcp-server
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Mcp Server in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Mcp Server non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Mcp Server non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Mcp Server su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Mcp Server è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Mcp Server in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/mcp-server. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Mcp Server?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Mcp Server?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Mcp Server: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Mcp Server è gratuita?

Sì. È pubblicata su GitHub da nimadorostkar con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇