⚖ Compare news

Put up to three stories side by side. Pick IDs from any article URL: /compare?id=123&id=456

MCP-сервер поверх своего REST API без SDK: что видит модель и где она ломает данные

habrahabr.ru ·Russian Federation · world
Words
49
Chars
366
AI summary
Yes
Full story

A write-up walks through building a small MCP server in plain Node.js without an SDK on top of an existing REST API. The server uses stdio transport and returns errors through isError. It also covers annotations for dangerous tools, protection against model 'fixes,' partial success in batch operations, and images in responses.

Model Context Protocol (MCP) позволяет агенту вроде Claude Code или Cursor вызывать внешние инструменты. Разбираю небольшой MCP-сервер на чистом Node.js без SDK поверх существующего REST API: транспорт stdio, ошибки через isError, аннотации опасных инструментов, защиту от «исправлений» модели, частичный успех в пакетных операциях и картинки в ответах. Читать далее

Open article