Skip to main content
Glama
AADHITYA369

mcp-market-server

by AADHITYA369

mcp-market-server

MCP (Model Context Protocol) сервер, предоставляющий живые данные крипторынка и бумажный торговый движок в виде стандартизованных вызовов инструментов — так что любой агент (Claude Code, кастомные мультиагентные системы) может запрашивать Bybit и выполнять имитационные сделки.

Разработан для заявки на стажировку Tower Research Capital AI/ML: демонстрирует интеграцию MCP, вызовы инструментов агентом, контроль рисков и продакшн-код на Python.

Архитектура

┌─────────────┐     MCP stdio      ┌──────────────────┐    REST     ┌─────────┐
│ Claude Code │ ◄───────────────► │  FastMCP Server  │ ─────────►  │  Bybit  │
│   / Agent   │                    │  (tools.py)      │  public API │   v5    │
└─────────────┘                    └────────┬─────────┘             └─────────┘
                                            │
                                   ┌────────▼─────────┐
                                   │  Paper Engine    │
                                   │  SQLite + Risk   │
                                   └──────────────────┘

Related MCP server: Data Puller MCP Server

Доступные инструменты

Инструмент

Описание

get_klines

OHLCV-свечи для любого символа/таймфрейма

get_orderbook

Снимок стакана L2

get_ticker

Последняя цена / статистика за 24 часа

place_paper_order

Рыночный/лимитный ордер в бумажный движок (с защитой рисков)

cancel_order

Отменить открытый бумажный ордер

get_positions

Открытые позиции + нереализованная прибыль/убыток

get_orders

История открытых/исполненных ордеров

close_position

Закрыть позицию по рыночной цене

get_account

Остаток денежных средств, собственный капитал, реализованная/нереализованная прибыль/убыток

Риск-защита (бумажный движок)

  • Максимальный номинал на ордер (risk.max_order_notional_usd)

  • Максимум открытых позиций (risk.max_open_positions)

  • Остановка по дневному убытку — торговля отключается, когда дневная просадка превышает лимит

  • Каждый ордер и решение записываются в таблицу аудит-лога

Настройка

cd mcp-market-server
python -m venv .venv && .venv\Scripts\activate     # Windows
pip install -e ".[dev]"
cp .env.example .env                                # optional overrides
pytest                                              # run tests

Регистрация в Claude Code

{
  "mcpServers": {
    "market": {
      "command": "python",
      "args": ["-m", "mcp_market_server.server"],
      "cwd": "/absolute/path/to/mcp-market-server"
    }
  }
}

Или через командную строку:

claude mcp add market -- python -m mcp_market_server.server

Демо-запросы

Fetch the last 100 hourly candles for BTCUSDT and summarize the trend.

Place a paper long of 0.01 BTCUSDT with a 2% stop loss and take profit at 3%.

Show my account, then flatten everything if unrealized PnL is worse than -$50.

Заметки по дизайну

  • Только публичные эндпоинты — без API-ключей и реальных денег. Бумажный движок исполняет рыночные ордера по живой цене биржи, лимитные — при касании цены.

  • SQLite для ордеров/позиций/сделок/аудита — персистентность без внешних зависимостей, как в квант-отделах ведётся журнал каждого решения.

  • Слой риска между инструментами и движком — та же схема, что и на реальном торговом столе: стратегия предлагает, риск распоряжается.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP-compatible AI clients to access live crypto market data and AI-driven quantitative analysis, with structured outputs and full observability.
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables fetching live crypto market data from Binance, Bybit, and Hyperliquid via MCP tools, including klines, orderbook, funding rates, technical indicators, and market breadth for real-time analysis by LLMs.
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to operate a local financial terminal, including market data, backtesting, paper portfolio management, and news digest, through safe, gated tools over MCP.
    6
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI agents to trade crypto with paper money, access market data, view leaderboards, and manage trading bots via an MCP-compatible interface.
    16
    MIT

View all related MCP servers

Related MCP Connectors

  • Agent-native crypto market-data over MCP+REST: order flow, whales, liquidations, calibrated scores

  • Crypto transaction firewall and risk tools for MCP agents.

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

View all MCP Connectors

Latest Blog Posts

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/AADHITYA369/mcp-market-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server