@bangdao-ai/ai-manage-tools
v0.2.3
Published
AI Manager MCP server for AI usage reporting and local diagnostics.
Readme
ai-manage-tools MCP
AI Manager MCP (Model Context Protocol) tool for AI assistants. It lets Cursor, Codex, Claude Desktop, and other MCP-compatible clients check local configuration and upload AI usage reports to AI Manager.
Requirements
- Node.js 18+
- Python 3.11+
- AI Manager upload token
If Python is not available as python3.12, python3.11, or python3, set AI_MANAGE_TOOLS_PYTHON.
Install
You usually do not need to install it globally. Configure your AI tool to run it through npx:
npx -y @bangdao-ai/ai-manage-tools@latestEnvironment
AI_MANAGER_BASE_URL=https://token.longshine.com/ai-manage
AI_MANAGER_TOKEN=aim_xxx
# Optional: disable background collection from the MCP server.
AI_MANAGER_AUTO_COLLECT=falseAI_MANAGER_BASE_URL: AI Manager service URL.AI_MANAGER_TOKEN: upload token issued by AI Manager.AI_MANAGE_TOOLS_PYTHON: optional Python interpreter path.AI_MANAGER_AUTO_COLLECT: optional. Defaults to enabled; set tofalseto disable background collection.- Background collection uses local scheduler and collect locks, so only one
ai-manage-toolsprocess schedules and runs collection at a time on the same computer.
Cursor
Open Cursor MCP settings and add:
{
"mcpServers": {
"ai-manage-tools": {
"command": "npx",
"args": ["-y", "@bangdao-ai/ai-manage-tools@latest"],
"env": {
"AI_MANAGER_BASE_URL": "https://token.longshine.com/ai-manage",
"AI_MANAGER_TOKEN": "aim_xxx"
}
}
}
}After saving, restart MCP or reload Cursor. Ask the assistant:
调用 ai-manage-tools 的 status 工具检查连接配置Codex
Add this MCP server to your Codex config:
[mcp_servers.ai-manage-tools]
command = "npx"
args = ["-y", "@bangdao-ai/ai-manage-tools@latest"]
[mcp_servers.ai-manage-tools.env]
AI_MANAGER_BASE_URL = "https://token.longshine.com/ai-manage"
AI_MANAGER_TOKEN = "aim_xxx"Then ask Codex to call the status tool.
Claude Desktop
Add this to claude_desktop_config.json:
{
"mcpServers": {
"ai-manage-tools": {
"command": "npx",
"args": ["-y", "@bangdao-ai/ai-manage-tools@latest"],
"env": {
"AI_MANAGER_BASE_URL": "https://token.longshine.com/ai-manage",
"AI_MANAGER_TOKEN": "aim_xxx"
}
}
}
}Restart Claude Desktop after editing the file.
Tools
| Tool | Purpose |
| --- | --- |
| status | Check base URL and whether AI_MANAGER_TOKEN is present. |
| report | Upload a local JSONL usage fixture. |
| collect | Collect a bounded local usage batch and upload it. |
| doctor | Run a lightweight local diagnostic. |
| backfill | Run the local backfill entrypoint. |
CLI fallback
The package also keeps a direct CLI mode:
AI_MANAGER_TOKEN=aim_xxx ai-manage-tools status --base-url https://token.longshine.com/ai-manage
ai-manage-tools report --host codex --fixture ./sample.jsonl --base-url https://token.longshine.com/ai-manageFor MCP clients, prefer the npx configuration above.
