Логотип Mcp Server

Mcp Server

Спільнота
saschb2b
mcp-server

Build, extend, and maintain a Model Context Protocol (MCP) server across its whole lifecycle against the current spec and official SDKs. Covers the architecture, choosing a transport (stdio vs Streamable HTTP), writing tool definitions agents actually use, adding tools without breaking existing agents, versioning and deprecation, the security threat model (tool poisoning, token passthrough, prompt injection, OAuth), testing with the MCP Inspector, and publishing to the registry. Use when building an MCP server, exposing a CLI, API, or app to AI agents (Claude Code, Cursor, Cline, Windsurf), adding or reviewing MCP tools, fixing an agent that calls the wrong tool or loads too many, securing or authorizing an MCP server, migrating transports, or shipping and versioning one. Also for any new agent-tool integration where the target has a scripting API, CLI, or HTTP surface.

Огляд

Видавецьsaschb2b
Репозиторійskills
Назва навичкиmcp-server
Зірки
22
Форки
3
Файли в пакеті
12
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 12

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем saschb2b. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Mcp Server у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/saschb2b/skills/tree/main/skills/engineering/mcp-server
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/saschb2b/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/engineering/mcp-server .claude/skills/mcp-server
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Mcp Server в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Mcp Server, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Mcp Server не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Build and maintain an MCP server

Scaffolding an MCP server is the easy 10%. The heavy lifting is everything after init: writing tool definitions the agent reads correctly, extending the surface without breaking agents that already depend on it, defending against tool poisoning and prompt injection, and operating the thing once it is remote. This skill covers the whole lifecycle. The deep reference for each phase is the vendored OKF bundle in references/; SKILL.md is the procedure.

Target the current protocol

MCP uses date-string protocol revisions. As of 2026-06-21 the current stable revision is 2025-11-25 (it superseded 2025-06-18); a stateless-core revision 2026-07-28 is the imminent next release. Build against 2025-11-25 and let the SDK negotiate older clients. The production SDK is @modelcontextprotocol/sdk (v1.x, TypeScript). The split @modelcontextprotocol/server + /client packages are the unreleased V2 line, not current. Full protocol surface, lifecycle, and result shapes in protocol.md.

Step 1: Pick the transport

UseTransportWhy
Local, client spawns the server as a subprocess, one userstdioNo auth, no sessions, no scaling. Default for local tools. Log to stderr only.
Remote, hosted, multiple clientsStreamable HTTPSingle endpoint (POST + optional SSE upgrade), Mcp-Session-Id, OAuth, you own scaling and ops.

Prefer stdio until you genuinely need remote multi-client access. The old HTTP+SSE transport is deprecated (replaced by Streamable HTTP in 2025-03-26). Transport mechanics, the stdio-vs-HTTP operational cliff, and sessions are in protocol.md and maintenance.md.

Step 2: The five layers

Every server, regardless of target, has the same skeleton:

  1. Server & transport (src/index.ts) — entry point, lifecycle, cleanup, chosen transport.
  2. Tool definitions (src/tool-definitions.ts) — the contract the agent reads to decide what to call. The single most important file.
  3. Router & handlers (src/tool-router.ts, src/handlers/*.ts) — dispatch, validation, response shaping.
  4. The bridge (src/executor.ts, scripts/*) — how you actually talk to the target. 80% of the work.
  5. Security & validation (src/utils.ts) — input validation, execFile over exec, path checks, tool filtering.

Single production dependency: @modelcontextprotocol/sdk (plus zod for schemas). TypeScript, ESLint, and the test runner are dev-only.

Step 3: Identify the bridge — this decides everything else

Ask how the target lets you automate it:

Target offersBridge patternExample
Scripting API (Lua, GDScript, Python)Subprocess + script-injection dispatcher in the target's languageAseprite (Lua), Godot (GDScript)
REST / HTTP APIfetch calls from handlersAny web service
Rich CLIexecFile directlyFFmpeg, ImageMagick
Socket / TCP / WebSocket serverPersistent connection, state in a shared contextGodot interactive mode
Native SDKDirect import if Node-compatibleSQLite, native modules

If two patterns apply, prefer the lower-state one (subprocess over persistent socket). State means lifecycle management.

Step 4: Write ONE tool end to end before anything else

Do not define 50 tools up front. Pick the simplest useful operation (get_version, create_file), wire it through all five layers with the SDK's registerTool(name, { description, inputSchema, annotations }, handler), then watch an agent call it in the Inspector:

npx @modelcontextprotocol/inspector node build/index.js

If the tool list reads as confusing to you, it reads as confusing to the agent. Once one tool works, adding more is mechanical.

Writing tools agents actually use

The description is the only documentation the agent has, and tool definitions cost tokens on every request before the user speaks. Anthropic's guidance (tool-design.md) in four rules:

  1. Build few high-impact workflow tools, do not wrap every API endpoint. Consolidate list_users + list_events + create_event into one schedule_event. More tools confuse the agent and burn its context.
  2. Write the description like onboarding a new hire. Precise verbs, precise parameter names (user_id not user), enums over free strings, required vs optional marked and defaults documented.
  3. Return high-signal context. Natural-language names over opaque UUIDs; paginate, filter, and truncate large results; offer a response_format enum (concise/detailed) instead of always dumping everything.
  4. Set annotations truthfully — readOnlyHint, destructiveHint, idempotentHint, openWorldHint — and surface tool failures as isError: true with an actionable message so the model self-corrects.

Extending without breaking agents

Adding a tool touches four places: the definition, the handler, the HANDLER_MAP entry, and the bridge operation (if Layer 4 uses one). Document this in CONTRIBUTING.md so contributors don't drift.

Evolving an existing tool is where servers break their consumers. Additive is safe (new tools, new optional params, adding outputSchema). Breaking is not (removing or renaming a tool, adding a required param, narrowing a type, or silently changing semantics). MCP has no formal tool-deprecation flag, so the sanctioned path is name-versioning: ship export_v2, keep export working, mark export deprecated in its description. Fire notifications/tools/list_changed when the set changes. The full versioning, deprecation, _meta, toolsets, pagination, and observability playbook is in maintenance.md.

Security non-negotiables

MCP servers run with real privileges and read agent-influenced, attacker-reachable input. The minimum bar (full threat model and OAuth in security.md):

  • execFile/spawn, never exec. Args as an array, no shell string interpolation. Allowlist binaries.
  • Validate every path and input. Resolve to absolute and verify it stays under the intended base; reject .. before passing to the bridge.
  • Secrets via env vars, never CLI args (args leak through ps / /proc). stdio servers read credentials from the environment.
  • Remote servers: OAuth 2.1. Validate the token audience (RFC 8707) — token passthrough is forbidden. Validate the Origin header (DNS rebinding) and bind local HTTP to 127.0.0.1.
  • Treat tool descriptions AND tool results as untrusted. Tool poisoning, line jumping, and rug pulls all hide instructions where the agent reads them; keep destructive actions behind human approval.

Test, debug, publish

  • Test with the MCP Inspector (npx @modelcontextprotocol/inspector ...), unit-test handlers, and run an eval-driven loop on tool quality. stdio servers must log to stderr — a stray stdout write corrupts the JSON-RPC stream. See testing.md.
  • Publish via server.json (reverse-DNS name, immutable version) to the registry, and give consumers the mcpServers config block; MCPB (formerly DXT) packs a one-click local install. See publishing.md.

Reference bundle

The post-init knowledge lives in references/ as a conformant OKF bundle:

  • protocol.md — spec revision, transports, lifecycle, primitives, result shapes, annotations, SDKs.
  • tool-design.md — Anthropic's effective-tools guidance, naming, structured output, errors, context budget, code execution.
  • security.md — the threat model, OAuth 2.1 authorization, hardening, supply chain, OWASP MCP Top 10.
  • maintenance.md — versioning, deprecation, list_changed, toolsets, pagination, observability, ops, pitfalls.
  • testing.md — the Inspector, the stderr rule, test layers, eval-driven tool optimization.
  • publishing.md — the registry, server.json, distribution channels, the consumer config block, MCPB.

Source

Based on How to Build an MCP Server, widened to the full lifecycle against the MCP 2025-11-25 spec. Reference implementations at godot-mcp and aseprite-mcp.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Mcp Server?

Build, extend, and maintain a Model Context Protocol (MCP) server across its whole lifecycle against the current spec and official SDKs. Covers the architecture, choosing a transport (stdio vs Streamable HTTP), writing tool definitions agents actually use, adding tools without breaking existing agents, versioning and deprecation, the security threat model (tool poisoning, token passthrough, prompt injection, OAuth), testing with the MCP Inspector, and publishing to the registry. Use when building an MCP server, exposing a CLI, API, or app to AI agents (Claude Code, Cursor, Cline, Windsurf),...

Навіщо використовувати Mcp Server у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Mcp Server — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Mcp Server у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/saschb2b/skills/tree/main/skills/engineering/mcp-server. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Mcp Server?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Mcp Server?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Mcp Server — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Mcp Server?

Так. Навичку опубліковано на GitHub: saschb2b, за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇