Yggdrasil
MCP ServersMCP 伺服器 SKILLs技能 PlugIns解決方案 Asgard AI SolutionAsgard AI 方案 Submit Listing申請上架 GitHub
H

Heimdall Heimdall

Released已發布
data global

Heimdall — an MCP (Model Context Protocol) server that exposes read-only tools for Asgard's content management platform.

Heimdall — Asgard 內容管理平台的 MCP (Model Context Protocol) 伺服器,提供只讀工具。

Status狀態
released
Tools工具數
26
Category分類
data
Region地區
global
Maintainer維護者
GitHub

Features功能特色

  • 26 MCP tools covering workspace, article, avatar, account, app, blob, content source, mission, publication, and topic resources
  • Read-only tool surface for safe AI assistant access
  • Bearer token authentication through HEIMDALL_API_TOKEN
  • Public-safe configuration through environment variables and .env.example
  • stdio transport for local MCP clients

See docs/tools.md for the full public tool reference.


  • 23 個 MCP 工具,涵蓋工作區、文章、頭像、帳戶、應用程式、Blob、內容源、任務、發佈物和主題資源
  • 只讀工具介面,讓 AI assistant 安全存取
  • 透過 HEIMDALL_API_TOKEN 進行 Bearer token 認證
  • 透過環境變數與 .env.example 提供公開安全的設定方式
  • 使用 stdio transport 支援本機 MCP client

完整工具清單請見 docs/tools.md


Quick Start快速開始

Install

pip install mcp-heimdall

Run with uvx without installing globally:

uvx --from mcp-heimdall mcp-heimdall

For local development:

git clone https://github.com/asgard-ai-platform/mcp-heimdall.git
cd mcp-heimdall
uv sync

Set your API token:

export HEIMDALL_API_TOKEN=your_bearer_token_here

For local development, copy .env.example to .env and set HEIMDALL_API_TOKEN. HEIMDALL_API_BASE_URL is optional unless you need an override.

See docs/configuration.md for details.

Use with Claude Code

After installing the package and configuring environment variables, add the stdio MCP server:

claude mcp add --transport stdio heimdall -- mcp-heimdall

For a local checkout:

claude mcp add --transport stdio heimdall -- uv --directory /path/to/mcp-heimdall run mcp-heimdall

Use with Claude Desktop

Package install / uvx example:

{
  "mcpServers": {
    "heimdall": {
      "command": "uvx",
      "args": ["mcp-heimdall"],
      "env": {
        "HEIMDALL_API_TOKEN": "your_bearer_token_here"
      }
    }
  }
}

For a local checkout, run it through uv from the repository directory:

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-heimdall", "mcp-heimdall"],
      "env": {
        "HEIMDALL_API_TOKEN": "your_bearer_token_here"
      }
    }
  }
}

More examples are available in examples/.


安裝

pip install mcp-heimdall

也可以用 uvx 直接執行:

uvx mcp-heimdall

本機開發:

git clone https://github.com/asgard-ai-platform/mcp-heimdall.git
cd mcp-heimdall
uv sync

設定

cp .env.example .env
# 編輯 .env — 設定 token。除非需要覆寫,否則 base URL 可省略:
#   HEIMDALL_API_TOKEN=<your bearer token>
#   HEIMDALL_API_BASE_URL=<API base URL override>

詳細說明請見 docs/configuration.md

執行

uv run mcp-heimdall

或明確指定:

uv run python -m mcp_heimdall.server

搭配 Claude Desktop

套件安裝 / uvx 範例:

{
  "mcpServers": {
    "heimdall": {
      "command": "uvx",
      "args": ["mcp-heimdall"],
      "env": {
        "HEIMDALL_API_TOKEN": "your_bearer_token_here"
      }
    }
  }
}

本機 checkout 範例:

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-heimdall", "mcp-heimdall"],
      "env": {
        "HEIMDALL_API_TOKEN": "your_bearer_token_here"
      }
    }
  }
}

更多範例請見 examples/

搭配 Claude Code

安裝套件並設定環境變數後,新增 stdio MCP server:

claude mcp add heimdall -- mcp-heimdall

本機 checkout:

claude mcp add heimdall -- uv --directory /path/to/mcp-heimdall run mcp-heimdall

Available Tools可用工具

All workspace-scoped tools require a workspace_id parameter.
Use list_workspaces first to discover available workspace IDs.

Workspace

Tool Description Parameters
list_workspaces List all workspaces for the current user
get_workspace Get a workspace by ID workspace_id

Article

Tool Description Parameters
list_articles List articles in a workspace workspace_id, page, size
get_article Get an article by ID workspace_id, article_id

Article Template

Tool Description Parameters
list_article_templates List article templates in a workspace workspace_id, page, size
get_article_template Get an article template by ID workspace_id, article_template_id

Avatar

Tool Description Parameters
list_avatars List avatars in a workspace workspace_id, page, size, name*, gender*
get_avatar Get an avatar by ID workspace_id, avatar_id

Account (Platform Account)

Tool Description Parameters
list_accounts List platform accounts in a workspace workspace_id, page, size, provider_type*, app_id*
get_account Get a platform account by ID workspace_id, account_id
get_accounts_by_avatar Get all accounts linked to an avatar workspace_id, avatar_id

App (OAuth App)

Tool Description Parameters
list_apps List OAuth apps in a workspace workspace_id, page, size, provider_type*
get_app Get an OAuth app by ID workspace_id, app_id

Blob

Tool Description Parameters
list_blobs List blob records in a workspace workspace_id, page, size, filter_by*, filter_value*

Content Source

Tool Description Parameters
list_content_sources List content sources in a workspace workspace_id, page, size
get_content_source Get a content source by ID workspace_id, content_source_id

Mission

Tool Description Parameters
list_missions List missions in a workspace workspace_id, page, size, topic_id*, avatar_id*, mission_type*, q*, sort_by*, sort_order*
get_mission Get a mission by ID workspace_id, mission_id
export_mission Export a mission with all its contents workspace_id, mission_id

Mission Content

Tool Description Parameters
list_mission_contents List mission contents in a workspace workspace_id, page, size, mission_id*, avatar_id*, status*
get_mission_content Get a mission content by ID workspace_id, mission_content_id

Publication

Tool Description Parameters
list_publications List publications in a workspace workspace_id, page, size
get_publication Get a publication by ID workspace_id, publication_id

Topic

Tool Description Parameters
list_topics List topics in a workspace workspace_id, page, size, name*
get_topic Get a topic by ID workspace_id, topic_id
list_topic_categories List all available topic categories workspace_id

* optional filter parameter


所有工作區範圍的工具都需要 workspace_id 參數。
使用 list_workspaces 先發現可用的工作區 ID。

工作區

工具 說明 參數
list_workspaces 列出目前使用者的所有工作區
get_workspace 按 ID 取得工作區 workspace_id

文章

工具 說明 參數
list_articles 列出工作區中的文章 workspace_id, page, size
get_article 按 ID 取得文章 workspace_id, article_id

文章範本

工具 說明 參數
list_article_templates 列出工作區中的文章範本 workspace_id, page, size
get_article_template 按 ID 取得文章範本 workspace_id, article_template_id

頭像

工具 說明 參數
list_avatars 列出工作區中的頭像 workspace_id, page, size, name*, gender*
get_avatar 按 ID 取得頭像 workspace_id, avatar_id

帳戶(平台帳戶)

工具 說明 參數
list_accounts 列出工作區中的平台帳戶 workspace_id, page, size, provider_type*, app_id*
get_account 按 ID 取得平台帳戶 workspace_id, account_id
get_accounts_by_avatar 取得連結到頭像的所有帳戶 workspace_id, avatar_id

應用程式(OAuth 應用程式)

工具 說明 參數
list_apps 列出工作區中的 OAuth 應用程式 workspace_id, page, size, provider_type*
get_app 按 ID 取得 OAuth 應用程式 workspace_id, app_id

Blob

工具 說明 參數
list_blobs 列出工作區中的 Blob 記錄 workspace_id, page, size, filter_by*, filter_value*

內容源

工具 說明 參數
list_content_sources 列出工作區中的內容源 workspace_id, page, size
get_content_source 按 ID 取得內容源 workspace_id, content_source_id

任務

工具 說明 參數
list_missions 列出工作區中的任務 workspace_id, page, size, topic_id*, avatar_id*, mission_type*, q*, sort_by*, sort_order*
get_mission 按 ID 取得任務 workspace_id, mission_id
export_mission 匯出任務及其所有內容 workspace_id, mission_id

任務內容

工具 說明 參數
list_mission_contents 列出工作區中的任務內容 workspace_id, page, size, mission_id*, avatar_id*, status*
get_mission_content 按 ID 取得任務內容 workspace_id, mission_content_id

發佈物

工具 說明 參數
list_publications 列出工作區中的發佈物 workspace_id, page, size
get_publication 按 ID 取得發佈物 workspace_id, publication_id

主題

工具 說明 參數
list_topics 列出工作區中的主題 workspace_id, page, size, name*
get_topic 按 ID 取得主題 workspace_id, topic_id
list_topic_categories 列出所有可用的主題分類 workspace_id

* 選用的篩選參數


License授權

MIT

MIT

TestTest

# Public import smoke test
uv run python tests/test_imports.py

# Unit tests (mocked HTTP, no live API needed)
uv run python -m pytest tests/test_all_tools.py -v

# Compile source and tests
uv run python -m compileall src tests

# Build source distribution and wheel
uv build

# Public import smoke test
uv run python tests/test_imports.py

# Unit tests (mocked HTTP, no live API needed)
uv run python -m pytest tests/test_all_tools.py -v

# Compile source and tests
uv run python -m compileall src tests

# Build source distribution and wheel
uv build

ConfigurationConfiguration

Add this to your MCP client config (e.g. Claude Desktop claude_desktop_config.json) when running from a local checkout:

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-heimdall", "mcp-heimdall"],
      "env": {
        "HEIMDALL_API_TOKEN": "your_bearer_token_here"
      }
    }
  }
}

Or with a .env file:

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": [
        "run",
        "--env-file", "/path/to/mcp-heimdall/.env",
        "--directory", "/path/to/mcp-heimdall",
        "mcp-heimdall"
      ]
    }
  }
}

Add this to your MCP client config (e.g. Claude Desktop claude_desktop_config.json) when running from a local checkout:

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-heimdall", "mcp-heimdall"],
      "env": {
        "HEIMDALL_API_TOKEN": "your_bearer_token_here"
      }
    }
  }
}

Or with a .env file:

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": [
        "run",
        "--env-file", "/path/to/mcp-heimdall/.env",
        "--directory", "/path/to/mcp-heimdall",
        "mcp-heimdall"
      ]
    }
  }
}

DocumentationDocumentation

BoundariesBoundaries

  • The server exposes read-only MCP tools only.
  • The server operates with the permissions of the configured HEIMDALL_API_TOKEN.
  • Heimdall write APIs are intentionally not exposed through this MCP server.
  • Public documentation intentionally avoids linking to private backend API documents.

  • The server exposes read-only MCP tools only.
  • The server operates with the permissions of the configured HEIMDALL_API_TOKEN.
  • Heimdall write APIs are intentionally not exposed through this MCP server.
  • Public documentation intentionally avoids linking to private backend API documents.

ArchitectureArchitecture

stdio (JSON-RPC 2.0)
  → mcp-heimdall (console script entry point)
    → src/mcp_heimdall/server.py       — entry point, imports trigger tool registration
      → src/mcp_heimdall/app.py        — MCPServer singleton (FastMCP "mcp-heimdall")
        → src/mcp_heimdall/tools/*     — @mcp.tool() decorated functions
          → src/mcp_heimdall/connectors/rest_client.py  — HTTP client with retry + extra_headers support
            → src/mcp_heimdall/auth/bearer.py           — reads HEIMDALL_API_TOKEN env var
              → src/mcp_heimdall/config/settings.py     — base URL + endpoint map
stdio (JSON-RPC 2.0)
  → mcp-heimdall (console script entry point)
    → src/mcp_heimdall/server.py       — 入口點,匯入觸發工具註冊
      → src/mcp_heimdall/app.py        — MCPServer 單例 (FastMCP "mcp-heimdall")
        → src/mcp_heimdall/tools/*     — @mcp.tool() 裝飾的函數
          → src/mcp_heimdall/connectors/rest_client.py  — HTTP 客戶端(含重試 + extra_headers 支援)
            → src/mcp_heimdall/auth/bearer.py           — 讀取 HEIMDALL_API_TOKEN 環境變數
              → src/mcp_heimdall/config/settings.py     — 基礎 URL + 端點對應表

TestingTesting

# 公開匯入 smoke test
uv run python tests/test_imports.py

# 單元測試(模擬 HTTP,無需連接真實 API)
uv run python -m pytest tests/test_all_tools.py -v

# 編譯原始碼與測試
uv run python -m compileall src tests

# 建置 source distribution 與 wheel
uv build

# 公開匯入 smoke test
uv run python tests/test_imports.py

# 單元測試(模擬 HTTP,無需連接真實 API)
uv run python -m pytest tests/test_all_tools.py -v

# 編譯原始碼與測試
uv run python -m compileall src tests

# 建置 source distribution 與 wheel
uv build

組態組態

環境變數 必需 預設值 說明
HEIMDALL_API_TOKEN API Bearer Token
HEIMDALL_API_BASE_URL https://heimdall-api.asgard-ai.com API 基礎 URL 覆寫

環境變數 必需 預設值 說明
HEIMDALL_API_TOKEN API Bearer Token
HEIMDALL_API_BASE_URL https://heimdall-api.asgard-ai.com API 基礎 URL 覆寫

Mcp 客戶端組態Mcp 客戶端組態

從本機 checkout 執行時,將下列內容新增到你的 MCP 客戶端組態中(例如 Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-heimdall", "mcp-heimdall"],
      "env": {
        "HEIMDALL_API_TOKEN": "your_bearer_token_here"
      }
    }
  }
}

或使用 .env 檔案:

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": [
        "run",
        "--env-file", "/path/to/mcp-heimdall/.env",
        "--directory", "/path/to/mcp-heimdall",
        "mcp-heimdall"
      ]
    }
  }
}

從本機 checkout 執行時,將下列內容新增到你的 MCP 客戶端組態中(例如 Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-heimdall", "mcp-heimdall"],
      "env": {
        "HEIMDALL_API_TOKEN": "your_bearer_token_here"
      }
    }
  }
}

或使用 .env 檔案:

{
  "mcpServers": {
    "heimdall": {
      "command": "uv",
      "args": [
        "run",
        "--env-file", "/path/to/mcp-heimdall/.env",
        "--directory", "/path/to/mcp-heimdall",
        "mcp-heimdall"
      ]
    }
  }
}

文件文件

邊界邊界

  • 這個 server 只暴露只讀 MCP 工具。
  • server 會以設定的 HEIMDALL_API_TOKEN 權限呼叫 Heimdall API。
  • Heimdall 寫入 API 不會透過此 MCP server 暴露。
  • 公開文件刻意不連結私有後端 API 文件。

  • 這個 server 只暴露只讀 MCP 工具。
  • server 會以設定的 HEIMDALL_API_TOKEN 權限呼叫 Heimdall API。
  • Heimdall 寫入 API 不會透過此 MCP server 暴露。
  • 公開文件刻意不連結私有後端 API 文件。

Tags標籤

dataglobalheimdall

Part of所屬

Related MCP Servers相關 MCP 伺服器