An MCP (Model Context Protocol) server to interact with the Bit2Me ecosystem. This server allows AI assistants like Claude to access real-time market data, manage wallets, execute trading operations, and query products like Earn and Loans.
For more information, visit: https://mcp.bit2me.com
Bit2Me is a leading cryptocurrency exchange based in Spain, offering a wide range of services including trading, staking (Earn), and loans. This MCP server acts as a bridge, enabling LLMs to perform actions and retrieve data securely from your Bit2Me account.
- General: Asset information, account details, and portfolio valuation.
- Wallet Management: Query balances, transactions, and wallet (Pockets) details.
- Pro Trading: Manage orders (Limit, Market, Stop), query open orders, and transfer funds between Wallet and Pro.
- Earn & Loans: Manage Earn (Staking) strategies and collateralized loans.
- Operations: Execute trades, transfers, and withdrawals securely.
The server provides 46 tools organized into categories:
- 2 General Tools
- 8 Broker (Simple Trading) Tools
- 4 Wallet Tools
- 11 Earn Tools
- 7 Loan Tools
- 14 Pro (Advanced Trading) Tools
Note: Operation tools (write actions) are included in their respective categories above.
Below is a detailed list of tools and the Bit2Me API endpoints they use.
Note: General information tools including asset details, account information, and portfolio valuation.
| Tool | Endpoint | Description |
|---|---|---|
general_get_assets_config |
GET /v2/currency/assets or /v2/currency/assets/:symbol |
Gets detailed information of assets (cryptocurrencies and fiat) supported by Bit2Me Wallet. If symbol is provided, returns details for that specific asset. If symbol is not provided, returns all available assets. Returns symbol, name, type, network (lowercase), trading status, loan availability, and supported pairs. Use this to discover available symbols or verify if a specific asset is tradeable or loanable before operations. |
portfolio_get_valuation |
Multiple endpoints | Calculates the total portfolio value by aggregating all assets across Wallet, Pro Trading, Earn/Staking, and Loans. Converts all holdings to the specified fiat symbol (default: EUR) using current market prices. Returns total value, breakdown by asset, and individual asset valuations. |
Note: Tools for simple trading operations and broker prices. Includes market data (prices, charts) and trading actions (buy, sell, swap) for the Wallet/Broker service. These prices include spread and are different from Pro Trading prices.
| Tool | Endpoint | Description |
|---|---|---|
broker_get_asset_price |
GET /v1/currency/rate |
Get Wallet exchange rates for cryptocurrencies in a specific quote symbol and date. Returns the price of one unit of the base symbol in the requested quote symbol (default: EUR) as used by the Wallet/Broker service. Optional base_symbol filter and date for historical rates. Response is a list of prices. |
broker_get_asset_data |
GET /v3/currency/ticker/:symbol |
Gets comprehensive market ticker data for a cryptocurrency from the Wallet/Broker service (not Pro Trading). These prices include spread and differ from Pro Trading prices. Requires base_symbol (e.g., BTC) and optional quote_symbol (default: EUR). |
broker_get_asset_chart |
GET /v3/currency/chart |
Gets Wallet price history (candles/chart) with date and price in the quote symbol. These prices reflect the Wallet/Broker service, not Pro Trading. Requires pair (e.g., BTC-USD) and timeframe (1h, 1d, 1w, 1M, 1y). Returns data points with ISO 8601 date/time and price in the quote symbol from the pair. |
| Tool | Endpoint | Description |
|---|---|---|
wallet_get_pockets |
GET /v1/wallet/pocket |
Gets balances, UUIDs, and available funds from Simple Wallet (Broker). Does not include Pro/Earn balance. Returns all pockets of the user. Optional pocket_id filter to get details of a specific pocket. Optional symbol filter. Returns balance, available, blocked funds, name, and creation date. |
wallet_get_movements |
GET /v2/wallet/transaction |
History of past Wallet operations (deposits, withdrawals, swaps, purchases). Optional movement_id filter to get details of a specific movement. Optional symbol filter. Use limit and offset for pagination (default limit: 10). Returns movement list with type, amount, symbol, status, and date. |
wallet_get_pocket_addresses |
GET /v2/wallet/pocket/... |
Lists deposit addresses for a wallet (Pocket) on a specific network. Requires pocket_id and network. Use wallet_get_networks first to see available networks for a symbol. Each network may have different addresses. Returns address, network, and creation date. Use this address to receive deposits on the specified network. |
wallet_get_networks |
GET /v1/wallet/currency/... |
Lists available networks for a specific cryptocurrency. Requires symbol (e.g., BTC, ETH). Use this before wallet_get_pocket_addresses to see which networks support deposits for a symbol (e.g., bitcoin, ethereum, binanceSmartChain). Returns network ID, name, native symbol, fee symbol, and whether it requires a tag/memo. |
| Tool | Endpoint | Description |
|---|---|---|
earn_get_summary |
GET /v1/earn/summary |
View summary of accumulated rewards in Staking/Earn. Returns total rewards earned across all Earn positions, breakdown by symbol, and overall performance. Use this to see your total staking rewards. |
earn_get_positions |
GET /v2/earn/wallets |
List active Earn positions/strategies. Optional position_id filter to get a specific position. Returns position_id, symbol, balance, strategy, lock_period, converted_balance, and timestamps. Note: Positions represent money that is locked or generating yield (invested money), different from Pockets which represent liquid available funds. |
earn_get_position_movements |
GET /v1/earn/wallets/:id/movements |
Get movement history of a specific Earn position. Requires position_id. Returns deposits, withdrawals, and reward payments with amounts, dates, and status. Optional limit and offset for pagination. Use earn_get_positions first to get the position ID. Response is a paginated list with metadata. |
earn_get_movements |
GET /v2/earn/movements |
Get movement history across all Earn positions. Returns deposits, withdrawals, rewards, and other movements with amounts, dates, rates, source, and issuer information. Supports filtering by symbol, position_id, type, date range, and pagination. All parameters are optional. Response is a paginated list with metadata. |
earn_get_movements_summary |
GET /v1/earn/movements/:type/summary |
Get summary statistics of Earn movements filtered by type (deposit, withdrawal, reward, discount-funds, discount-rewards). Returns total count, total amounts, and aggregated data for the specified movement type across all Earn positions. |
earn_get_assets |
GET /v2/earn/assets |
Get list of assets (cryptocurrencies) supported in Earn/Staking with APY rates. Returns list of cryptocurrency symbols with their staking options and APY. Use this to discover which assets can be staked before creating Earn operations. |
earn_get_rewards_config |
GET /v1/earn/wallets/rewards/config |
Get global rewards configuration for Earn/Staking. Returns reward calculation rules, distribution schedules, and general staking parameters. Use this to understand how rewards are calculated. |
earn_get_position_rewards_config |
GET /v1/earn/wallets/:id/rewards/config |
Get rewards configuration for a specific Earn position. Returns reward calculation rules, APY details, and position-specific staking parameters. Use earn_get_positions first to get the position ID. |
earn_get_position_rewards_summary |
GET /v1/earn/wallets/:id/rewards/summary |
Get rewards summary for a specific Earn position. Returns total rewards earned, pending rewards, reward history, and performance metrics. Use earn_get_positions first to get the position ID. |
| Tool | Endpoint | Description |
|---|---|---|
loan_get_simulation |
GET /v1/loan/ltv |
Simulate a loan scenario to calculate LTV (Loan To Value) ratio and APR. Requires guarantee_symbol, loan_symbol, and user_symbol. LTV represents the loan amount as a ratio of the guarantee value (1.0 = 100%). Lower LTV means lower risk. Provide either guarantee_amount or loan_amount (the other will be calculated). Returns guarantee and loan amounts (original and converted), LTV ratio, APR, and user currency. Use this before loan_create to plan your loan. |
loan_get_config |
GET /v1/loan/currency/configuration |
Get symbol configuration for loans including supported guarantee symbols, loan symbols, LTV limits, interest rates, and requirements. Returns symbol for each asset. Use this before creating a loan to understand available options and limits. |
loan_get_movements |
GET /v1/loan/movements |
Get loan movement history including payments, interest accruals, and guarantee changes. Optional order_id filter to see movements for a specific loan. Use limit and offset for pagination. Response is a paginated list with metadata. |
loan_get_orders |
GET /v1/loan/orders |
Get all loan orders (both active and closed) for the user. Optional order_id filter to get complete details of a specific order including LTV, APR, liquidation price, remaining amount, and expiration date. Without order_id, returns basic loan information. Optional limit and offset for pagination. |
| Tool | Endpoint | Description |
|---|---|---|
pro_get_balance |
GET /v1/trading/wallet/balance |
Gets balances from PRO Trading account. This is separate from Simple Wallet - funds must be transferred using pro_deposit/pro_withdraw. Returns available and blocked balances per symbol for trading. |
pro_get_open_orders |
GET /v1/trading/order |
View open trading orders in PRO. Optional order_id filter to get details of a specific order. Optional pair filter to see orders for a specific market. Returns all active orders with full details including pair, side, type, amount, price, status, filled amount, and creation date. |
pro_get_trades |
GET /v1/trading/trade |
Gets the user's trade history in Pro Trading. Returns executed trades with price, amount, side (buy/sell), fees, timestamp, and date. Optional filters: trading pair, side, order type, date range, limit (max 50), offset, and sort order (ASC/DESC). Use this to review past trading activity. Response is a paginated list with metadata. |
pro_get_order_trades |
GET /v1/trading/order/:id/trades |
Gets all individual trades (executions) associated with a specific order. Requires order_id. Returns detailed execution data including price, amount, fees, timestamp, and date for each fill. Useful for analyzing how a large order was executed across multiple trades. |
pro_get_market_config |
GET /v1/trading/market-config |
Gets market configuration including precision (decimal places), minimum/maximum amounts, and trading status. Optional pair filter for a specific market. Use this before placing orders to ensure amounts meet requirements. Response is a list of configurations. |
pro_get_order_book |
GET /v2/trading/order-book |
Gets the order book (market depth) for a market showing current buy and sell orders. Requires trading pair (e.g., BTC-USD). Returns bids (buy orders) and asks (sell orders) with prices and amounts. Useful for analyzing market liquidity and determining optimal order prices. Response is a single object. |
pro_get_public_trades |
GET /v1/trading/trade/last |
Gets the latest public trades (executed orders) for a market. Requires trading pair (e.g., BTC-USD). Returns recent transactions with price, amount, side (buy/sell), and date. Optional limit (max 100) and sort order (ASC/DESC). Useful for seeing recent market activity. Response is a list of trades with metadata. |
pro_get_candles |
GET /v1/trading/candle |
Gets OHLCV (Open, High, Low, Close, Volume) candles for Pro (Advanced Trading). Requires trading pair (e.g., BTC-EUR) and timeframe (1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1M). Optional limit (default: 1000, max: 1000), startTime and endTime (Unix epoch milliseconds). If startTime/endTime not provided, defaults to last 24 hours. Essential for technical analysis and charting. Response is a list of candles with metadata. |
pro_get_ticker |
GET /v2/trading/tickers |
Get ticker information (OHLCV, current best bid and ask, percentage versus price 24 hours ago) for all markets or by requested market symbol. The data refers to the last 24 hours from the date indicated by the timestamp. Optional pair filter for a specific market. Returns ticker data with open, close, bid, ask, high, low, volumes, and percentage change. |
| Tool | Endpoint | Description |
|---|---|---|
portfolio_get_valuation |
GET /... |
Calculates the total portfolio value by aggregating all assets across Wallet, Pro Trading, Earn/Staking, and Loans. Converts all holdings to the specified fiat symbol (default: EUR) using current market prices. Returns total value, breakdown by asset, and individual asset valuations. Filters out dust amounts below minimum threshold. |
| Tool | Endpoint | Description |
|---|---|---|
broker_quote_buy |
POST /v1/wallet/transaction/proforma |
Step 1: Buy cryptocurrency using fiat balance from a pocket. Creates a proforma quote. Use wallet_get_pockets to find pocket IDs. REQUIRES subsequent confirmation with broker_confirm_quote. |
broker_quote_sell |
POST /v1/wallet/transaction/proforma |
Step 1: Sell cryptocurrency to receive fiat balance in a pocket. Creates a proforma quote. Use wallet_get_pockets to find pocket IDs. REQUIRES subsequent confirmation with broker_confirm_quote. |
broker_quote_swap |
POST /v1/wallet/transaction/proforma |
Step 1: Swap/exchange one cryptocurrency for another between pockets. Creates a proforma quote. Use wallet_get_pockets to find pocket IDs. REQUIRES subsequent confirmation with broker_confirm_quote. |
broker_confirm_quote |
POST /v1/wallet/transaction |
Step 2: Confirms and executes a previously created proforma from broker_quote_buy, broker_quote_sell, or broker_quote_swap. Final action. |
| Tool | Endpoint | Description |
|---|---|---|
pro_create_order |
POST /v1/trading/order |
Create Limit/Market/Stop order in PRO Trading. Requires pair, side, type, and amount. For Limit orders, 'price' is required. For Stop-Limit orders, both 'price' and 'stop_price' are required. Market orders execute immediately at current price. Returns order with creation date and timestamp. Use pro_get_open_orders to check order status. |
pro_cancel_order |
DELETE /v1/trading/order/:id |
Cancel a specific PRO order by ID. Requires order_id. Only open/pending orders can be cancelled. Returns cancellation status. Use pro_get_open_orders first to see which orders can be cancelled. |
pro_cancel_all_orders |
DELETE /v1/trading/order |
Cancel all open orders in Pro Trading. Optional pair filter to cancel only orders for a specific market. Returns count of cancelled orders. Use with caution as this affects all pending orders. |
pro_deposit |
POST /v1/trading/wallet/deposit |
Deposit funds from Simple Wallet to Pro Trading account. Funds must be available in Simple Wallet first (check with wallet_get_pockets). Transfer is immediate. Use pro_get_balance to verify the deposit. |
pro_withdraw |
POST /v1/trading/wallet/withdraw |
Withdraw funds from Pro Trading account back to Simple Wallet. Funds must be available in Pro Trading (check with pro_get_balance). Transfer is immediate. Use wallet_get_pockets to verify the withdrawal. |
earn_deposit |
POST /v1/earn/wallets/:id/movements |
Deposit funds from Simple Wallet pocket to Earn (Staking). Requires pocket_id, symbol (cryptocurrency), and amount. Funds will start earning rewards based on the asset's APY. Use wallet_get_pockets to find your pocket ID and earn_get_positions to see available Earn strategies. Returns operation details with status. |
earn_withdraw |
POST /v1/earn/wallets/:id/movements |
Withdraw funds from Earn (Staking) back to Simple Wallet pocket. Requires pocket_id, symbol (cryptocurrency), and amount. Funds will stop earning rewards after withdrawal. Use earn_get_positions to check your Earn balance. Returns operation details with status. |
loan_create |
POST /v1/loan |
Create a new loan by providing cryptocurrency as guarantee (collateral) to receive loan currency (can be any supported currency like USDC, EURC, or fiat). Requires guarantee_symbol, loan_symbol, and amount_type. Specify amount_type: 'fixed_collateral' or 'fixed_loan'. Returns loan order details with status. |
loan_increase_guarantee |
POST /v1/loan/orders/:id/guarantee/increase |
Increase the guarantee (collateral) amount for an existing loan. Requires order_id and guarantee_amount. This improves the LTV ratio and reduces risk. Returns updated loan details. Use loan_get_orders first to get the order ID. |
loan_payback |
POST /v1/loan/orders/:id/payback |
Pay back (return) part or all of a loan. Requires order_id and payback_amount. Reduces the loan amount and may release guarantee if fully paid. Returns updated loan details. Use loan_get_orders first to get the order ID. |
All tool responses are optimized for LLM consumption with clean, consistent structures. We provide comprehensive documentation of response formats:
- SCHEMA_MAPPING.md - Complete response schemas with field descriptions, types, enums, and examples for all 46 tools (auto-generated from
data/tools.json) - data/tools.json - Centralized metadata source for all tool definitions (name, description, inputSchema, responseSchema, examples)
- ✅ Consistent naming: All fields use
snake_casefor better LLM readability - ✅ Flattened structures: Removed unnecessary nesting from API responses
- ✅ Filtered data: Zero balances and irrelevant fields are removed
- ✅ Type-safe: Full TypeScript interfaces in
src/utils/schemas.ts - ✅ Well-documented: Every tool has a concrete JSON example and complete response schema with field descriptions
- ✅ Schema definitions: All tools include
responseSchemawith detailed field descriptions, types, enums, and required/optional indicators - ✅ Temporal parity: All date fields include both ISO 8601 string (
*_at) and Unix timestamp (*_timestamp) - ✅ Normalized values: Types, sides, currencies, and pairs are normalized for consistency
- ✅ Union types: Status and type fields use controlled vocabularies (e.g.,
"active" | "completed" | "failed") - ✅ Enhanced metadata: Paginated responses include
total_records,limit,offset, andhas_moreflags - ✅ Service breakdown: Portfolio valuation includes
by_servicebreakdown (wallet, pro, earn, loan_guarantees)
Instead of raw API responses like:
{
"data": [
{
"orderId": "...",
"guaranteeSymbol": "BTC",
"loanSymbol": "EUR",
"createdAt": "2024-01-01T00:00:00.000Z"
}
]
}You get optimized responses like:
[
{
"id": "...",
"guarantee_symbol": "BTC",
"loan_symbol": "EUR",
"created_at": "2024-01-01T00:00:00.000Z"
}
]See SCHEMA_MAPPING.md for complete response schemas with field descriptions and examples for all 46 tools.
- Node.js: v18 or higher.
- Bit2Me Account: You need a verified Bit2Me account.
- Go to your Bit2Me API Dashboard.
- Click on "New Key".
- Select the permissions you need (e.g., Wallets, Trading, Earn, Loans).
⚠️ Security Note: This MCP server does NOT support crypto withdrawals to external blockchain addresses or transfers to other users. For security best practices, please DO NOT enable "Withdrawal" permissions on your API Key. Internal transfers between your own Bit2Me wallets (Wallet ↔ Pro ↔ Earn) are fully supported.
-
Clone the repository:
git clone https://github.com/bit2me-devs/bit2me-mcp.git cd bit2me-mcp -
Install dependencies:
npm install
-
Configure environment variables: Create a
.envfile in the root directory:cp .env.example .env
Edit
.envand add your keys:BIT2ME_API_KEY=YOUR_BIT2ME_ACCOUNT_API_KEY BIT2ME_API_SECRET=YOUR_BIT2ME_ACCOUNT_API_SECRET # Optional Configuration BIT2ME_REQUEST_TIMEOUT=30000 # Request timeout in ms (default: 30000) BIT2ME_MAX_RETRIES=3 # Max retries for rate limits (default: 3) BIT2ME_RETRY_BASE_DELAY=1000 # Base delay for backoff in ms (default: 1000) BIT2ME_LOG_LEVEL=info # Log level: debug, info, warn, error (default: info)
-
Build the project:
npm run build
To use this server with the Claude Desktop application, add the following configuration to your claude_desktop_config.json file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"bit2me": {
"command": "node",
"args": ["/absolute/path/to/bit2me-mcp/build/index.js"],
"env": {
"BIT2ME_API_KEY": "YOUR_BIT2ME_ACCOUNT_API_KEY",
"BIT2ME_API_SECRET": "YOUR_BIT2ME_ACCOUNT_API_SECRET"
}
}
}
}Note: Replace
/absolute/path/to/...with the actual full path to your project.
For detailed information about reporting vulnerabilities and our security policy, please see SECURITY.md.
- API Keys: Never commit API keys to version control.
- Permissions: Use minimal permissions. Avoid "Withdrawal" permissions for MCP usage.
- Logging: The server automatically sanitizes sensitive data in logs.
The Bit2Me API enforces rate limits to ensure stability.
- 429 Too Many Requests: If the server hits a rate limit, it will automatically retry the request after a 1-second delay (up to 3 retries).
- Console Warnings: You may see warnings in the logs if rate limits are hit.
- Best Practice: Avoid asking for massive amounts of data in a very short loop.
- Exponential Backoff: The server now uses exponential backoff with jitter for retries to handle rate limits more gracefully.
The server implements a structured logging system that automatically sanitizes sensitive data (API keys, signatures).
You can control the verbosity using the BIT2ME_LOG_LEVEL environment variable:
debug: Detailed request/response logs (useful for development)info: Startup and operational events (default)warn: Rate limits and non-critical issueserror: API errors and failures
- Ensure the MCP server is running.
- Check that the path in
claude_desktop_config.jsonpoints correctly to thebuild/index.jsfile.
- Verify your keys in
.envor the Claude config. - Ensure your API keys have the necessary permissions (Wallet, Trade, Earn, etc.) enabled in the Bit2Me dashboard.
- Check that there are no extra spaces or quotes around the API key values.
- The Bit2Me API has rate limits. The server automatically retries with exponential backoff.
- If you're hitting rate limits frequently, reduce the number of concurrent requests.
- Consider adding delays between operations in your workflows.
- Restart Claude Desktop completely (quit and reopen).
- Check the Claude Desktop logs for initialization errors.
- Verify the configuration file syntax is valid JSON.
- Check your internet connection.
- Increase
BIT2ME_REQUEST_TIMEOUTin your environment variables (default: 30000ms). - Some Bit2Me API endpoints may be temporarily slow.
- When using
npx, environment variables must be set in the config file'senvsection. - For local development, ensure the
.envfile is in the project root. - The server prioritizes config-provided credentials over
.envfile values.
- The MCP server runs server-side and doesn't have CORS restrictions.
- Network errors usually indicate connectivity problems or API downtime.
- Check the Bit2Me status page or try again later.
- Run the server manually to see logs:
npm run dev
- Set
BIT2ME_LOG_LEVEL=debugfor detailed logging. - Check Claude Desktop logs:
- macOS:
~/Library/Logs/Claude/mcp*.log - Windows:
%APPDATA%\Claude\logs\mcp*.log
- macOS:
MCP Inspector is the official debugging tool for MCP servers. It provides a web interface to test your tools, view responses, and debug issues.
npm install -g @modelcontextprotocol/inspectorYou have two options to run the inspector:
Use the published package from npm - no build required:
export BIT2ME_API_KEY=YOUR_BIT2ME_ACCOUNT_API_KEY
export BIT2ME_API_SECRET=YOUR_BIT2ME_ACCOUNT_API_SECRET
npx -y @modelcontextprotocol/inspector npx @bit2me/mcp-serverFor development or testing unreleased changes:
# 1. Clone and build the project
git clone https://github.com/bit2me-devs/bit2me-mcp.git
cd bit2me-mcp
npm install
npm run build
# 2. Run the inspector
export BIT2ME_API_KEY=YOUR_BIT2ME_ACCOUNT_API_KEY
export BIT2ME_API_SECRET=YOUR_BIT2ME_ACCOUNT_API_SECRET
npx @modelcontextprotocol/inspector node build/index.jsNote: The inspector will automatically open at http://localhost:5173
The web interface provides:
-
Tools Tab:
- View all 47 available tools
- See input schemas for each tool
- Test tools with custom parameters
- View formatted responses
-
Resources Tab:
- Explore available resources (if any)
-
Prompts Tab:
- Test prompt templates (if configured)
-
Request/Response Logs:
- See all MCP protocol messages
- Debug communication issues
- View timing information
- Navigate to the Tools tab
- Select a tool (e.g.,
market_get_ticker) - Fill in the required parameters:
{ "base_symbol": "BTC", "quote_symbol": "EUR" } - Click Run to execute the tool
- View the formatted response in the output panel
The project's landing page is located in the /landing directory.
Deployment is automated using GitHub Actions.
How to update the website:
- Edit the HTML/CSS files in
/landing. - Push your changes to the
mainbranch. - The
.github/workflows/deploy.ymlaction will automatically publish the changes.
Domain:
The /landing/CNAME file manages the custom domain configuration.
We welcome contributions to improve this MCP server! Whether it's fixing bugs, adding new tools, or improving documentation, your help is appreciated.
Please read our Contributing Guidelines for details on:
- Setting up your development environment
- Running tests
- Commit conventions (Conventional Commits)
- Pull Request process
- Fork and Clone:
git clone https://github.com/bit2me-devs/bit2me-mcp.git
- Install Dependencies:
npm install
- Create a Branch:
git checkout -b feat/amazing-feature
For full details, check the CONTRIBUTING.md file.
Be respectful, inclusive, and constructive. We're all here to learn and build together.