Skip to main content
Glama

海姆达尔

Heimdall 是一款轻量级的本地MCP 服务器管理服务,只需一个npx命令即可安装。您可以为您的 MCP 客户端授权特定的 MCP 服务器工具,并且您设备上的所有 MCP 客户端都可以访问相同的配置。

安装

⚠️ 注意:我们强烈建议您在安装之前备份您的 MCP 服务器配置,以防止意外丢失凭据。

安装脚本执行几个关键操作:

  • mcpServers配置 JSON 从您指定的路径移动到~/.heimdall/config.json
  • heimdall插入一个配置来代替之前的mcpServers配置路径
  • 初始化~/.heimdall/controls.json中的控件以授权所有当前服务器上的所有方法

请参阅配置以了解修改~/.heimdall/controls.json以限制给定服务器的授权工具以及将新服务器添加到~/.heimdall/config.json步骤。

通过 NPX(推荐)

  1. 运行安装脚本(如果没有给出路径则生成一个空配置):
npx @shinzolabs/heimdall setup <optional: path/to/current/config.json>

通过本地实例

  1. 下载软件包:
git clone https://github.com/shinzo-labs/heimdall.git
  1. 安装并构建依赖项:
cd heimdall && pnpm i && pnpm build
  1. 运行安装脚本(如果没有给出路径则生成一个空配置):
pnpm run setup <optional: path/to/current/config.json> <optional: path to `index.js` file in local Heimdall instance, ex. `/path/to/local/heimdall/dist/index.js`>

配置

编辑服务器列表

要添加或更新可用服务器,只需将~/.heimdall/config.json中的配置更新为常规mcpServers配置 JSON 即可。请注意,除非您将服务器和授权工具也添加到~/.heimdall/controls.json中,否则您将无法通过 Heimdall 查看新服务器的工具。

编辑授权工具

要将授权工具添加到新的或现有的服务器,请根据需要将它们添加到~/.heimdall/controls.json中,Heimdall 将在几秒钟后更新其内部配置。如果您的 MCP 客户端支持动态工具列表缓存,您应该会看到它自动更新授权工具。其他客户端(例如 Claude Desktop)可能需要重启才能看到新的工具。

这是~/.heimdall/controls.json的架构:

{ "authorizedMcpServers": { "server1": { "authorizedTools": [ "tool1", "tool2", ... ] }, "server2": { "authorizedTools": [ "tool1", "tool2", ... ] }

多个 MCP 客户端

如果您在设备上运行多个 MCP 客户端,则可以为每个新客户端设置以下config.json ,以便在所有客户端上启用相同的授权工具(假设 Heimdall 已在设备上设置):

{ "mcpServers": { "heimdall": { "command": "npx", "args": [ "@shinzolabs/heimdall" ] } } }

故障排除

可用工具

部分 MCP 客户端会限制客服人员在同一时间可用的工具数量。例如,Cursor 在所有服务器中仅支持最多 40 个工具,因此controls.jsonauthorizedTools的数量总和不能超过该数量。

日志记录

有关正在运行的实例的日志,请转到~/.heimdall/logs 。每个 MCP 客户端的 Heimdall 实例及其子服务器的日志都存储在由随机 UUID 标识的单独目录中。

孤立子进程

如果您的 MCP 客户端意外关闭,或在关闭前未能向 Heimdall 发送正确的SIGTERM信号,则之后您的设备上可能仍有孤立的node (和npm )进程在运行。目前,这些进程必须手动强制停止。如果您的设备上没有其他敏感的node进程在运行,您可以使用以下命令进行后续清理:

pkill -aif node

贡献

欢迎并鼓励您积极投稿。如有任何疑问、意见或顾虑,请联系austin@shinzolabs.com

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Heimdall 是一款轻量级的本地 MCP 服务器管理服务,只需一个 npx 命令即可安装。您可以为您的 MCP 客户端授权特定的 MCP 服务器工具,并且您设备上的所有 MCP 客户端都可以访问相同的配置。

  1. 安装
    1. 通过 NPX(推荐)
    2. 通过本地实例
  2. 配置
    1. 编辑服务器列表
    2. 编辑授权工具
    3. 多个 MCP 客户端
  3. 故障排除
    1. 可用工具
    2. 日志记录
    3. 孤立子进程
  4. 贡献

    Related MCP Servers

    • A
      security
      A
      license
      A
      quality
      An MCP server to run commands.
      Last updated -
      2
      265
      150
      TypeScript
      MIT License
      • Apple
    • A
      security
      A
      license
      A
      quality
      A MCP server for managing and storing code snippets in various programming languages, allowing users to create, list, and delete snippets via a standardized interface.
      Last updated -
      3
      4
      JavaScript
      MIT License
    • -
      security
      A
      license
      -
      quality
      Provides quick access to local system utilities including time/date, hostname, public IP, directory listings, Node.js version, and port usage through an MCP server interface compatible with Cursor and other MCP clients.
      Last updated -
      2
      JavaScript
      MIT License
      • Apple
      • Linux
    • -
      security
      -
      license
      -
      quality
      A server that interfaces with the Hedera Testnet Mirror Node API, converting its OpenAPI-defined endpoints into MCP-compatible tools that can be accessed over Server-Sent Events (SSE).
      Last updated -
      TypeScript

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/shinzo-labs/heimdall'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server