Skip to main content
Glama

Invok Bridge (Go)

一个用 Go 编写的轻量级 MCP(模型上下文协议)服务器,充当任何兼容 MCP 的 IDE 客户端与 Invok Spring Boot 后端之间的桥梁。

它将 JSON-RPC over stdio(MCP 标准)转换为对 Invok API 的普通 HTTP REST 调用,反之亦然。

之前的 Node.js/TypeScript 实现已被弃用,转而采用此 Go 版本,因为它在受限的 IDE 环境(如 Antigravity 和 Claude Desktop)中具有通用兼容性,在这些环境中,nodenpxtsx 等运行时依赖项通常不可用。

为什么选择 Go?

  • 零运行时依赖 — 一次编译,随处运行。没有 Node,没有 npm,没有 PATH 问题。

  • 单一二进制文件 — 一个可执行文件,易于分发。

  • 与 IDE 无关 — 在 Antigravity、Claude Desktop、VS Code 和任何其他 MCP 客户端中工作方式相同。

  • 快速启动 — 无 JVM 预热,无包加载。

Related MCP server: Binalyze AIR MCP Server

先决条件

  • Go 1.21+ — 仅在从源代码构建时需要。

  • 一个正在运行的 Invok 实例(默认:http://localhost:8080)。

快速入门

选项 A:使用预编译的二进制文件

本仓库包含一个适用于 macOS (darwin/arm64) 的预编译 invok-mcp 二进制文件。只需使其可执行:

chmod +x invok-mcp

选项 B:从源代码构建

git clone https://github.com/Vrivaans/handsai-bridge.git
cd handsai-bridge
go build -o invok-mcp main.go

配置

默认情况下,该桥接器连接到 http://localhost:8080

要更改端口或主机,请在与二进制文件相同的目录中创建一个 config.json 文件:

{
  "handsaiUrl": "http://localhost:9090"
}

如果文件不存在,则自动使用默认值。

IDE 集成

Antigravity / Claude Desktop / 任何 MCP 客户端

将以下内容添加到您的 mcp_config.json (Antigravity) 或 claude_desktop_config.json (Claude Desktop) 中:

{
  "mcpServers": {
    "invok": {
      "command": "/absolute/path/to/invok-mcp",
      "args": ["mcp"]
    }
  }
}

重要提示: 请使用二进制文件的绝对路径。某些 IDE 客户端需要 args: ["mcp"] 字段才能正确注册服务器。

工作原理

IDE (MCP Client)  →  stdio JSON-RPC  →  invok-mcp (Go)  →  HTTP  →  Invok (Spring Boot)
  1. IDE 将 invok-mcp 作为子进程启动。

  2. 桥接器逐行从 stdin 读取 JSON-RPC 消息。

  3. 对于 tools/list,它调用 Invok 上的 GET /mcp/tools/list

  4. 对于 tools/call,它调用 Invok 上的 POST /mcp/tools/call

  5. 响应作为 JSON-RPC 写回 stdout

交叉编译

从 macOS 为其他平台构建:

# Linux (amd64)
GOOS=linux GOARCH=amd64 go build -o invok-mcp-linux main.go

# Windows
GOOS=windows GOARCH=amd64 go build -o invok-mcp.exe main.go

# macOS Intel
GOOS=darwin GOARCH=amd64 go build -o invok-mcp-intel main.go

相关项目

  • Invok — 此桥接器连接到的 Spring Boot 后端。

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A Node.js server that implements Model Context Protocol (MCP) for controlling HWP (Korean word processor) documents, allowing AI assistants like Claude to create and manipulate Hangul documents.
    266
    -
  • A
    license
    C
    quality
    D
    maintenance
    A Node.js server implementing Model Context Protocol (MCP) that enables natural language interaction with Binalyze AIR's digital forensics and incident response capabilities.
    100
    52 npm
    7
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A Node.js/TypeScript MCP server that facilitates interactive communication between LLMs and users, allowing AI assistants to request user input, display notifications, and manage command-line chat sessions.
    5
    23 npm
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server designed for learning and experimentation. It provides a foundational setup for developers to build, run, and debug MCP server implementations using Node.js.
    -