Token导航 LogoToken导航TokenDH.com
Agenthub MCP Client Runtime logo
AI代理stdio官方级别未说明来源级核验

Agenthub MCP Client Runtime

MCP Server

MCP Client Runtime是一个Go语言实现的客户端,用于连接外部MCP服务器并通过gRPC为Java后端提供接口,支持工具、提示和资源的发现与执行。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
资源管理GoDocker

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

AgentHub-Studio

提供方

AgentHub-Studio

最后核验

2026/5/17 20:21

运行时

Docker

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

docker run -p 50051:50051 -p 8080:8080 agenthub-mcp-client-runtime

详细介绍

AgentHub MCP Client Runtime (Go)

MCP Client Runtime - Cliente Go para conectar em servidores MCP externos e expor via gRPC para o backend Java.

📋 Visão Geral

O MCP Client Runtime permite que o AgentHub se conecte a servidores Model Context Protocol (MCP) externos, descobrindo e executando suas capabilities (tools, prompts, resources).

🏗️ Arquitetura

┌────────────────────────────────────────────────────────────┐
│                  AgentHub Platform                          │
├────────────────────────────────────────────────────────────┤
│                                                              │
│  ┌────────────────┐         ┌──────────────────┐           │
│  │  Skill Runtime │────────>│  MCP Client      │           │
│  │  (Java)        │  gRPC   │  Runtime (Go)    │           │
│  │                │         │                  │           │
│  │  - Tools       │         │  - MCP Protocol  │           │
│  │  - Skills      │         │  - Stdio Client  │           │
│  └────────────────┘         │  - gRPC Server   │           │
│                              └────────┬─────────┘           │
│                                       │                     │
│                                       │ stdio               │
│                                       │                     │
│                              ┌────────v─────────┐           │
│                              │  External MCP    │           │
│                              │  Servers         │           │
│                              │                  │           │
│                              │  - filesystem    │           │
│                              │  - github        │           │
│                              │  - slack         │           │
│                              │  - custom...     │           │
│                              └──────────────────┘           │
│                                                              │
└────────────────────────────────────────────────────────────┘

🚀 Funcionalidades

1. MCP Client (stdio transport)

  • ✅ Conectar a servidores MCP via stdio (subprocess)
  • ✅ Implementar protocolo JSON-RPC 2.0
  • ✅ Gerenciar lifecycle de processos (spawn, kill, restart)
  • ✅ Handle input/output streams

2. Discovery

  • ✅ Listar tools disponíveis no servidor MCP
  • ✅ Listar prompts disponíveis
  • ✅ Listar resources disponíveis
  • ✅ Schema validation (JSON Schema)

3. Execution

  • ✅ Executar tools com parâmetros
  • ✅ Executar prompts com variáveis
  • ✅ Ler resources
  • ✅ Streaming support (se aplicável)

4. gRPC Bridge

  • ✅ Expor API gRPC para Java backend
  • ✅ Conversão de tipos Go ↔ Protobuf
  • ✅ Error handling e retries
  • ✅ Connection pooling

📦 Estrutura do Projeto

agenthub-mcp-client-runtime/
├── cmd/
│   └── server/
│       └── main.go              # Entry point da aplicação
├── internal/
│   ├── mcp/
│   │   ├── client.go            # MCP client (stdio transport)
│   │   ├── protocol.go          # JSON-RPC 2.0 protocol
│   │   └── types.go             # MCP types (Tool, Prompt, Resource)
│   ├── grpc/
│   │   ├── server.go            # gRPC server implementation
│   │   └── handler.go           # gRPC request handlers
│   └── api/
│       └── http.go              # HTTP API (health check, discovery)
├── pkg/
│   └── mcpclient/
│       └── client.go            # Public client interface
├── proto/
│   └── mcpclient.proto          # Protobuf definitions
├── go.mod
├── go.sum
├── Dockerfile
├── Makefile
└── README.md

🔧 Tecnologias

  • Go 1.24+ - Linguagem principal
  • gRPC - Comunicação com backend Java
  • Protocol Buffers - Serialização de dados
  • JSON-RPC 2.0 - Protocolo MCP
  • Gin - HTTP server (health checks)

📝 APIs

gRPC API

service MCPClientService {
  // Descobrir capabilities de um servidor MCP
  rpc DiscoverCapabilities(DiscoverRequest) returns (DiscoverResponse);
  
  // Executar um tool
  rpc ExecuteTool(ExecuteToolRequest) returns (ExecuteToolResponse);
  
  // Executar um prompt
  rpc ExecutePrompt(ExecutePromptRequest) returns (ExecutePromptResponse);
  
  // Ler um resource
  rpc ReadResource(ReadResourceRequest) returns (ReadResourceResponse);
}

HTTP API (complementar)

  • GET /health - Health check
  • GET /servers - Listar servidores MCP conectados
  • POST /servers - Registrar novo servidor MCP

🚀 Quick Start

Compilar

make build

Executar

./bin/mcp-client-runtime

Docker

docker build -t agenthub-mcp-client-runtime .
docker run -p 50051:50051 -p 8080:8080 agenthub-mcp-client-runtime

🔌 Integração com Skill Runtime

O Skill Runtime (Java) se conecta ao MCP Client Runtime via gRPC:

// Java - Skill Runtime
MCPClientServiceGrpc.MCPClientServiceBlockingStub stub = 
    MCPClientServiceGrpc.newBlockingStub(channel);

// Descobrir capabilities
DiscoverResponse response = stub.discoverCapabilities(
    DiscoverRequest.newBuilder()
        .setServerName("filesystem")
        .build()
);

// Executar tool
ExecuteToolResponse result = stub.executeTool(
    ExecuteToolRequest.newBuilder()
        .setServerName("filesystem")
        .setToolName("read_file")
        .putParameters("path", "/etc/hosts")
        .build()
);

📚 Servidores MCP Suportados

Oficiais

  • @modelcontextprotocol/server-filesystem - Operações de filesystem
  • @modelcontextprotocol/server-github - GitHub API
  • @modelcontextprotocol/server-git - Git operations
  • @modelcontextprotocol/server-slack - Slack integration

Custom

  • Qualquer servidor que implemente MCP protocol via stdio

🔐 Segurança

  • ✅ Validação de inputs (JSON Schema)
  • ✅ Sandboxing de processos
  • ✅ Timeouts configuráveis
  • ✅ Rate limiting
  • ✅ Resource limits (CPU, memory)

📊 Observabilidade

  • ✅ Structured logging (JSON)
  • ✅ OpenTelemetry traces
  • ✅ Prometheus metrics
  • ✅ Health checks

🧪 Testes

make test

📖 Documentação Adicional


MIT License

目录标签

目录标签

资源管理GoDockerMCP协议本地部署gRPC桥接工具执行

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Docker

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP