{
  "markdown": "# AllocContext\n\nmcp-name: io.github.AllocContext/alloc-context\n\n**Portfolio-aware crypto context for whatever you hold** — discover your\nholdings, holdings-scoped market data, sentiment, macro, and regime; optional\nallocation analysis when you supply targets. Deterministic JSON over MCP.\n\n**New here?** [Cursor MCP setup](docs/cursor-mcp.md) — stdio in your editor, or\n[self-hosting](docs/self-hosting.md) with local ingest. **Organization:**\n[AllocContext on GitHub](https://github.com/AllocContext).\n\n> **Privacy:** nothing stored · one-time read-only · pass-through only when\n> using live portfolio reads. See [USE.md](docs/USE.md).\n\n## Quick start (Cursor, self-host)\n\n**1. Install**\n\n```bash\npip install \"alloc-context[mcp]\"\n# From source: pip install -e \".[mcp]\"\n```\n\n**2. Config and secrets**\n\nCopy [config/config.example.yaml](config/config.example.yaml) to\n`config/config.yaml`. Copy [.env.example](.env.example) to `.env` and add\nread-only exchange keys when you want portfolio ingest or macro feeds.\nSee [self-hosting.md](docs/self-hosting.md).\n\n**3. MCP config**\n\nAdd to your global `~/.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"alloc-context\": {\n      \"command\": \"alloc-context\",\n      \"args\": [\n        \"--config\",\n        \"/absolute/path/to/alloc-context/config/config.yaml\",\n        \"mcp\"\n      ],\n      \"env\": {\n        \"ALLOC_CONTEXT_DB\": \"/absolute/path/to/alloc-context/state/alloccontext.db\"\n      }\n    }\n  }\n}\n```\n\nUse absolute paths. See [cursor-mcp.example.json](docs/cursor-mcp.example.json).\n\n**4. Refresh facts (optional)**\n\n```bash\npython -m alloccontext --config config/config.yaml ingest\n```\n\nRun before a session or when you want fresh macro/regime data. No cron required.\n\n**5. Ask your agent**\n\nCall `get_context_bundle` for a full snapshot. Pure math tools\n(`check_allocation_band`, `get_rebalance_plan`) work without portfolio credentials.\n\nFull setup: [cursor-mcp.md](docs/cursor-mcp.md). Samples: [examples.md](docs/examples.md).\n\nNot financial advice.\n\n## MCP tools\n\n| Tool | Purpose |\n|------|---------|\n| `get_context_bundle` | Full ContextBundle — holdings, market, sentiment, macro, delta, regime; optional `allocation_analysis` |\n| `get_market_context` | Sentiment, macro, ETF, breadth, and market fields (no portfolio) |\n| `get_context_at` | Saved snapshot from ingest history at a given `as_of` |\n| `get_context_delta` | Notable shifts between two saved snapshots |\n| `get_rebalance_plan` | USD rebalance moves from allocation, target, and NAV |\n| `check_allocation_band` | Drift vs target and whether allocation is outside the band |\n| `check_allocation_bands` | Batch band checks for multiple target scenarios |\n| `get_portfolio_state` | Live NAV and holdings (CEX keys or public EVM wallet address) |\n| `get_expectation_review` | Score optional local theses against context (pass-through) |\n\nMarket context is **holdings-scoped**: band assets (BTC/ETH) use OHLC bars; alt\nholdings (e.g. HYPE) use quote snapshots when cached. See\n[context-bundle.md#market-coverage](docs/context-bundle.md#market-coverage).\n\nSee [mcp.md](docs/mcp.md) for arguments and resources.\n\n## Self-host and development\n\nRun ingest and MCP on your machine — the primary supported path.\n\nSee [self-hosting.md](docs/self-hosting.md), [local-dev.md](docs/local-dev.md)\n(`./scripts/dev-up.sh`), or [docker-self-host.md](docs/docker-self-host.md).\n\n```bash\ngit clone git@github.com:AllocContext/alloc-context.git\ncd alloc-context\npython3.11 -m venv .venv && source .venv/bin/activate\npip install -e \".[dev,mcp]\"\ncp .env.example .env\ncp config/config.example.yaml config/config.yaml\n\npython -m alloccontext ingest --dry-run\npython -m alloccontext rollup --scope daily --stdout\npytest\n```\n\n| Command | Purpose |\n|---------|---------|\n| `python -m alloccontext ingest` | Pull configured sources → SQLite |\n| `python -m alloccontext rollup --scope daily --stdout` | ContextBundle JSON (facts) |\n| `python -m alloccontext status` | Per-source ingest ages, snapshots, MCP `/health` |\n| `alloc-context mcp` | MCP server (stdio or HTTP) |\n\nOptional HTTP MCP + x402 on **your** host: [mcp-http.md](docs/mcp-http.md).\n\nAllocContext is **self-host only** — we do not operate `mcp.alloc-context.com`.\nQuickstart: [agent-onramp.md](docs/agent-onramp.md) · [cursor-mcp.md](docs/cursor-mcp.md).\n\n## Documentation\n\n| Document | Purpose |\n|----------|---------|\n| [docs/agent-onramp.md](docs/agent-onramp.md) | **~2 min** quickstart |\n| [docs/cursor-mcp.md](docs/cursor-mcp.md) | Cursor stdio MCP |\n| [docs/self-hosting.md](docs/self-hosting.md) | Local ingest + MCP |\n| [docs/deterministic-context-mcp-pattern.md](docs/deterministic-context-mcp-pattern.md) | Ingest → rollup → MCP pattern |\n| [docs/mcp.md](docs/mcp.md) | MCP tools |\n| [docs/examples.md](docs/examples.md) | Sample tool JSON (redacted) |\n| [docs/context-bundle.md](docs/context-bundle.md) | ContextBundle schema |\n| [docs/USE.md](docs/USE.md) | License and use policy |\n| [docs/local-dev.md](docs/local-dev.md) | Local internal MCP + dev ingest |\n| [docs/docker-self-host.md](docs/docker-self-host.md) | Docker Compose self-host |\n| [docs/distribution.md](docs/distribution.md) | PyPI and MCP Registry |\n| [docs/publishing.md](docs/publishing.md) | Release workflow |\n| [docs/mcp-http.md](docs/mcp-http.md) | Optional HTTP + x402 (your host) |\n| [docs/user-config.md](docs/user-config.md) | Bridge `user.yaml` (legacy archive) |\n\n## Contributing\n\nGitHub Issues are welcome for bugs, schema feedback, and MCP API suggestions.\nUnsolicited pull requests are not expected — see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\n[MIT License](LICENSE). Self-host via PyPI. See [docs/USE.md](docs/USE.md).\n",
  "bytes": 5678,
  "sha": "08b8d1557e8c51db4faefdd1e0dec78514fffceca15ff329693731a17910a25f",
  "repo_slug": "alloccontext/alloc-context",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_alloccontext_alloc_context_4c3a7d06/readme"
}