
trpc-group/trpc-mcp-go
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
trpc-group/trpc-mcp-go - кандидат на сервер MCP, импортированный из https://github.com/trpc-group/trpc-mcp-go.
Обзор
trpc-group/trpc-mcp-go - кандидат на сервер MCP, импортированный из https://github.com/trpc-group/trpc-mcp-go.
Обзор (машинный перевод)
Реализация протокола Model Context Protocol (MCP) с полной поддержкой потокового HTTP. Эта библиотека обеспечивает эффективную связь между клиентскими приложениями и инструментами/ресурсами.
Особенности
Основные характеристики
** Полная поддержка спецификаций MCP**: реализует MCP, поддерживая версии протоколов до 2025-03-26 (по умолчанию до 2024-11-05 для совместимости с клиентами в примерах). ** Поддержка потокового вещания**: потоковая передача данных в режиме реального времени с помощью событий, отправленных сервером (SSE)
- Tool Framework: Регистрируйте и выполняйте инструменты со структурированной обработкой параметров Первый структурный API: Генерировать схемы автоматически из конструкций Go с безопасностью типа ** Управление ресурсами**: Обслуживание текстовых и бинарных ресурсов с помощью RESTful интерфейсов Быстрые шаблоны: Создание и управление быстрыми шаблонами для взаимодействия LLM Уведомления о ходе работы: Встроенная поддержка обновлений прогресса в долгосрочных операциях ** Система регистрации **: Интегрированная регистрация с настраиваемыми уровнями
Транспортные опции
trpc-mcp-go поддерживает три транспортных механизма для различных сценариев развертывания:
####СТДИО Транспорт Use Case: локальная интеграция, средства командной строки, кросс-языковая совместимость
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
tRPC MCP Go: Model Context Protocol Implementation with Streaming HTTP Support
A Go implementation of the Model Context Protocol (MCP) with comprehensive streaming HTTP support. This library enables efficient communication between client applications and tools/resources.
Features
Core Features
- Full MCP Specification Support: Implements MCP, supporting protocol versions up to 2025-03-26 (defaulting to 2024-11-05 for client compatibility in examples).
- Streaming Support: Real-time data streaming with Server-Sent Events (SSE)
- Tool Framework: Register and execute tools with structured parameter handling
- Struct-First API: Generate schemas automatically from Go structs with type safety
- Resource Management: Serve text and binary resources with RESTful interfaces
- Prompt Templates: Create and manage prompt templates for LLM interactions
- Progress Notifications: Built-in support for progress updates on long-running operations
- Logging System: Integrated logging with configurable levels
Transport Options
trpc-mcp-go supports three transport mechanisms for different deployment scenarios:
STDIO Transport
- Use Case: Local integrations, command-line tools, cross-language compatibility
- Communication: Standard input/output streams with JSON-RPC
- Process Model: Client launches server as subprocess
- Benefits: Simple, cross-platform, supports TypeScript/Python servers
Streamable HTTP Transport (Recommended)
- Use Case: Web integrations, multi-client servers, production deployments
- Communication: HTTP POST requests with optional SSE streaming
- Features: Session management, resumable connections, scalability
- Response Modes:
- JSON responses for simple request-response
- SSE streaming for real-time operations
- Server Notifications: Optional GET SSE endpoint for server-initiated messages
SSE Transport (Legacy)
- Use Case: Backward compatibility with MCP protocol version 2024-11-05
- Communication: HTTP POST requests + dedicated SSE endpoint for server messages
- Features: Always stateful with session management and persistent SSE connections
- Status: Deprecated in favor of Streamable HTTP, maintained for compatibility
Connection Modes
Streamable HTTP Transport supports multiple connection modes:
- Stateless: Simple request-response pattern without persistent sessions
- Stateful: Session management with user context and persistent connections
SSE Transport is always stateful by design with persistent connections.
STDIO Transport uses process-based communication (no HTTP sessions).
Experimental Tasks client
See Tasks client scope, usage and validation for the opt-in SEP-2663 client and explicit stateless HTTP discovery.
Installation
go get trpc.group/trpc-go/trpc-mcp-go
Quick Start
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →