AllocContext
AllocContext provides portfolio-aware crypto context and allocation analysis tools, delivering deterministic JSON snapshots of holdings, market data, sentiment, macro conditions, and rebalancing math.
get_context_bundle: Retrieve a full snapshot including portfolio holdings, market data, sentiment indicators, macro conditions, regime hints, and delta vs. the prior snapshot. Optionally attach allocation drift analysis by supplying target percentages.get_market_context: Fetch fused market backdrop data — Fear & Greed index, Kalshi sentiment, macro events, FRED indicators, ETF flows, and market breadth — without needing portfolio credentials.get_portfolio_state: Fetch real-time NAV and holdings using read-only exchange API keys (Kraken or Coinbase) or a public EVM wallet address, with optional allocation analysis. Credentials are never stored.get_rebalance_plan: Calculate USD delta moves needed to bring your BTC/ETH/CASH allocation to a target split, with optional band checking and exchange-specific move wording.check_allocation_band: Determine whether your current weights are outside a drift band vs. your target, returning actionable hints likewithin_bandorconsider_rebalance.check_allocation_bands: Evaluate allocation drift against multiple target/band scenarios in a single call.get_context_at: Load a saved ContextBundle from ingest history at a specific ISO timestamp.get_context_delta: Compare two historical ContextBundle snapshots to identify notable shifts in conditions over time.
Provides tools for retrieving live portfolio state (NAV and holdings) from Coinbase exchange accounts.
AllocContext
mcp-name: io.github.AllocContext/alloc-context
Portfolio-aware crypto context for whatever you hold — discover your holdings, holdings-scoped market data, sentiment, macro, and regime; optional allocation analysis when you supply targets. Deterministic JSON over MCP.
New here? Cursor MCP setup — stdio in your editor, or self-hosting with local ingest. Organization: AllocContext on GitHub.
Privacy: nothing stored · one-time read-only · pass-through only when using live portfolio reads. See USE.md.
Quick start (Cursor, self-host)
1. Install
pip install "alloc-context[mcp]"
# From source: pip install -e ".[mcp]"2. Config and secrets
Copy config/config.example.yaml to
config/config.yaml. Copy .env.example to .env and add
read-only exchange keys when you want portfolio ingest or macro feeds.
See self-hosting.md.
3. MCP config
Add to your Cursor mcp.json (or project .cursor/mcp.json):
{
"mcpServers": {
"alloc-context": {
"command": "alloc-context",
"args": [
"mcp",
"--config",
"/absolute/path/to/alloc-context/config/config.yaml"
],
"env": {
"ALLOC_CONTEXT_DB": "/absolute/path/to/alloc-context/state/alloccontext.db"
}
}
}
}Use absolute paths. See cursor-mcp.example.json.
4. Refresh facts (optional)
python -m alloccontext --config config/config.yaml ingestRun before a session or when you want fresh macro/regime data. No cron required.
5. Ask your agent
Call get_context_bundle for a full snapshot. Pure math tools
(check_allocation_band, get_rebalance_plan) work without portfolio credentials.
Full setup: cursor-mcp.md. Samples: examples.md.
Not financial advice.
Related MCP server: Web3 Signals — Crypto Signal Intelligence
MCP tools
Tool | Purpose |
| Full ContextBundle — holdings, market, sentiment, macro, delta, regime; optional |
| Sentiment, macro, ETF, breadth, and market fields (no portfolio) |
| Saved snapshot from ingest history at a given |
| Notable shifts between two saved snapshots |
| USD rebalance moves from allocation, target, and NAV |
| Drift vs target and whether allocation is outside the band |
| Batch band checks for multiple target scenarios |
| Live NAV and holdings (CEX keys or public EVM wallet address) |
| Score optional local theses against context (pass-through) |
Market context is holdings-scoped: band assets (BTC/ETH) use OHLC bars; alt holdings (e.g. HYPE) use quote snapshots when cached. See context-bundle.md#market-coverage.
See mcp.md for arguments and resources.
Self-host and development
Run ingest and MCP on your machine — the primary supported path.
See self-hosting.md, local-dev.md
(./scripts/dev-up.sh), or docker-self-host.md.
git clone git@github.com:AllocContext/alloc-context.git
cd alloc-context
python3.11 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev,mcp]"
cp .env.example .env
cp config/config.example.yaml config/config.yaml
python -m alloccontext ingest --dry-run
python -m alloccontext rollup --scope daily --stdout
pytestCommand | Purpose |
| Pull configured sources → SQLite |
| ContextBundle JSON (facts) |
| Per-source ingest ages, snapshots, MCP |
| MCP server (stdio or HTTP) |
Optional HTTP MCP + x402 on your host: mcp-http.md.
AllocContext is self-host only — we do not operate mcp.alloc-context.com.
Quickstart: agent-onramp.md · cursor-mcp.md.
Documentation
Document | Purpose |
~2 min quickstart | |
Cursor stdio MCP | |
Local ingest + MCP | |
Ingest → rollup → MCP pattern | |
MCP tools | |
Sample tool JSON (redacted) | |
ContextBundle schema | |
License and use policy | |
Local internal MCP + dev ingest | |
Docker Compose self-host | |
PyPI and MCP Registry | |
Release workflow | |
Optional HTTP + x402 (your host) | |
Bridge |
Contributing
GitHub Issues are welcome for bugs, schema feedback, and MCP API suggestions. Unsolicited pull requests are not expected — see CONTRIBUTING.md.
License
MIT License. Self-host via PyPI. See docs/USE.md.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/AllocContext/alloc-context'
If you have feedback or need assistance with the MCP directory API, please join our Discord server