crypto_mcp
Fetches real-time cryptocurrency prices and symbol lists from Binance exchange. Allows submitting demo orders with a safety confirmation flow for testing trading strategies without live funds.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@crypto_mcpwhat's the current Bitcoin price?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
crypto_mcp
crypto_mcp is a refactor of crypto_bot into a single MCP-first repository.
Python requirement: >=3.11.
For user-facing capability map, see: docs/CAPABILITIES.MD.
What this project does
Expose deterministic MCP tools over stdio.
Keep transport contract stable for LLM clients.
Separate market data (safe/read-only) from trading (gated).
Keep exchange adapters replaceable.
Related MCP server: Alpaca Trading Bot MCP Server
Architecture
src/crypto_mcp/mcp_server.py: FastMCP server and tool definitions.src/crypto_mcp/agent.py: NL command router mapping prompts to MCP tools.src/crypto_mcp/config.py: Typed settings loader with sane defaults and clamps.src/crypto_mcp/adapters/binance.py: Binance HTTP adapter abstraction.src/crypto_mcp/main.py: Runnable MCP entrypoint.tests/: MCP contract, core server, and agent unit tests.
Detailed architecture: docs/ARCHITECTURE.MD.
Capabilities quick table
Area | What it does | Main MCP tools |
Runtime health | Reports service state, limits, mode, exchanges |
|
Exchange inventory | Lists adapter-backed exchanges |
|
Market data | Fetches ticker prices and symbol lists |
|
Guarded execution | Submits demo orders with explicit confirmation gate |
|
NL routing | Maps natural language to MCP tool calls |
|
Design pattern references taken from polymarket_mcp:
deterministic tool envelope:
{ok, tool, ...}bounded limits for list/read tools
safety confirmation flow for trade tools
split entrypoint (
main.py) from MCP server implementation
Quickstart
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .env
python -m pytest
crypto-mcp-server
# separate terminal
crypto-mcp-agentSetup path-style variant:
cd /path/to/crypto_mcp
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .envAlternative module runner:
python -m crypto_mcp.main
crypto-mcpSafety defaults
DRY_RUN=true
Default path is non-live demo execution.
Run MCP server locally
Stdio server (local MCP clients):
crypto-mcp-serverFor MCP Inspector debugging:
npx @modelcontextprotocol/inspector python -m crypto_mcp.mainDo not write print() logs inside stdio server paths. Use logging to stderr.
Available MCP tools:
healthlist_exchangesget_pricelist_exchange_symbolssubmit_demo_orderconfirm_pending_order
Tool response envelope is consistent:
ok: booleantool: tool nameerror+error_categoryon failurestool-specific payload under
payload
MCP limits are controlled by:
MCP_DEFAULT_LIMITMCP_MAX_LIMITMCP_CONTEXT_MODE(sharedorrequest)
Order safety controls are controlled by:
DRY_RUNREQUIRE_CONFIRMATION_ABOVE_USD
Connect this MCP to clients
Use path placeholders:
path/to/crypto_mcp= repository root.path/to/crypto_mcp/.venv/bin/python= project interpreter.
GitHub Copilot (VS Code Agent Mode)
Add MCP server config in your VS Code MCP settings JSON:
{
"mcpServers": {
"crypto-mcp": {
"command": "python",
"args": ["-m", "crypto_mcp.main"],
"cwd": "path/to/crypto_mcp",
"env": {
"PYTHONPATH": "src"
}
}
}
}If your environment requires venv binary, use:
{
"command": "path/to/crypto_mcp/.venv/bin/python",
"args": ["-m", "crypto_mcp.main"]
}Claude Desktop
Edit Claude Desktop MCP config and add:
{
"mcpServers": {
"crypto-mcp": {
"command": "path/to/crypto_mcp/.venv/bin/python",
"args": ["-m", "crypto_mcp.main"],
"cwd": "path/to/crypto_mcp",
"env": {
"PYTHONPATH": "src"
}
}
}
}Restart Claude Desktop after changes.
OpenCode
OpenCode can run MCP from command config. Add server entry in your OpenCode MCP configuration:
{
"mcpServers": {
"crypto-mcp": {
"command": "path/to/crypto_mcp/.venv/bin/python",
"args": ["-m", "crypto_mcp.main"],
"cwd": "path/to/crypto_mcp",
"env": {
"PYTHONPATH": "src"
}
}
}
}Then restart OpenCode session and verify tools:
healthlist_exchangesget_pricelist_exchange_symbolssubmit_demo_orderconfirm_pending_order
OpenCode install and usage:
# install OpenCode (example)
npm install -g opencode-ai
# verify installation
opencode --version
# start session in this repository
cd path/to/crypto_mcp
opencodeInside OpenCode:
ensure MCP server
crypto-mcpis connected.run a quick tool check with
health.ask natural language command examples:
"get btcusdt price"
"list 20 symbols"
"buy 50 btcusdt"
Environment
Copy .env.example to .env and update values.
MCP_DEFAULT_LIMIT,MCP_MAX_LIMITMCP_CONTEXT_MODE(sharedorrequest)DRY_RUN(true/false)EXCHANGES_ENABLED(binancedefault)GEMINI_API_KEY(optional, used by local NL routing layer)BINANCE_API_BASE_URLBINANCE_API_KEY,BINANCE_API_SECRETREQUIRE_CONFIRMATION_ABOVE_USD
For this task, an empty .env file exists and is safe because defaults are clamped.
What this MCP can do
Read-only tools:
health: service status, context mode, limits, enabled exchanges.list_exchanges: list adapter-backed exchanges.get_price: fetch ticker price for symbol/exchange.list_exchange_symbols: bounded symbol list with clamp.
Trading flow tools (safety-gated):
submit_demo_order: validates side/symbol/size and creates pending confirmation above threshold.confirm_pending_order: executes pending order if valid and not expired.
Order confirmation flow:
Call
submit_demo_order.If payload has
status=pending_confirmation, captureconfirmation_id.Call
confirm_pending_order(confirmation_id).
Contract:
deterministic response envelope:
{ok, tool, payload}on success.deterministic error envelope:
{ok, tool, error, error_category}on failure.live trading intentionally disabled: returns
live_trading_not_implementedwhenDRY_RUN=false.
Safety Notes
submit_demo_ordernever executes live orders; withDRY_RUN=falseit returnslive_trading_not_implemented.submit_demo_orderrequires explicit confirmation for large notional.response shape never raises raw exceptions to MCP caller; errors are categorized.
Tests
python -m pytestImportant notes
Local MCP stdio transport must keep stdout clean JSON-RPC only.
This project is starter infrastructure. Not trading advice.
Add stronger risk modules before real funds.
Known improvement areas (scan summary)
Add adapter-level symbol tradability validation before order acceptance.
Replace broad internal exception mapping with sanitized provider error codes.
Add confirmation-expiry regression tests at MCP wrapper level.
Add optional HTTP transport runner for remote clients.
Available Tools
6 toolsconfirm_pending_orderD
| Name | Required | Description | Default |
|---|---|---|---|
| confirmation_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_priceD
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| exchange | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
healthD
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_exchangesD
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_exchange_symbolsD
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| exchange | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
submit_demo_orderD
| Name | Required | Description | Default |
|---|---|---|---|
| side | No | BUY | |
| symbol | No | BTCUSDT | |
| exchange | No | binance | |
| usd_size | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v0.1.0- First observed
confirm_pending_order - First observed
get_price - First observed
health - First observed
list_exchange_symbols - First observed
list_exchanges - First observed
submit_demo_order
TDQS
Each tool has a clearly distinct purpose: health for server status, list_exchanges for exchange discovery, get_price for market data, list_exchange_symbols for symbol discovery, and the two order tools for demo order submission and confirmation. No two tools appear to overlap in functionality.
Most tool names follow a verb_noun pattern with snake_case (list_exchanges, get_price, submit_demo_order), but 'health' is a bare noun that deviates from this pattern. Overall, the naming is consistent and predictable.
Six tools is a well-scoped size for a crypto demo trading server, covering health, market data, and order lifecycle without unnecessary bloat. The count fits comfortably within the ideal range.
The tool set covers market data (price, symbols) and demo order submission/confirmation, but lacks common trading operations like order cancellation, order status retrieval, or balance queries. These gaps could hinder agents trying to manage orders beyond the basic submission flow.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Live prices, perps, prediction markets and a paper trading desk over one MCP.
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
21Real-time crypto market data: candles, tickers, orderbooks across 13+ exchanges via MCP.
Related MCP Servers
- FlicenseCqualityCmaintenanceProvides access to CoinCap's cryptocurrency market data and technical analysis tools via MCP, supporting assets, exchanges, markets, and more.38317-
- FlicenseNot gradedqualityCmaintenanceExposes Alpaca paper trading as MCP tools for checking quotes, managing a watchlist, checking market hours, and placing simulated trades.-
- AlicenseAqualityCmaintenanceMCP server for accessing crypto market data (prices, portfolio analytics) from CoinGecko and performing RAG-based search over internal documents with responsible-AI guardrails.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables fetching cryptocurrency prices, historical OHLC data, and news via CryptoCompare API through an MCP gateway.6MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DressPD/crypto_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server