
aashari/boilerplate-mcp-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
aashari/boilerplate-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/aashari/boilerplate-mcp-server.
Обзор
aashari/boilerplate-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/aashari/boilerplate-mcp-server.
Обзор (машинный перевод)
Готовая к производству основа для разработки пользовательских серверов Model Context Protocol (MCP) в TypeScript. Обеспечивает полный многоуровневый шаблон архитектуры, реализацию рабочих примеров и всеобъемлющую инфраструктуру разработчиков для подключения помощников ИИ к внешним API и источникам данных.
** Последнее обновление (февраль 2026)**: обновлено до MCP SDK 1.26.0 и Zod 4.3.6 с продолжением современных шаблонов registerTool и потоковыми улучшениями HTTP. Подробнее см. docs/MODERNIZATION.md.
Особенности
Security First: защита от перебиндинга DNS, связывание только с локальным хостом, безопасная обработка ошибок ** Поддержка двойного транспорта**: STDIO и потоковые HTTP-перевозки с автоматическим резервным копированием Сложная архитектура: Чистое разделение между CLI, инструментами, ресурсами, подсказками, контроллерами, услугами и утилитами ** Безопасность типов**: полная реализация TypeScript с валидацией схемы Zod v4.3.6
- ** Все Примитивы MCP**: Инструменты, ресурсы и подсказки (с примерами) ResourceLink Pattern: Токен-эффективные ссылки на ресурсы для больших ответов Toon Output Format: Token-Oriented Object Notation на 30-60% меньше, чем у JSON
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Boilerplate MCP Server
A production-ready foundation for developing custom Model Context Protocol (MCP) servers in TypeScript. Provides a complete layered architecture pattern, working example implementation, and comprehensive developer infrastructure to connect AI assistants with external APIs and data sources.
Latest Update (Feb 2026): Updated to MCP SDK 1.26.0 and Zod 4.3.6 with continued modern
registerToolpatterns and streamable HTTP improvements. See docs/MODERNIZATION.md for details.
Features
- Security First: DNS rebinding protection, localhost-only binding, secure error handling
- Dual Transport Support: STDIO and Streamable HTTP transports with automatic fallback
- Layered Architecture: Clean separation between CLI, tools, resources, prompts, controllers, services, and utilities
- Type Safety: Full TypeScript implementation with Zod v4.3.6 schema validation
- All MCP Primitives: Tools, resources, and prompts (with examples)
- ResourceLink Pattern: Token-efficient resource references for large responses
- TOON Output Format: Token-Oriented Object Notation for 30-60% fewer tokens than JSON
- JMESPath Filtering: Extract only needed fields from responses to reduce token costs
- Raw Response Logging: Automatic logging of large API responses to
/tmp/mcp//with truncation guidance - Modern SDK: Uses MCP SDK v1.26.0 with
registerToolAPI pattern (ready for v2 migration) - Complete IP Address Example: Tools, resources, prompts, and CLI commands for IP geolocation
- Comprehensive Testing: Unit and integration tests with coverage reporting (47 tests passing)
- Production Tooling: ESLint, Prettier, semantic-release, and MCP Inspector integration
- Error Handling: Structured error handling with
isErrorfield and contextual logging - Security Documentation: Complete SECURITY.md with authentication implementation guides
What is MCP?
Model Context Protocol (MCP) is an open standard for securely connecting AI systems to external tools and data sources. This boilerplate implements the MCP specification with a clean, layered architecture that can be extended to build custom MCP servers for any API or data source.
Prerequisites
- Node.js (>=20.x): Download
- Git: For version control
Quick Start
# Clone the repository
git clone https://github.com/aashari/boilerplate-mcp-server.git
cd boilerplate-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Run in different modes:
# 1. CLI Mode - Execute commands directly
npm run cli -- get-ip-details 8.8.8.8
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →