bcio
by bcioagents
README.md
<p align="center"><img src="https://raw.githubusercontent.com/bcioagents/bcio-agent/main/brand/logo.png" width="140" alt="BCIO"></p>
<h1 align="center">bcio-agent</h1>
<p align="center"><b>Stocks and crypto, read together.</b> BCIO in your terminal and in Claude.</p>
<p align="center">
<a href="https://www.npmjs.com/package/bcio-agent"><img src="https://img.shields.io/npm/v/bcio-agent?color=c98a1e&label=npm" alt="npm"></a>
<a href="https://github.com/bcioagents/bcio-agent"><img src="https://img.shields.io/badge/github-bcio--agent-23260f?logo=github" alt="GitHub"></a>
<a href="#mcp-server"><img src="https://img.shields.io/badge/MCP-server-e2c58e" alt="MCP server"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-8b8b96" alt="MIT"></a>
</p>
BCIO is a cross-asset AI terminal on Robinhood Chain. It reads Robinhood **stock tokens** (NVDA, TSLA, QQQ) and **crypto** (BTC, ETH, SOL and the AI coins RENDER, TAO, FET) as one market. Stock tokens trade 24/7 on-chain, so when Wall Street closes for the weekend and crypto moves, BCIO can see which stock tokens are exposed.
This package only **reads**. It holds no keys and signs nothing. Trading, baskets and the weekend shield run in the BCIO web terminal, where your own wallet signs.
## Use
```sh
npx bcio-agent # nine assets, 24 h and 7 d move, Wall Street status, shield check
npx bcio-agent corr NVDA BTC # correlation of hourly returns and the lag between them
npx bcio-agent matrix # 9 × 9 correlation matrix
npx bcio-agent shield # crypto moving while Wall Street is closed?
npx bcio-agent wallet 0x… # a wallet on the BCIO testnet desk + the agent's on-chain limits
npx bcio-agent --help
```
Or install once and run `bcio`:
```sh
npm i -g bcio-agent
bcio corr TSLA SOL 14
```
## MCP server
`bcio mcp` starts a [Model Context Protocol](https://modelcontextprotocol.io) server over stdio, so Claude (or any MCP client) can use the BCIO engine directly.
**Claude Code**
```sh
claude mcp add bcio -- npx -y bcio-agent mcp
```
**Claude Desktop** (`claude_desktop_config.json`)
```json
{
"mcpServers": {
"bcio": { "command": "npx", "args": ["-y", "bcio-agent", "mcp"] }
}
}
```
Then ask things like *"Does BTC follow NVDA? Find the lag."* or *"Wall Street is closed. Which stock tokens are exposed to the crypto move?"*
| Tool | What it returns |
|---|---|
| `get_quotes` | Price, 24 h and 7 d change for all nine assets |
| `market_status` | Whether NYSE/Nasdaq is open now (New York time) |
| `correlate` | Same-hour correlation of hourly log returns, and the lag (−12 h to +12 h) where two assets line up best |
| `correlation_matrix` | Correlation matrix of all nine assets |
| `weekend_shield` | Crypto moves past a threshold while Wall Street is closed, plus the stock tokens that can follow |
| `get_wallet` | Test-token positions on the BCIO desk (Robinhood Chain testnet) and the agent's trading limits for that wallet |
## How it reads
1. **Prices.** CoinGecko public API. Robinhood stock tokens are listed there as tokenized stocks, so their prices keep moving on weekends. Requests are spaced out and retried when the free API is busy; set `COINGECKO_API_KEY` (a free demo key) for faster calls.
2. **Correlation.** Hourly prices are aligned by the hour and turned into log returns. Pearson correlation at lag 0, then a scan from −12 h to +12 h. A positive best lag means the second asset tends to move after the first.
3. **Market hours.** NYSE regular session 09:30–16:00 New York time, plus pre-market and after-hours.
4. **Wallet.** Plain JSON-RPC reads on Robinhood Chain testnet (chain id 46630): token balances and the desk oracle price, and the agent policy (max per trade, max per day, expiry) that the user set on-chain.
| Setting | Default |
|---|---|
| `COINGECKO_API_KEY` | none (free public API) |
| `BCIO_RPC` | `https://rpc.testnet.chain.robinhood.com` |
| `NO_COLOR` | colors on in a terminal |
BCIO testnet desk: [`0xDBc2E0e894fbeddaA69f3Cd7C8d8d92125D0F79a`](https://explorer.testnet.chain.robinhood.com/address/0xDBc2E0e894fbeddaA69f3Cd7C8d8d92125D0F79a)
## Honest limits
Correlations describe the past, not the future. US exchange holidays are not counted. Stock tokens are not shares. The wallet view covers the BCIO testnet desk and its test tokens only. Data, not financial advice. Not affiliated with Robinhood, CoinGecko or any listed company.
## License
MIT
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues