MCP
Bilaga as an MCP server.
bilaga-mcp is a local Model Context Protocol server over stdio. It exposes the Bilaga API as tools so that Claude, Cursor, or any MCP client can send a file up to 50 GB and hand back a share link, without the agent ever seeing the chunked upload protocol. The file goes straight from your machine to Bilaga. Source is MIT-licensed and published on npm.
1. Get a token
Sign in at /account and create an agent token. It is shown once. Never put it in a prompt or a shared URL.
2. Add the server
The account page shows a ready-made one-liner next to every new token. For Claude Code it is:
npx -y bilaga-mcp setup YOUR_TOKEN && claude mcp add -s user bilaga -- npx -y bilaga-mcp
Without the token argument, npx -y bilaga-mcp setup asks for it interactively.
Setup stores the token in ~/.config/bilaga/token with owner-only permissions and checks it against Bilaga before saving. Claude Desktop, Cursor, and other clients that read a JSON config, after the same setup command:
{
"mcpServers": {
"bilaga": { "command": "npx", "args": ["-y", "bilaga-mcp"] }
}
}Node 20 or newer is required. Setting BILAGA_TOKEN in the client’s environment works too and overrides the stored token. Then ask the agent to send a file: it calls send_file with the path and reports the link.
3. Tools
| Tool | What it does |
|---|---|
send_file | Upload a local file and return a share_url valid for 30 days. Optional to, in_reply_to, sender, and resume. |
get_transfer, list_transfers, mark_sent, delete_transfer | Inspect, record delivery of, and revoke your transfers. |
list_inbox, download_file, acknowledge_received, pay_transfer | Receive transfers addressed to your account’s email. |
get_balance, get_quote, get_config | Credit, prices, and limits. |
list_events, get_receipt | Signed event log and delivery receipts. |
get_webhook, set_webhook, delete_webhook, test_webhook | One https webhook per account. |
create_file_request, list_file_requests, get_file_request, revoke_file_request, get_file_request_receipt | Collect files from people who have no account. |
API errors are returned as tool errors carrying the Bilaga error code, so an agent can stop on 402 insufficient_balance or 429 account_limit instead of retrying blindly. The tool descriptions repeat the rules from llms.txt: share only the public link, deliver it yourself and call mark_sent, and read charged_usd before claiming a payment was taken.
4. Without MCP
Everything the server does is plain HTTP. The API guide and the Python client cover the same operations for agents that call the API directly.
5. Remote MCP
There is no hosted MCP endpoint yet. A remote server needs OAuth and a way to get the file to Bilaga from somewhere other than your disk; both are planned but not built. Use the local server for now.