Add your description here
Project description
AstrBot MCP Server
本项目是一个基于 FastMCP 的 AstrBot MCP 服务器,通过 HTTP 与已有的 AstrBot 实例交互。
当前包含的 MCP 工具(tools):
get_astrbot_logs:查看日志(历史/实时)get_message_platforms:列出已配置平台send_platform_message/send_platform_message_direct:发送消息链get_platform_session_messages:读取会话消息历史restart_astrbot:重启 AstrBot Corebrowse_plugin_market:浏览插件市场(搜索/按更新时间排序)
本地运行
在项目根目录执行(需要安装 uv):
uv sync
uv run --project . astrbot-mcp
如果看到 FastMCP 的 banner,说明服务启动成功。
MCP 配置(使用 uv + console script)
在支持 MCP 的客户端中,推荐使用如下配置来启动本服务(示例为 JSON):
{
"mcpServers": {
"astrbot-mcp": {
"command": "uvx",
"args": [
"--from",
"astrbotmcp",
"astrbot-mcp.exe"
],
"env": {
"ASTRBOT_BASE_URL": "http://127.0.0.1:6185",
"ASTRBOT_TIMEOUT": "30",
"ASTRBOT_USERNAME": "your_username",
"ASTRBOT_PASSWORD": "your_password"
}
}
}
}
"mcpServers": {
"astrbot-mcp": {
"command": "uv",
"args": [
"run",
"--project",
"D:/程序/astrbotmcp",
"python",
"-m",
"astrbot_mcp.server"
],
"env": {
"ASTRBOT_BASE_URL": "http://127.0.0.1:6185",
"ASTRBOT_TIMEOUT": "30",
"ASTRBOT_USERNAME": "user",
"ASTRBOT_PASSWORD": "password"
}
}
}
}
注意:
- 使用
uv而不是系统python,避免跑到全局 Python 3.13 环境。 - 使用
--project /path/to/astrbotmcp指定项目路径。 - 使用
astrbot-mcp(console script),它会调用astrbot_mcp.server:main。 - 请您务必配置pypl代理:setx UV_INDEX_URL https://pypi.tuna.tsinghua.edu.cn/simple
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
astrbotmcp-0.2.1.tar.gz
(10.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astrbotmcp-0.2.1.tar.gz.
File metadata
- Download URL: astrbotmcp-0.2.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac5cb6f14affc98f4bebbb552f884afed172314512c28be4867d0c3ba9a7bba5
|
|
| MD5 |
6eee546bf45fdbb2c43c2b6053e9b3e1
|
|
| BLAKE2b-256 |
3ccf29c7c15fe6503ca73fb2ab6c4b739a86796766d6017b79e6d60b6d57ff25
|
File details
Details for the file astrbotmcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: astrbotmcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da731605a1acd0599a98af145b679007d1779d1fd204a82a2560691cd6a6fbf6
|
|
| MD5 |
46a1a52701c5a9581d68de757b589cd6
|
|
| BLAKE2b-256 |
d9c73ea3b36346870c53934ed7d63eef0a29eb48e856f914f73a46f86feb0a1c
|