Token导航 LogoToken导航TokenDH.com
Agenthub MCP Server Runtime logo
数据服务未说明官方级别未说明来源级核验

Agenthub MCP Server Runtime

MCP Server

一个通过Model Context Protocol协议暴露AgentHub功能(技能、知识库、提示)的服务器,供外部系统如Claude Desktop、IDE和其他代理使用。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
代理服务GoClaudeClaude DesktopClaude

安装说明

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

作者 / 组织

AgentHub-Studio

提供方

AgentHub-Studio

最后核验

2026/5/17 20:21

快速接入

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

详细介绍

AgentHub MCP服务器运行时

MCP 服务器 通过协议展示AgentHub的功能(技能,知识库,提示) 模型上下文协议允许Claude Desktop、IDE和其他代理等外部系统消耗平台的功能。

概览

Claude Desktop / IDE / Agente externo
        │ (stdio ou HTTP)
        ▼
agenthub-mcp-server-runtime
        │
        ├── GET /api/skills?status=ACTIVE ───► agenthub-backend:8080
        ├── GET /api/knowledge-bases ─────────► agenthub-backend:8080
        └── POST /api/v1/skills/invoke ───────► agenthub-skill-runtime:8082

展示的能力

MCP 类型AgentHub 来源描述
工具活跃技能每个技能变成一个MCP工具 inputSchema
资源知识库URI: agenthub://kb/{id}
提示硬编码常见操作模板

可用提示

  • pesquisar-conhecimento 知识库中的语义搜索
  • executar-skill 使用JSON参数运行技能

配置

所有设置都是通过环境变量进行的:

变量描述标准
AGENTHUB_TENANT_ID这是强制性的。 UUID做租户--
AGENTHUB_BACKEND_URLURL做代理中心后端http://agenthub-backend:8080
AGENTHUB_SKILL_RUNTIME_URLURL做代理中心技能运行时http://agenthub-skill-runtime:8082
AGENTHUB_API_TOKENBearer token 用于身份验证
STDIO_MODE 以 stdio 模式启动 true
HTTP_PORTHTTP服务器端口(0=禁用)

运输方式

标准模式( 默认 - Claude Desktop)

服务器从stdin中读取JSON-RPC请求,并将响应写入stdout。 非常适合与 Claude Desktop 集成,它将服务器作为子进程启动。

// ~/.config/claude/claude_desktop_config.json
{
  "mcpServers": {
    "agenthub": {
      "command": "/caminho/para/mcp-server-runtime",
      "env": {
        "AGENTHUB_TENANT_ID": "seu-tenant-uuid",
        "AGENTHUB_BACKEND_URL": "http://localhost:8080",
        "AGENTHUB_SKILL_RUNTIME_URL": "http://localhost:8082",
        "AGENTHUB_API_TOKEN": "seu-token",
        "STDIO_MODE": "true"
      }
    }
  }
}

HTTP 模式( 容器化环境)

当......的时候 HTTP_PORT 设置后,服务器还会暴露HTTP端点:

# Iniciar em modo HTTP puro
AGENTHUB_TENANT_ID=uuid STDIO_MODE=false HTTP_PORT=8080 ./mcp-server-runtime

# Health check
curl http://localhost:8080/health

# Enviar requisição JSON-RPC
curl -X POST http://localhost:8080/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

使用范例

启动握手

// Requisição
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude","version":"1.0"}}}

// Resposta
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{},"resources":{},"prompts":{}},"serverInfo":{"name":"agenthub-mcp-server-runtime","version":"1.0.0","protocolVersion":"2024-11-05"}}}

Listar工具(技能)

// Requisição
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}

// Resposta
{"jsonrpc":"2.0","id":2,"result":{"tools":[{"name":"document-search","description":"Busca semântica em documentos","inputSchema":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"integer"}},"required":["query"]}}]}}

调用工具(技能)

// Requisição
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"document-search","arguments":{"query":"arquitetura do AgentHub","limit":5}}}

// Resposta
{"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"{\"documents\":[...]}"}],"isError":false}}

列表资源(知识库)

// Requisição
{"jsonrpc":"2.0","id":4,"method":"resources/list","params":{}}

// Resposta
{"jsonrpc":"2.0","id":4,"result":{"resources":[{"uri":"agenthub://kb/123e4567-e89b-12d3-a456-426614174000","name":"Base de Documentação","description":"Documentação técnica do AgentHub","mimeType":"application/json"}]}}

构建

# Baixar dependências
make deps

# Compilar
make build

# Executar testes
make test

# Build Docker
make docker-build

# Executar Docker (definir variáveis primeiro)
TENANT_ID=uuid BACKEND_URL=http://localhost:8080 SKILL_RUNTIME_URL=http://localhost:8082 make docker-run

室内 建筑

cmd/server/main.go              # Entry point, config, shutdown graceful
internal/
├── mcp/
│   ├── tipos.go                # Tipos JSON-RPC 2.0 e MCP (em pt-BR)
│   ├── protocolo.go            # Loop de leitura/escrita stdio
│   └── servidor.go             # Dispatcher central de métodos MCP
├── backend/
│   ├── tipos.go                # DTOs do agenthub-backend
│   └── cliente.go              # HTTP client para o backend
├── skill_runtime/
│   └── cliente.go              # HTTP client para o skill-runtime
├── handler/
│   ├── ferramentas.go          # tools/list + tools/call
│   ├── recursos.go             # resources/list + resources/read
│   └── prompts.go              # prompts/list + prompts/get
└── api/
    └── http.go                 # Servidor HTTP Gin (transporte alternativo)

支持的 MCP 方法

方法描述
initialize初始握手与能力谈判
notifications/initialized 客户确认(无回复)
tools/list 列出活动技能,如MCP工具。
tools/call通过技能运行库调用技能
resources/list列出MCP资源的知识库
resources/read 从知识库中读取元数据
prompts/list 治愈的提示列表。
prompts/get获取带有参数的渲染提示符

技术栈

  • 转到1.24
  • Gin v1.9.1 HTTP 服务器
  • net/http --客户端HTTP准后端e技能运行时
  • 通过 stdio 或 HTTP 的 JSON-RPC 2.0 MCP 协议

MIT许可证

目录标签

目录标签

代理服务GoClaude本地部署技能调用知识库管理JSON-RPC协议HTTP服务

支持客户端

Claude DesktopClaude

接入字段

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

未说明

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

token

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明token部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP