cubox-mcp
Enables interaction with Cubox through its CLI, allowing agents to manage bookmarks, highlights, and annotations via a single pass-through tool.
README
cubox-mcp-cli
A generic pass-through MCP server for the official cubox-cli. It exposes exactly one tool, cubox_cli, whose canonical parameter is args: string[] — the argv you would type after cubox-cli on the command line. It also tolerates clients that serialize the array as a string or wrap it in one or more { "item": ... } objects. When Cubox adds, renames, or removes commands, this wrapper does not need to change.
What is this?
This is a Model Context Protocol (MCP) server that wraps the official Cubox CLI. Instead of hard-coding Cubox's command surface, it forwards the argument array straight to cubox-cli and returns the output. It also includes a shallow, fail-safe guard against destructive operations (delete/remove/rm without a force/confirm flag).
Why fork/use this?
- Future-proof:
cubox-clican change its commands and flags anytime; this server stays the same. - One tool for everything:
cubox_cli({ args: ["--help"] })works for any command. - No npm account required: run directly from GitHub with
npx. - Works with any MCP client: tested with mcphub, Claude Desktop, and the MCP Inspector.
- Optional container: ships with a
Dockerfileand a Docker Compose template for HTTP transport.
Quick start
1. Get a Cubox API token
The Cubox backend uses a static API Extension link rather than OAuth, so you log in once and copy the link:
npx -y cubox-cli auth login
# → open https://cubox.pro/web/settings/extensions, enable the API Extension,
# copy the unique link, and paste it back at the prompt
This writes ~/.config/cubox-cli/config.json on the machine where you run it. If your MCP client runs elsewhere, you will need to pass CUBOX_TOKEN as an environment variable (see below).
2. Add to your MCP client
No clone or local install is needed for the host running the MCP client. npx will pull the code from GitHub and install dependencies automatically.
mcphub mcp_settings.json:
{
"mcpServers": {
"cubox": {
"command": "npx",
"args": ["-y", "github:Lascivea/cubox-mcp-cli"],
"env": {
"CUBOX_TOKEN": "your_token",
"CUBOX_SERVER": "cubox.pro"
}
}
}
}
Claude Desktop / other clients: use the same npx command and environment variables.
3. Test it
Call the tool with:
{ "args": ["--help"] }
For compatibility with some function-calling clients, these equivalent forms are also accepted:
{ "args": "--help" }
{ "args": { "item": ["--help"] } }
{ "args": { "item": { "item": ["card", "list"] } } }
The canonical form remains an array of strings. The wrapper unwraps the compatibility forms before applying safety checks and invoking cubox-cli.
Or try a read-only command like:
{ "args": ["folder", "list"] }
Configuration example
| Variable | Required | Default | Notes |
|---|---|---|---|
CUBOX_TOKEN |
yes* | — | The last segment of your Cubox API Extension link (e.g. abcd12345). Required when the MCP host is a different machine than the one where you ran cubox-cli auth login. |
CUBOX_SERVER |
no | cubox.pro |
Cubox server domain. Use cubox.cc for the international instance. |
CUBOX_CLI_BIN |
no | auto | Override the cubox-cli binary path. By default the wrapper resolves node_modules/.bin/cubox-cli, then falls back to PATH. |
MCP_TRANSPORT |
no | stdio |
stdio for mcphub / Claude Desktop / local clients. http for the standalone Docker container. |
PORT |
no | 3000 |
Only used when MCP_TRANSPORT=http. |
No credentials are baked into the image or written to disk by this wrapper.
CUBOX_TOKENandCUBOX_SERVERare read bycubox-cliitself, not by this server.
Docker Compose deployment
Copy the template and edit the environment variables:
cp docker-compose.example.yaml docker-compose.yaml
# edit docker-compose.yaml, set CUBOX_TOKEN
docker compose up -d
The container runs the MCP server over HTTP on port 3000. Register it in your MCP client with a url entry pointing at http://localhost:3000/mcp.
Local development
cd cubox-mcp-cli
npm install
node test-client.js # regression tests against fake-cubox-cli.sh
npm run inspector # interactive MCP Inspector
Design notes
Why only one tool?
A single { args: string[] } schema is the canonical interface and keeps command discovery simple. At runtime, a preprocessing layer also accepts the common array-serialization quirks produced by some function-calling clients: a string, { item: ... }, or nested { item: ... } wrappers. Agents can discover commands live by calling cubox_cli({ args: ["--help"] }) or cubox_cli({ args: ["card", "--help"] }).
What is hard-coded?
- The global
-o jsonflag, with a fallback to plain text if a sub-command rejects it. - A shallow guard against destructive operations: any call containing
delete/remove/rmmust also contain--force,--yes,-y, or--confirm. If Cubox renames its delete command, this guard simply stops matching — it never blocks something new incorrectly.
Upgrading cubox-cli later
Nothing to do. npx resolves the dependency fresh from package.json whenever the cache is rebuilt. To force a refresh: npx clear-npx-cache or bump the cubox-cli version range in package.json.
Companion projects / related tools
cubox-cli— the official Cubox CLI this server wraps.- mcphub — an MCP server manager that pairs well with this project.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。