DataBento MCP Server
Provides professional market data access via DataBento API, including real-time futures quotes, historical timeseries, batch downloads, symbol resolution, metadata discovery, and reference data.
README
DataBento MCP Server & Skills
Professional market data access via DataBento API, available as both an MCP server and Claude Code skills.
What's New
Version 3.0 - Dual Deployment: MCP Server + Claude Code Skills
This project now supports two deployment modes:
- MCP Server: For Claude Desktop and other MCP clients (18 tools)
- Claude Code Skills: Native skills for Claude Code CLI (8 skill scripts)
Both modes share the same core functionality:
- Complete Databento API coverage (Timeseries, Metadata, Batch, Symbology, Reference)
- Full Historical API support with flexible schemas
- Real-time futures quotes (ES, NQ)
- Type-safe TypeScript implementation throughout
Choose the deployment that fits your workflow best!
Features
- šÆ Real-time Futures Quotes - Current prices for ES and NQ contracts
- š Historical Timeseries - Stream any market data schema across date ranges
- š Batch Downloads - Submit and manage large historical data jobs
- š Symbol Resolution - Resolve symbols to instrument IDs across datasets
- š Metadata Discovery - Explore datasets, schemas, fields, and pricing
- š¢ Reference Data - Access security master, corporate actions, and adjustments
- ā° Session Detection - Automatic Asian/London/NY session identification
- š Rate Limiting - Built-in request throttling and caching (30s TTL)
- š Error Handling - Graceful failures with clear error messages
Installation
Prerequisites
- Node.js v18+ or compatible runtime
- DataBento API key (get one here)
- For MCP: Claude Desktop or compatible MCP client
- For Skills: Claude Code CLI
Setup
- Clone or download this repository:
cd ~/Dev
git clone <your-repo-url> databento-mcp-server
cd databento-mcp-server
- Install dependencies:
npm install
- Create
.envfile with your DataBento API key:
cp .env.example .env
# Edit .env and add your API key
Your .env should contain:
DATABENTO_API_KEY=db-your-api-key-here
DATABENTO_DATASET=GLBX.MDP3
- Choose your deployment mode below
Configuration
Option 1: MCP Server (for Claude Desktop)
Build the MCP server:
npm run build:mcp
Add to your Claude Desktop MCP configuration (~/.claude/mcp.json):
{
"mcpServers": {
"databento": {
"command": "node",
"args": ["/Users/yourusername/Dev/databento-mcp-server/dist/mcp/mcp/index.js"],
"env": {
"DATABENTO_API_KEY": "db-your-api-key-here"
}
}
}
}
Or use npx directly (if published to npm):
{
"mcpServers": {
"databento": {
"command": "npx",
"args": ["-y", "databento-mcp-server"],
"env": {
"DATABENTO_API_KEY": "db-your-api-key-here"
}
}
}
}
Option 2: Claude Code Skills
Build and install skills:
npm run install:skills
This will:
- Compile the skills from TypeScript
- Copy them to
~/.claude/skills/databento/ - Make scripts executable
Set your API key environment variable:
export DATABENTO_API_KEY="db-your-api-key-here"
# Or add to your .bashrc/.zshrc for persistence
Verify installation:
node ~/.claude/skills/databento/scripts/get-quote.js ES
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
DATABENTO_API_KEY |
ā | - | Your DataBento API key (starts with db-) |
DATABENTO_DATASET |
ā | GLBX.MDP3 |
CME dataset for futures data |
Available Tools
The MCP server provides 18 tools organized into 6 categories:
| Category | Tools | Description |
|---|---|---|
| Original | 3 tools | ES/NQ futures quotes, session info, historical bars |
| Timeseries | 1 tool | Historical market data streaming with flexible schemas |
| Symbology | 1 tool | Symbol resolution and conversion |
| Metadata | 6 tools | Dataset discovery, schema info, cost estimation |
| Batch | 3 tools | Large-scale data download job management |
| Reference | 3 tools | Security master, corporate actions, price adjustments |
Original Tools (Futures & Session)
1. get_futures_quote
Get current price quote for ES or NQ futures.
Input:
{
"symbol": "ES"
}
Output:
{
"symbol": "ES",
"price": 5845.25,
"bid": 5845.00,
"ask": 5845.50,
"spread": 0.50,
"timestamp": "2024-10-02T14:30:00.000Z",
"dataAge": "15s ago",
"source": "DataBento"
}
2. get_session_info
Get current trading session information.
Input:
{
"timestamp": "2024-10-02T14:30:00Z"
}
Note: timestamp is optional, defaults to current time
Output:
{
"currentSession": "NY",
"sessionStart": "2024-10-02T14:00:00.000Z",
"sessionEnd": "2024-10-02T22:00:00.000Z",
"timestamp": "2024-10-02T14:30:00.000Z",
"utcHour": 14
}
Sessions:
- Asian: 00:00 - 07:00 UTC
- London: 07:00 - 14:00 UTC
- NY: 14:00 - 22:00 UTC
3. get_historical_bars
Get historical OHLCV bars for futures contracts.
Input:
{
"symbol": "NQ",
"timeframe": "H4",
"count": 10
}
Output:
{
"symbol": "NQ",
"timeframe": "H4",
"count": 10,
"bars": [
{
"timestamp": "2024-10-02T00:00:00.000Z",
"open": 20150.25,
"high": 20175.50,
"low": 20145.00,
"close": 20160.75,
"volume": 125000
}
]
}
Supported Timeframes:
1h- Hourly barsH4- 4-hour bars (aggregated from 1h)1d- Daily bars
Timeseries Tools
4. timeseries_get_range
Stream historical market data with flexible schemas and date ranges. Supports all Databento schemas.
Input:
{
"dataset": "GLBX.MDP3",
"symbols": "ES.c.0,NQ.c.0",
"schema": "trades",
"start": "2024-10-01",
"end": "2024-10-02",
"stype_in": "raw_symbol",
"stype_out": "instrument_id",
"limit": 1000
}
Supported Schemas:
mbp-1,mbp-10- Market by price (1 or 10 levels)mbo- Market by ordertrades- Trade dataohlcv-1s,ohlcv-1m,ohlcv-1h,ohlcv-1d,ohlcv-eod- OHLCV barsstatistics,definition,imbalance,status- Market metadata
Output:
{
"dataset": "GLBX.MDP3",
"schema": "trades",
"symbols": ["ES.c.0"],
"dateRange": {
"start": "2024-10-01T00:00:00Z",
"end": "2024-10-02T00:00:00Z"
},
"recordCount": 1000,
"data": [
{
"ts_event": "2024-10-01T09:30:00.123456789Z",
"price": 5845.25,
"size": 10,
"side": "B"
}
]
}
Symbology Tools
5. symbology_resolve
Resolve symbols to instrument IDs or other symbol types across a date range.
Input:
{
"dataset": "GLBX.MDP3",
"symbols": ["ES", "NQ"],
"stype_in": "continuous",
"stype_out": "instrument_id",
"start_date": "2024-10-01",
"end_date": "2024-10-02"
}
Symbol Types:
raw_symbol- Native exchange symbolinstrument_id- Databento instrument IDcontinuous- Continuous futures (c.0, c.1, etc.)parent- Parent symbolnasdaq,cms,bats,smart- Venue-specific symbology
Output:
{
"dataset": "GLBX.MDP3",
"stype_in": "continuous",
"stype_out": "instrument_id",
"date_range": {
"start": "2024-10-01",
"end": "2024-10-02"
},
"symbol_count": 2,
"result": "partial",
"mappings": [
{
"input_symbol": "ES.c.0",
"output_symbol": "123456",
"start_date": "2024-10-01",
"end_date": "2024-10-02"
}
]
}
Metadata Tools
6. metadata_list_datasets
List all available Databento datasets with optional date range filtering.
Input:
{
"start_date": "2024-01-01",
"end_date": "2024-12-31"
}
Output:
{
"datasets": [
{
"dataset": "GLBX.MDP3",
"description": "CME Globex MDP 3.0",
"start_date": "2020-01-01",
"end_date": null
}
],
"count": 1
}
7. metadata_list_schemas
List available data schemas for a specific dataset.
Input:
{
"dataset": "GLBX.MDP3"
}
Output:
{
"dataset": "GLBX.MDP3",
"schemas": ["trades", "mbp-1", "mbp-10", "ohlcv-1h", "ohlcv-1d"],
"count": 5
}
8. metadata_list_publishers
List publishers with their details, optionally filtered by dataset.
Input:
{
"dataset": "GLBX.MDP3"
}
Output:
{
"publishers": [
{
"publisher_id": 1,
"dataset": "GLBX.MDP3",
"venue": "CME",
"description": "Chicago Mercantile Exchange"
}
],
"count": 1,
"dataset_filter": "GLBX.MDP3"
}
9. metadata_list_fields
List fields available for a specific schema with their types and descriptions.
Input:
{
"schema": "trades",
"encoding": "json"
}
Output:
{
"schema": "trades",
"encoding": "json",
"fields": [
{
"name": "ts_event",
"type": "uint64",
"description": "Event timestamp in nanoseconds"
},
{
"name": "price",
"type": "int64",
"description": "Price in fixed-point notation"
}
],
"count": 2
}
10. metadata_get_cost
Calculate the cost in USD for a historical data query before downloading.
Input:
{
"dataset": "GLBX.MDP3",
"symbols": "ES.c.0",
"schema": "trades",
"start": "2024-10-01",
"end": "2024-10-02",
"stype_in": "raw_symbol"
}
Output:
{
"dataset": "GLBX.MDP3",
"symbols": ["ES.c.0"],
"schema": "trades",
"cost_usd": 15.50,
"record_count_estimate": 1500000,
"size_bytes_estimate": 45000000
}
11. metadata_get_dataset_range
Get the available date range for a dataset.
Input:
{
"dataset": "GLBX.MDP3"
}
Output:
{
"dataset": "GLBX.MDP3",
"start_date": "2020-01-01",
"end_date": null,
"description": "Data available from 2020-01-01 to present"
}
Batch Tools
12. batch_submit_job
Submit a batch data download job for large historical datasets. Returns job ID and status.
Input:
{
"dataset": "GLBX.MDP3",
"symbols": ["ES.c.0", "NQ.c.0"],
"schema": "trades",
"start": "2024-10-01",
"end": "2024-10-02",
"encoding": "csv",
"compression": "zstd",
"stype_in": "raw_symbol",
"split_duration": "day"
}
Output:
{
"status": "submitted",
"job_id": "abc123def456",
"state": "received",
"dataset": "GLBX.MDP3",
"schema": "trades",
"symbols_count": 2,
"cost_usd": 25.00,
"date_range": {
"start": "2024-10-01",
"end": "2024-10-02"
},
"encoding": "csv",
"compression": "zstd",
"ts_received": "2024-10-03T10:00:00Z",
"message": "Job submitted successfully. Use batch_list_jobs or batch_download to check status and download files when ready."
}
13. batch_list_jobs
List all batch jobs with their current status. Optionally filter by job states or time range.
Input:
{
"states": ["done", "processing"],
"since": "2024-10-01T00:00:00Z"
}
Output:
{
"total_jobs": 5,
"jobs_by_state": {
"done": 3,
"processing": 2
},
"jobs": [
{
"id": "abc123def456",
"state": "done",
"dataset": "GLBX.MDP3",
"schema": "trades",
"symbols_count": 2,
"cost_usd": 25.00,
"date_range": {
"start": "2024-10-01",
"end": "2024-10-02"
},
"record_count": 1500000,
"file_count": 2,
"total_size_bytes": 45000000,
"ts_received": "2024-10-03T10:00:00Z",
"ts_process_done": "2024-10-03T10:15:00Z",
"ts_expiration": "2024-10-10T10:00:00Z"
}
]
}
14. batch_download
Get download information for a completed batch job. Returns download URLs and metadata.
Input:
{
"job_id": "abc123def456"
}
Output:
{
"job_id": "abc123def456",
"state": "done",
"files": [
{
"filename": "20241001.csv.zst",
"size_bytes": 22500000,
"hash": "sha256:abc123...",
"download_url": "https://download.databento.com/..."
}
],
"total_size_bytes": 45000000,
"expiration": "2024-10-10T10:00:00Z"
}
Reference Tools
15. reference_search_securities
Search security master database for instrument metadata.
Input:
{
"dataset": "GLBX.MDP3",
"symbols": "ES.c.0,NQ.c.0",
"start_date": "2024-10-01",
"end_date": "2024-10-02",
"limit": 100
}
Output:
{
"dataset": "GLBX.MDP3",
"symbols": "ES.c.0,NQ.c.0",
"date_range": {
"start": "2024-10-01",
"end": "2024-10-02"
},
"record_count": 2,
"securities": [
{
"instrument_id": "123456",
"raw_symbol": "ESZ4",
"description": "E-mini S&P 500 Dec 2024",
"asset_class": "futures",
"exchange": "CME",
"currency": "USD",
"first_date": "2023-09-18",
"last_date": "2024-12-20",
"min_price_increment": 0.25,
"display_factor": 1.0
}
]
}
16. reference_get_corporate_actions
Get corporate actions (dividends, splits, etc.) for symbols.
Input:
{
"dataset": "XNAS.ITCH",
"symbols": "AAPL,MSFT",
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"action_types": ["dividend", "split"]
}
Output:
{
"dataset": "XNAS.ITCH",
"symbols": "AAPL,MSFT",
"date_range": {
"start": "2024-01-01",
"end": "2024-12-31"
},
"record_count": 5,
"action_types_filter": ["dividend", "split"],
"corporate_actions": [
{
"instrument_id": "789012",
"raw_symbol": "AAPL",
"action_type": "dividend",
"ex_date": "2024-05-10",
"record_date": "2024-05-13",
"payment_date": "2024-05-16",
"amount": 0.25,
"currency": "USD"
}
]
}
17. reference_get_adjustments
Get price adjustment factors for backadjusted prices.
Input:
{
"dataset": "XNAS.ITCH",
"symbols": "AAPL",
"start_date": "2024-01-01",
"end_date": "2024-12-31"
}
Output:
{
"dataset": "XNAS.ITCH",
"symbols": "AAPL",
"date_range": {
"start": "2024-01-01",
"end": "2024-12-31"
},
"record_count": 2,
"adjustments": [
{
"instrument_id": "789012",
"raw_symbol": "AAPL",
"adjustment_date": "2024-05-10",
"adjustment_type": "dividend",
"price_factor": 0.998654,
"volume_factor": 1.0
}
]
}
Usage Examples
With Claude Desktop
Once configured, you can ask Claude:
Original Futures Tools:
"What's the current ES price?"
Claude will use the get_futures_quote tool to fetch real-time data.
"Get the last 10 H4 bars for NQ"
Claude will use the get_historical_bars tool.
"What session are we in right now?"
Claude will use the get_session_info tool.
New Databento API Tools:
"List all available Databento datasets"
Claude will use metadata_list_datasets to show all available datasets.
"Get trade data for ES on October 1st"
Claude will use timeseries_get_range to fetch historical trade data.
"Resolve the symbol ES.c.0 to instrument ID"
Claude will use symbology_resolve to convert symbol types.
"How much would it cost to download all trades for AAPL in September?"
Claude will use metadata_get_cost to calculate the query cost.
"Submit a batch job for NQ trade data from last week"
Claude will use batch_submit_job to create a batch download job.
"Get security details for ESZ4"
Claude will use reference_search_securities to fetch instrument metadata.
"Get dividend history for AAPL in 2024"
Claude will use reference_get_corporate_actions to fetch corporate actions.
Development Mode
Run the server in development mode with auto-reload:
npm run dev
Production Mode
Build and run:
npm run build
npm start
Technical Details
Data Provider
- Source: DataBento CME futures data
- Symbols: ES.c.0 (S&P 500), NQ.c.0 (Nasdaq-100)
- Dataset: GLBX.MDP3 (CME Globex MDP 3.0)
- Precision: Nanosecond timestamps, 1e9 price units
Caching Strategy
- Quote Cache: 30-second TTL (reduces API calls)
- Weekend Handling: 7-day lookback for off-hours data
- Rate Limiting: Built-in request throttling
Error Handling
All tools return structured errors:
{
"error": "No quote data available for ES"
}
Common errors:
- Missing API key
- Invalid symbol (only ES/NQ supported)
- No data available (weekends, holidays)
- API rate limit exceeded
Claude Code Skills Usage
Once installed, the skills can be invoked naturally in Claude Code:
Get real-time quote:
> Get the current ES futures quote
Historical data:
> Fetch 50 daily bars for NQ
Symbol resolution:
> Resolve ESM4 symbol to instrument ID in GLBX.MDP3
Metadata queries:
> List all available schemas for GLBX.MDP3 dataset
Batch operations:
> List my databento batch jobs
The skills are automatically detected based on context and keywords.
Project Structure
databento-mcp-server/
āāā src/ # Shared code (used by both MCP & Skills)
ā āāā databento-client.ts # Futures client (quotes, bars, sessions)
ā āāā http/
ā ā āāā databento-http.ts # Base HTTP client with auth, retry, caching
ā āāā api/ # API clients
ā ā āāā metadata-client.ts
ā ā āāā timeseries-client.ts
ā ā āāā batch-client.ts
ā ā āāā symbology-client.ts
ā ā āāā reference-client.ts
ā āāā types/ # TypeScript type definitions
ā āāā metadata.ts
ā āāā timeseries.ts
ā āāā batch.ts
ā āāā symbology.ts
ā āāā reference.ts
āāā mcp/ # MCP Server specific code
ā āāā index.ts # MCP server entry point & 18 tool definitions
āāā skills/ # Claude Code Skills
ā āāā databento/
ā ā āāā skill.md # Skill documentation
ā ā āāā scripts/ # 8 executable skill scripts
ā ā ā āāā get-quote.ts
ā ā ā āāā get-historical.ts
ā ā ā āāā get-session.ts
ā ā ā āāā resolve-symbols.ts
ā ā ā āāā timeseries.ts
ā ā ā āāā metadata.ts
ā ā ā āāā batch.ts
ā ā ā āāā reference.ts
ā ā āāā data/
ā āāā manifest.json # Skills manifest
āāā scripts/
ā āāā install-skills.sh # Skill installation script
āāā dist/ # Compiled JavaScript (build output)
ā āāā mcp/ # MCP server build
ā āāā skills/ # Skills build
ā āāā src/ # Shared code build
āāā docs/
ā āāā adrs/ # Architecture Decision Records
ā āāā journals/ # Implementation journals
āāā tsconfig.json # Base TypeScript config
āāā tsconfig.mcp.json # MCP build config
āāā tsconfig.skills.json # Skills build config
āāā package.json
āāā .env.example
āāā README.md
Development
Building
Build everything:
npm run build
Build MCP server only:
npm run build:mcp
Build skills only:
npm run build:skills
Adding New Functionality
For MCP Server:
- Add tool definition to
ListToolsRequestSchemahandler inmcp/index.ts - Implement handler in
CallToolRequestSchemaswitch statement - Add client method to appropriate API client in
src/api/ - Rebuild:
npm run build:mcp
For Skills:
- Create new script in
skills/databento/scripts/ - Import and use shared clients from
src/ - Update
skills/manifest.jsonwith new script - Rebuild and install:
npm run install:skills
For Shared Functionality:
- Add logic to appropriate client in
src/api/ - Update both MCP and Skills to use it
- Rebuild both:
npm run build
Testing Locally
# Set API key
export DATABENTO_API_KEY=db-your-key
# Run dev server
npm run dev
Limitations
- Original Tools:
get_futures_quoteandget_historical_barsonly support ES and NQ futures - New Tools: Support all Databento datasets and symbols (GLBX.MDP3, XNAS.ITCH, DBEQ.BASIC, etc.)
- Data Delay: Historical API (not tick-by-tick real-time streaming)
- Weekend Data: May show stale data on weekends/holidays
- Rate Limits: Respects DataBento API limits (60 req/min)
- Batch Downloads: Download URLs are returned but file content is not streamed through MCP
- API Key Permissions: Access to datasets requires appropriate Databento subscriptions
Troubleshooting
"DATABENTO_API_KEY is required"
Ensure your .env file contains a valid API key starting with db-.
"No quote data available"
- Check if markets are open (futures trade 23h/day on weekdays)
- Verify your DataBento account has CME futures access
- Check API key permissions
"HTTP 401" errors
Your API key is invalid or expired. Get a new one from databento.com.
License
MIT
Contributing
Contributions welcome! Please open issues or PRs on GitHub.
Related Projects
- GladOSv2 - Trading bot using this MCP server
- Model Context Protocol - Official MCP documentation
Built with ā¤ļø for the Wolf Agents ecosystem
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.