Developers
MCP server
DataLayer ships a Model Context Protocol server so AI assistants (Claude Desktop, Claude Code, IDE agents) can query the warehouse directly.
The server is a thin, read-only bridge to the REST API. It holds no database credentials: every tool call is an HTTPS request made with your own API key, so the same tier limits, SQL sandbox and logging apply.
Tools
| Tool | Description |
|---|---|
get_status | Indexer health, freshness, coverage |
get_stats | Headline statistics |
get_schema | Data dictionary (optionally one table) |
run_sql | Run one read-only DuckDB query |
ask | Natural-language question → SQL → result |
search_tokens | Search and sort tokens |
get_token / get_token_trades | Token profile and trades |
get_wallet | Wallet positions and PnL |
get_developer | Creator profile |
get_feed | Latest trades |
Resource: datalayer://schema (JSON data dictionary).
Install
The server is part of the DataLayer Python package (services/ in the repository):
pip install -r services/requirements.txt
Configure (stdio)
{
"mcpServers": {
"datalayer": {
"command": "python",
"args": ["-m", "datalayer.mcp.server"],
"env": {
"PYTHONPATH": "/path/to/datalayer/services",
"DATALAYER_API_URL": "https://datalayer.fun/api/v1",
"DATALAYER_API_KEY": "dl_..."
}
}
}
}
Streamable HTTP
python -m datalayer.mcp.server --http --host 127.0.0.1 --port 8765
Tested
The repository's test suite starts the MCP server over stdio with a real MCP client, lists the tools, runs SQL through it, and checks that write statements are rejected.