OneTick MCP Server
Enables enterprise-grade OneTick tick data analytics with 18 tools for market data retrieval, metadata discovery, and analytics computations across 200+ global exchanges.
README
OneTick MCP Server
Enterprise-grade MCP server for OneTick tick data analytics. Provides 18 tools across 4 categories, 6 workflow commands, and 6 domain skills — covering equities, futures, FX, options, and indices from 200+ global exchanges.
Quick Start
1. Install
git clone https://github.com/your-org/onetick-mcp.git
cd onetick-mcp
pip install -e .
2. Set Credentials
export ONETICK_CLIENT_ID=your_client_id
export ONETICK_CLIENT_SECRET=your_client_secret
Or copy .env.example to .env and fill in your credentials.
3. Connect to Claude
Choose your platform below.
Platform Setup
Claude Code (CLI)
Register the MCP server so Claude Code can use all 18 tools:
# Add to your current project
claude mcp add onetick -- onetick-mcp
# Or with explicit credentials
claude mcp add onetick \
--env ONETICK_CLIENT_ID=your_client_id \
--env ONETICK_CLIENT_SECRET=your_client_secret \
-- onetick-mcp
# Verify it's registered
claude mcp list
This creates a .mcp.json in your project root. To register across all projects instead:
claude mcp add --scope user onetick -- onetick-mcp
Direct mode (registers all 18 tools upfront instead of 3 meta-tools — uses more tokens but skips the discovery step):
claude mcp add onetick -- onetick-mcp --direct
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"onetick": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/onetick_mcp",
"onetick-mcp"
],
"env": {
"ONETICK_CLIENT_ID": "your_client_id",
"ONETICK_CLIENT_SECRET": "your_client_secret"
}
}
}
}
Replace /path/to/onetick_mcp with the actual path to this repository.
Using Skills and Commands
The server ships with 6 skills (domain knowledge) and 6 commands (step-by-step workflows) that tell Claude how to chain the MCP tools into complete analyses. These work together: commands define what to do, skills provide how to interpret the results.
Skills (Domain Knowledge)
Skills are loaded from the skills/ directory. Each skill teaches Claude a domain — what metrics matter, how to interpret them, and what output format to produce.
| Skill | Domain | When to Use |
|---|---|---|
tca-analysis |
Execution benchmarking | Trading costs, slippage, VWAP shortfall, cost decomposition |
market-microstructure |
Liquidity & price formation | Order book depth, bid-ask dynamics, buy/sell pressure |
intraday-analytics |
Volume & momentum | Volume profile, VWAP deviation, unusual activity detection |
volatility-analysis |
Risk measurement | Realized vol, vol regimes, historical percentile comparison |
execution-quality |
Fill assessment | Interval-level benchmark comparison, best/worst fill windows |
market-overview |
Daily briefing | Price action, volume, volatility, spreads across symbols |
Commands (Workflow Orchestration)
Commands are loaded from the commands/ directory. Each command chains 3-5 tool calls into a complete analysis with a defined workflow.
| Command | What It Does | Tool Chain |
|---|---|---|
/analyze-tca |
Transaction Cost Analysis | CALC_VWAP -> CALC_SPREAD_STATS -> CALC_TRADE_STATS -> GET_BARS |
/analyze-microstructure |
Market microstructure | GET_BOOK_SNAPSHOT -> CALC_BOOK_IMBALANCE -> CALC_SPREAD_STATS |
/analyze-intraday |
Intraday activity profile | CALC_VWAP -> CALC_TRADE_STATS -> GET_BARS |
/analyze-volatility |
Realized volatility analysis | CALC_VOLATILITY -> GET_DAILY_BARS -> CALC_SPREAD_STATS -> CALC_TRADE_STATS |
/analyze-execution |
Execution quality assessment | CALC_VWAP -> CALC_TRADE_STATS -> CALC_SPREAD_STATS -> GET_BARS |
/market-overview |
Market snapshot | GET_DAILY_BARS -> CALC_VWAP -> CALC_TRADE_STATS -> CALC_VOLATILITY -> CALC_SPREAD_STATS |
How to Use in Claude Code
Once the MCP server is registered, you can use commands and ask questions naturally:
# Run a workflow command
/analyze-tca AAPL 2024-01-15 09:30:00 2024-01-15 16:00:00
# Ask natural language questions (Claude picks the right tools)
"What's the VWAP for MSFT today?"
"Show me the order book for TSLA"
"Morning briefing for AAPL, MSFT, GOOGL"
"How volatile is AMZN compared to the last 20 days?"
# Run multi-symbol analysis
/market-overview AAPL,MSFT,GOOGL,AMZN
How Skills and Commands Work Together
Each command references its corresponding skill. For example, /analyze-tca uses the tca-analysis skill for domain expertise:
- Command defines the workflow: which tools to call, in what order, with what parameters
- Skill provides interpretation: what the numbers mean, how to classify results, what output format to use
- MCP Tools execute the computation: deterministic analytics on OneTick's C++ engine
This separation means you can also ask free-form questions. Claude will use the skill knowledge to pick the right tools and interpret results, even without invoking a command explicitly.
Packaging as a Plugin
To distribute the server + skills + commands as a self-contained Claude Code plugin:
1. Create Plugin Manifest
Create .claude-plugin/plugin.json:
{
"name": "onetick",
"description": "OneTick market data analytics — tick data, TCA, microstructure, volatility analysis across 200+ global exchanges",
"version": "0.2.0",
"author": {
"name": "OneTick"
}
}
2. Create Plugin MCP Config
Create .mcp.json at the repo root:
{
"mcpServers": {
"onetick": {
"type": "stdio",
"command": "onetick-mcp",
"env": {
"ONETICK_CLIENT_ID": "${ONETICK_CLIENT_ID}",
"ONETICK_CLIENT_SECRET": "${ONETICK_CLIENT_SECRET}"
}
}
}
}
3. Test the Plugin
claude --plugin-dir /path/to/onetick_mcp
When packaged as a plugin, commands are namespaced:
/onetick:analyze-tca AAPL 2024-01-15 09:30:00 2024-01-15 16:00:00
Plugin Directory Structure
onetick_mcp/
├── .claude-plugin/
│ └── plugin.json <- Plugin manifest
├── .mcp.json <- MCP server config (auto-starts with plugin)
├── commands/ <- Workflow commands (become slash commands)
│ ├── analyze-tca.md
│ ├── analyze-microstructure.md
│ ├── analyze-intraday.md
│ ├── analyze-volatility.md
│ ├── analyze-execution.md
│ └── market-overview.md
├── skills/ <- Domain knowledge (loaded automatically)
│ ├── tca-analysis/SKILL.md
│ ├── market-microstructure/SKILL.md
│ ├── intraday-analytics/SKILL.md
│ ├── volatility-analysis/SKILL.md
│ ├── execution-quality/SKILL.md
│ └── market-overview/SKILL.md
├── src/ <- MCP server implementation
│ ├── server.py
│ ├── config.py
│ ├── response.py
│ └── tools/
│ ├── registry.py
│ ├── meta_tools.py
│ ├── data_retrieval.py
│ ├── metadata.py
│ ├── analytics.py
│ └── sql.py
├── tests/
├── CONNECTORS.md <- Complete tool reference
├── pyproject.toml
└── .env.example
MCP Tools Reference
Progressive Discovery (Default)
The server exposes only 3 meta-tools by default, reducing token usage by ~88%:
| Meta-Tool | Purpose |
|---|---|
TOOL_LIST |
List all 18 tools with brief descriptions (~1,000 tokens) |
TOOL_GET |
Full schema for specific tool(s) (~200 tokens per tool) |
TOOL_CALL |
Execute a tool by name with JSON arguments |
Workflow: TOOL_LIST -> identify relevant tools -> TOOL_GET for schemas -> TOOL_CALL with arguments.
Use --direct mode to register all 18 tools upfront (no meta-tools, but ~8,000 tokens upfront).
Market Data Retrieval (8 tools)
| Tool | Description | Key Parameters |
|---|---|---|
GET_TICK_DATA |
Raw tick data (trades, quotes, NBBO) for a single symbol | symbol, tick_type, database, start, end, max_rows |
GET_BARS |
OHLC/VWAP/TWAP bars at configurable intervals | symbol, bar_type, interval, database |
GET_DAILY_BARS |
End-of-day OHLCV with corporate action adjustment | symbol, start_date, end_date, adjusted |
GET_MULTI_SYMBOL |
Data for 2+ symbols in parallel | symbols, data_type, bar_type, interval |
GET_BOOK_SNAPSHOT |
Point-in-time order book reconstruction | symbol, timestamp, max_levels |
GET_BOOK_TIMESERIES |
Order book snapshots at regular intervals | symbol, start, end, interval |
GET_CORPORATE_ACTIONS |
Splits, dividends, mergers, adjustment factors | symbol, start_date, end_date |
GET_STATIC_DATA |
Reference data (name, currency, ISIN) or auction prices | symbol, data_type |
Metadata & Discovery (4 tools)
| Tool | Description |
|---|---|
LIST_DATABASES |
All available databases by region and asset class |
GET_DATABASE_INFO |
Tick types, date range, schema for a specific database |
SEARCH_SYMBOLS |
Find symbols by pattern (SQL LIKE: 'AAPL', 'AA%', '%GOLD%') |
LIST_VENUES |
All supported exchanges by region and asset class |
Analytics & Computation (5 tools)
All computations are deterministic, executed on OneTick's C++ engine.
| Tool | Description | Formula |
|---|---|---|
CALC_VWAP |
Single aggregate VWAP for a time range | SUM(Price*Volume) / SUM(Volume) |
CALC_SPREAD_STATS |
Bid-ask spread statistics per interval | Spread = ASK - BID |
CALC_BOOK_IMBALANCE |
Order book buy/sell pressure | (BidVol - AskVol) / (BidVol + AskVol) |
CALC_VOLATILITY |
Realized volatility from trade data | StdDev(log returns), annualized |
CALC_TRADE_STATS |
Trade flow: count, volume, VWAP, avg size per interval | Aggregated from trade ticks |
SQL (1 tool)
| Tool | Description |
|---|---|
EXECUTE_SQL |
Run OneTick SQL SELECT queries. Table format: DATABASE.TICK_TYPE |
See CONNECTORS.md for complete parameter specifications and optimization guidance.
Usage Examples
Quick Lookups
"What is the current price of AAPL?"
-> GET_TICK_DATA (symbol='AAPL', tick_type='TRD', max_rows=1)
"EUR/USD rate right now"
-> GET_TICK_DATA (symbol='EUR/USD', database='GLOBAL_FX', tick_type='QTE', max_rows=1)
"What's the DJIA at?"
-> GET_TICK_DATA (database='DJ_INDICES', max_rows=1)
Daily / Historical Data
"AAPL daily chart for this month"
-> GET_DAILY_BARS (symbol='AAPL', start_date='2026-04-01', end_date='2026-04-30')
"MSFT historical prices adjusted for splits"
-> GET_DAILY_BARS (symbol='MSFT', adjusted=True)
Intraday Bars
"5-minute OHLC bars for AAPL today"
-> GET_BARS (symbol='AAPL', bar_type='ohlc', interval='5min')
"Compare 5-min bars for AAPL, MSFT, GOOGL"
-> GET_MULTI_SYMBOL (symbols='AAPL,MSFT,GOOGL', data_type='bars', interval='5min')
Analytics
"What's the VWAP for AAPL today?"
-> CALC_VWAP (symbol='AAPL', start='2026-04-08 09:30:00', end='2026-04-08 16:00:00')
"Is there buying pressure in TSLA?"
-> CALC_BOOK_IMBALANCE (symbol='TSLA')
"Realized volatility for GOOGL"
-> CALC_VOLATILITY (symbol='GOOGL', interval='5min')
Workflow Commands
"Run a TCA for CSCO from 9:30 to 12:00 on Jan 3, 2024"
-> /analyze-tca chains: CALC_VWAP -> CALC_SPREAD_STATS -> CALC_TRADE_STATS -> GET_BARS
"Analyze AAPL's market microstructure"
-> /analyze-microstructure chains: GET_BOOK_SNAPSHOT -> CALC_BOOK_IMBALANCE -> CALC_SPREAD_STATS
"Morning briefing for AAPL, MSFT, GOOGL"
-> /market-overview chains: GET_DAILY_BARS -> CALC_VWAP -> CALC_TRADE_STATS -> CALC_VOLATILITY -> CALC_SPREAD_STATS
SQL Queries
SELECT SYMBOL_NAME, SUM(SIZE) AS VOLUME
FROM US_COMP.TRD
WHERE SYMBOL_NAME = 'AAPL'
AND TIMESTAMP >= '2024-01-15 09:30:00 America/New_York'
GROUP BY SYMBOL_NAME
Tool Selection Guide
| Question Type | Use This Tool | NOT This |
|---|---|---|
| "What is the price of X?" | GET_TICK_DATA (max_rows=1) |
GET_DAILY_BARS |
| "X daily chart" | GET_DAILY_BARS |
GET_BARS or GET_TICK_DATA |
| "VWAP for X" (single number) | CALC_VWAP |
GET_BARS |
| "VWAP bars every 5min" (time series) | GET_BARS (bar_type=vwap) |
CALC_VWAP |
| "Volume today" | CALC_TRADE_STATS |
GET_TICK_DATA |
| "Bid-ask spread" | CALC_SPREAD_STATS |
GET_TICK_DATA |
| "Show order book" | GET_BOOK_SNAPSHOT |
CALC_BOOK_IMBALANCE |
| "Buying/selling pressure" | CALC_BOOK_IMBALANCE |
GET_BOOK_SNAPSHOT |
| "What databases exist?" | LIST_DATABASES |
LIST_VENUES |
| "What exchanges exist?" | LIST_VENUES |
LIST_DATABASES |
| "Compare multiple symbols" | GET_MULTI_SYMBOL |
Multiple GET_TICK_DATA calls |
Supported Databases
| Database | Asset Class | Region | Examples |
|---|---|---|---|
| US_COMP | Equities | US | AAPL, MSFT, GOOGL, TSLA |
| CME | Futures | US | ES (S&P), CL (crude oil), GC (gold), NG (nat gas) |
| GLOBAL_FX | FX | Global | EUR/USD, GBP/JPY, USD/JPY |
| LSE | Equities | EU | VOD, BP, HSBA |
| XETRA | Equities | EU | SIE, SAP, ALV |
| EURONEXT | Equities | EU | AI, MC, SAN |
| EUREX | Futures | EU | FESX, FGBL |
| SP_INDICES | Indices | US | SPX, RUT |
| DJ_INDICES | Indices | US | INDU (DJIA) |
| CBOE_IDX | Indices | US | VIX |
| US_OPTIONS | Options | US | OPRA consolidated |
| CA_COMP / TSX | Equities | CA | RY, TD, BNS |
OneTick cloud demo databases use _SAMPLE suffix (e.g., US_COMP_SAMPLE). The server resolves this automatically — if US_COMP is not found, it tries US_COMP_SAMPLE.
Requirements
- Python 3.10+
- OneTick Cloud API credentials (
ONETICK_CLIENT_IDandONETICK_CLIENT_SECRET) onetick-py[webapi]package (installed automatically)- Valid OneTick data entitlements for the databases you want to access
Credential Setup
Obtaining Credentials
- Log in to your OneTick Cloud account at cloud.onetick.com
- Navigate to API settings or contact your OneTick administrator
- Generate a client ID and client secret for API access
Configuration Methods
| Method | Best For | How |
|---|---|---|
| Environment variables | Development | export ONETICK_CLIENT_ID=... |
.env file |
Local use | Copy .env.example to .env |
| Claude Desktop config | Claude Desktop | Add to claude_desktop_config.json |
| CLI arguments | Quick testing | onetick-mcp --client-id X --client-secret Y |
OneTick Connection Details
- REST endpoint:
https://rest.cloud.onetick.com:443 - Auth endpoint:
https://cloud-auth.parent.onetick.com/realms/OMD/protocol/openid-connect/token - Authentication: OAuth2 client_credentials flow (automatic)
Running Tests
# Tool selection validation (7 tests)
python tests/test_tool_selection.py
# Workflow/skill structure validation (9 tests)
python tests/test_workflow_validation.py
# Independent query optimization validation (10 rules, 100 queries)
python tests/test_independent_queries.py
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.