astrbot-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GITHUB_TOKEN | No | GitHub API token for code search and write operations. | |
| MAIL_PASSWORD | No | Email password or authorization code for SMTP/IMAP. | |
| OPENAI_API_KEY | No | API key for OpenAI-compatible embedding services. | |
| TAVILY_API_KEY | No | API key for the Tavily search backend. | |
| EMBEDDING_MODEL | No | Embedding model name for vector search. | |
| ASTRBOT_MCP_HOST | No | Overrides the listening host. | |
| ASTRBOT_MCP_PORT | No | Overrides the listening port. | |
| SEARXNG_BASE_URL | No | Base URL for the SearXNG search backend. | |
| ASTRBOT_MCP_CONFIG | No | Path to the configuration file. | |
| EMBEDDING_BASE_URL | No | Base URL for the OpenAI-compatible embeddings API. | |
| BING_SEARCH_API_KEY | No | API key for the Bing search backend. | |
| ASTRBOT_MCP_TRANSPORT | No | Overrides the MCP transport method (stdio, sse, or streamable-http). | |
| ASTRBOT_MCP_AUTH_TOKEN | No | Bearer token used for HTTP authentication. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| http_requestA | 发送任意 HTTP/REST 请求,用于访问未单独接入的开放 API。 Args: method: HTTP 方法,支持 GET、POST、PUT、PATCH、DELETE、HEAD、OPTIONS。 url: 完整 URL,必须是 http:// 或 https:// 开头。 headers: 附加请求头,例如 {"Authorization": "Bearer ..."}。 params: URL 查询参数对象。 json_body: 以 JSON 发送的请求体(对象或数组)。 body: 原始字符串请求体,与 json_body 二选一。 timeout: 请求超时秒数。 max_bytes: 最多读取的响应字节数,超出会被截断。 follow_redirects: 是否跟随重定向;每一跳都会重新执行安全检查。 |
| web_searchA | 搜索网页并返回标题、链接与摘要。 Args: query: 搜索关键词。 max_results: 返回结果数量,1-20。 provider: 临时覆盖配置的搜索后端,可选 duckduckgo、tavily、bing、searxng;留空使用配置值。 |
| web_fetchA | 抓取网页并提取可读正文,用于阅读搜索结果或在线文档。 Args: url: 要抓取的 http/https URL。 max_chars: 正文字符上限,100-50000。 include_links: 是否同时返回页面中的链接。 max_links: include_links=true 时最多返回多少条链接。 |
| get_weatherA | 查询城市天气(Open-Meteo,无需 API Key)。 Args: location: 城市名称,例如 北京、Shanghai、Tokyo。 days: 预报天数,1-16。 |
| get_timeA | 获取指定时区的当前时间。 Args: timezone: IANA 时区名,例如 Asia/Shanghai、UTC、America/New_York。 |
| convert_currencyA | 按实时汇率换算货币(open.er-api.com,无需 API Key)。 Args: amount: 金额。 from_currency: 源货币代码,例如 USD、CNY、EUR。 to_currency: 目标货币代码,例如 JPY、GBP。 |
| fs_listB | 列出沙箱目录中的文件与子目录。 Args: path: 相对于沙箱根目录的路径,默认 "."。 pattern: 文件名匹配模式,默认 "*"。 recursive: 是否递归子目录。 include_hidden: 是否包含以点开头的隐藏文件。 max_results: 最多返回条目数,1-1000。 |
| fs_readA | 读取沙箱内的文本文件,可按行截取。 Args: path: 相对于沙箱根目录的文件路径。 start_line: 起始行号(从 1 开始)。 end_line: 结束行号;0 表示读到文件末尾。 max_bytes: 最多读取的字节数;0 表示使用配置上限。 |
| fs_writeA | 向沙箱内写入文本文件(需开启 files.allow_write)。 Args: path: 相对于沙箱根目录的文件路径。 content: 要写入的文本内容。 append: 是否追加而不是覆盖。 create_dirs: 是否自动创建父目录。 |
| fs_searchA | 在沙箱文本文件中搜索内容。 Args: query: 要查找的文本或正则表达式。 path: 搜索起点,相对于沙箱根目录。 pattern: 文件名过滤模式,例如 "*.py"。 max_results: 最多返回的匹配行数,1-500。 use_regex: 是否把 query 当作正则表达式。 case_sensitive: 是否区分大小写。 |
| fs_statB | 查看沙箱内文件或目录的元信息。 Args: path: 相对于沙箱根目录的路径。 |
| fs_mkdirA | 在沙箱内创建目录(需开启 files.allow_write)。 Args: path: 相对于沙箱根目录的目录路径。 |
| fs_deleteA | 删除沙箱内的文件或目录(需开启 files.allow_delete)。 Args: path: 相对于沙箱根目录的路径。 recursive: 删除目录时必须为 true。 |
| sqlite_list_tablesA | 列出 SQLite 数据库中的表和视图。 Args: database: 数据库文件名(相对于 sqlite.root)或沙箱内的路径。 |
| sqlite_describeB | 查看 SQLite 表结构。 Args: database: 数据库文件名或沙箱内的路径。 table: 表名或视图名。 |
| sqlite_queryA | 以只读方式执行 SQL 查询。 Args: database: 数据库文件名或沙箱内的路径。 sql: 单条 SQL 查询语句(SELECT / WITH / PRAGMA 等)。 params: 绑定参数列表,使用 ? 占位符。 max_rows: 最多返回行数;0 表示使用配置上限。 |
| sqlite_executeA | 执行单条写操作 SQL(需开启 sqlite.allow_write)。 Args: database: 数据库文件名或沙箱内的路径;不存在时会创建。 sql: 单条 INSERT / UPDATE / DELETE / CREATE 等语句。 params: 绑定参数列表,使用 ? 占位符。 |
| github_search_reposB | 搜索 GitHub 仓库。 Args: query: GitHub 搜索语法,例如 "language:python mcp"。 sort: 排序字段,可选 stars、forks、updated。 per_page: 返回数量,1-100;0 表示使用配置值。 |
| github_get_repoC | 获取 GitHub 仓库详情。 Args: owner: 仓库拥有者。 repo: 仓库名称。 |
| github_list_issuesA | 列出仓库的 Issue(可选是否包含 Pull Request)。 Args: owner: 仓库拥有者。 repo: 仓库名称。 state: open、closed 或 all。 labels: 逗号分隔的标签过滤。 include_pulls: 是否把 Pull Request 也包含在结果中。 per_page: 返回数量,1-100;0 表示使用配置值。 |
| github_get_issueB | 获取单个 Issue 或 PR 的正文。 Args: owner: 仓库拥有者。 repo: 仓库名称。 number: Issue 或 PR 编号。 |
| github_get_fileB | 读取仓库中的文件内容。 Args: owner: 仓库拥有者。 repo: 仓库名称。 path: 文件路径,例如 src/main.py。 ref: 分支、标签或 commit SHA;留空使用默认分支。 |
| github_search_codeB | 搜索 GitHub 代码(需要配置 token)。 Args: query: 搜索语法,例如 "repo:AstrBotDevs/AstrBot mcp"。 per_page: 返回数量,1-100。 |
| github_create_issueA | 创建 GitHub Issue(需开启 github.allow_write 且配置 token)。 Args: owner: 仓库拥有者。 repo: 仓库名称。 title: Issue 标题。 body: Issue 正文(Markdown)。 labels: 标签名称列表。 |
| kb_addA | 向知识库添加或更新一篇文档。 Args: source: 文档唯一标识,例如 URL、文件路径或自定义 ID。 content: 文档正文。 title: 标题。 tags: 逗号分隔的标签,便于后续过滤。 replace: source 已存在时是否覆盖。 |
| kb_rememberA | 记住一条事实或笔记(供 Agent 自学习时调用;自动去重)。 Args: content: 要长期记住的内容。 title: 可选标题。 tags: 逗号分隔的标签。 source: 可选唯一标识;默认按内容哈希生成。 |
| kb_searchB | 检索知识库,返回最相关的片段。 Args: query: 查询文本。 top_k: 返回片段数,1-50;0 表示使用配置值。 tags: 逗号分隔的标签过滤(需全部匹配)。 |
| kb_learn_urlB | 抓取网页、提取正文并写入知识库(自学习入口)。 Args: url: 要学习的 http/https 地址。 tags: 逗号分隔的标签。 title: 可选标题;留空使用网页标题。 |
| kb_learn_fileB | 从本地文本文件学习内容并写入知识库。 Args: path: 相对于 files.root 沙箱的文件路径。 tags: 逗号分隔的标签。 |
| kb_listB | 列出知识库中的文档。 Args: limit: 返回数量,1-500。 offset: 分页偏移。 tags: 逗号分隔的标签过滤。 |
| kb_getB | 按 ID 或 source 读取一篇知识库文档。 Args: key: 文档 ID、source 或 URL。 max_chars: 正文最大字符数,100-200000。 |
| kb_deleteC | 按 ID 或 source 删除知识库文档。 Args: key: 文档 ID 或 source。 |
| kb_statsA | 查看知识库统计信息(文档数、片段数、FTS 与向量状态)。 |
| kb_reindexA | 重建全文索引(在数据库被外部修改后使用)。 |
| kb_exportA | 导出知识库为 JSON。 Args: path: 导出文件路径(必须在知识库目录内);留空则直接返回 JSON。 include_embeddings: 是否包含向量数据。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 35 tools
Prefix-based grouping (fs_, sqlite_, github_, kb_, web_) makes most tools clearly distinct, and read/list/search/stat are well separated within each domain. The main ambiguity is the knowledge-base ingestion quartet (kb_add, kb_remember, kb_learn_url, kb_learn_file), which all write documents with overlapping semantics, plus some overlap between web_fetch, http_request, and kb_learn_url.
Almost everything follows a predictable snake_case prefix_verb/noun pattern (fs_read, sqlite_query, github_create_issue, kb_search). The only deviations are the three unprefixed standalone utilities (get_weather, get_time, convert_currency) and slight verb inconsistency between kb_add and kb_remember.
35 tools is heavy on its own, but the server is explicitly a multi-domain toolkit (filesystem, SQLite, GitHub, knowledge base, web, utilities), so each domain contributes a bounded, purposeful subset. Still, the sheer surface is large enough that an agent must route across many prefixes, and the three one-off utility tools feel peripheral.
Filesystem and SQLite cover full CRUD lifecycles, the knowledge base has add/search/get/list/stats/reindex/delete/export, and web access is covered by search, fetch, and a generic http_request. GitHub is the weakest area: no PR creation/merge, no update/close issue, and no comment operations, but the read/create core is present.