Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ASTRBOT_TIMEOUTNoHTTP 请求超时时间30
ASTRBOT_BASE_URLNoAstrBot Dashboard 地址http://127.0.0.1:6185
ASTRBOT_PASSWORDNoDashboard 密码
ASTRBOT_USERNAMENoDashboard 用户名
ASTRBOT_LOG_LEVELNo日志级别INFO
ASTRBOTMCP_DISABLE_PROXYNo是否禁用代理(防止本地请求被代理拦截)true

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription
get_astrbot_logs

获取 AstrBot 日志。

  • 如果 wait_seconds <= 0:立即返回 /api/log-history 的数据。

  • 如果 wait_seconds > 0:通过 /api/live-log SSE 持续读取指定秒数内的新日志。

get_message_platforms

获取 AstrBot 中配置的消息平台列表,对应 /api/config/platform/list。

send_platform_message_direct

Directly send a message chain to a platform group/user (bypass LLM).

This calls AstrBot dashboard endpoint: POST /api/platform/send_message

Notes:

  • This is for sending to a real platform target (group/user), not WebChat.

  • Media parts:

    • If file_path is a local path, this tool will upload it to AstrBot first, then send it as an AstrBot-hosted URL.

    • If file_path/url is an http(s) URL, it will be forwarded as-is.

send_platform_message

通过 AstrBot 的 Web Chat API 发送消息链(支持文本、图片、文件等)。

参数:

  • platform_id: 平台 ID,例如 "webchat" 或配置中的平台 ID。

  • message_chain: 消息链,由 MessagePart 列表组成。

    • 文本: {"type": "plain", "text": "..."}

    • 回复: {"type": "reply", "message_id": "..."}

    • 图片/文件/语音/视频: {"type": "image"|"file"|"record"|"video", "file_path": "本地路径或URL"} 或 {"type": "...", "url": "http(s) URL"}

  • message / images / files / videos / records: 可选便捷参数;当未传 message_chain 时,会自动拼成消息链。

  • session_id: 可选的平台会话 ID;如果为空,会自动为该平台创建新会话。

  • selected_provider / selected_model: 可选,指定 AstrBot 内部的 provider/model。

  • enable_streaming: 是否启用流式回复(影响 AstrBot 返回的 SSE 事件类型)。

restart_astrbot

重启 AstrBot Core,对应 /api/stat/restart-core。 重启后会等待 AstrBot 重新启动并可用。

get_platform_session_messages

Get a platform target's recent messages from AstrBot logs.

This tool intentionally uses AstrBot's log broker history (/api/log-history) as the source of truth, since some AstrBot builds do not persist platform conversation history under /api/conversation/detail for group/user targets.

Args:

  • target_id: Platform target ID (e.g. group_id like "1030223077").

  • platform_id: Optional platform id (e.g. "napcat"). If omitted, use the first enabled platform.

  • message_type: "GroupMessage" or "FriendMessage" (default: "GroupMessage").

  • wait_seconds: If > 0, poll and return SSE-like events for up to this many seconds.

  • max_messages: Max number of history items to return (from the tail).

  • poll_interval_seconds: Poll interval when wait_seconds > 0.

browse_plugin_market

查看 AstrBot 插件市场(支持搜索与按时间排序)。

用法:

  • mode="latest": 按 updated_at 倒序,返回第 start ~ start+count-1 条(start 从 1 开始)

  • mode="search": 按 query 搜索(名称/简介/标签/作者/仓库),再按 updated_at 倒序

返回字段:

  • total_plugins: 插件市场总数(未过滤)

  • matched_plugins: 搜索命中数(mode=search)

  • plugins: 列表(包含 name/desc/tags/stars/updated_at)

list_astrbot_config_files

List AstrBot config files (abconfs), via /api/config/abconfs.

inspect_astrbot_config

Inspect a node in an AstrBot config JSON.

This tool is designed for step-by-step exploration:

  • Start with path=None to list top-level keys.

  • Then drill down by providing a deeper path.

apply_astrbot_config_ops

Apply multiple edits to an AstrBot config, then save + hot reload.

Supported ops (batch in a single tool call):

  • {"op":"set","path":,"value":}

  • {"op":"add_key","path":<parent_path>,"key":,"value":}

  • {"op":"append","path":<list_path>,"value":}

path accepts dot path, JSON Pointer, or segment list.

search_astrbot_config_paths

Search AstrBot config and return only matched key paths (no big values).

Modes:

  • key only: provide key_query

  • key + value: provide key_query and value_query (matches leaf values of primitive types)

Returns:

  • results: [{path, path_pointer, path_dot, type}, ...]

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
astrbot_infoBasic info resource to allow MCP hosts to discover this server.

Latest Blog Posts

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/xunxiing/astrbotmcp'

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