About Balchemy
Balchemy is an MCP server in the Blockchain category: scaffold and run a Balchemy autonomous AI trading agent in 5 minutes.
Install
claude mcp add balchemy -- npx -y balchemynpx -y balchemyThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Balchemy
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
Packages
| Package | npm | Description |
|---|---|---|
@balchemyai/agent-sdk |
TypeScript SDK — MCP client, AgentLoop, onboarding, SSE streaming | |
balchemy |
CLI tool — interactive wizard, TUI, Docker deployment |
Quick Start
npx balchemy
The interactive wizard walks you through:
- Pick your LLM — Anthropic, OpenAI, Gemini, Grok, or OpenRouter
- Set up wallets — auto-provisioned Solana and EVM wallets
- Define your strategy — natural language rules
- Start the 24/7 agent loop — your LLM monitors markets and trades autonomously
npx balchemy # Setup wizard or resume cached agent
npx balchemy init # Force new setup wizard
npx balchemy start # Start from agent.config.yaml
npx balchemy docker # Generate Docker files for deployment
What Is Balchemy?
Balchemy is an autonomous AI trading platform that connects your LLM to on-chain markets through the Model Context Protocol (MCP). You provide the strategy in natural language; your LLM decides when and what to trade; Balchemy handles wallets, execution, risk checks, and 100+ trading tools.
Architecture — Dual-LLM System:
- External LLM (your choice: Claude, GPT, Gemini, Grok, OpenRouter) — the brain that makes all decisions
- Inner LLM (GPT-5.4-mini, server-side) — infrastructure servant that fetches data, formats responses, and serves the external LLM
You (strategy) → External LLM (decisions) → Balchemy MCP (execution) → Solana / Base / Ethereum
↓
Inner LLM (data fetching, formatting)
What You Can Do
Trade
- Buy/Sell tokens — on Solana, Base, and Ethereum
- Limit orders — set price targets, get filled automatically
- DCA (Dollar-Cost Averaging) — schedule recurring buys
- Trailing stops — lock profits as price moves
Research
- Token analysis — market cap, volume, holder distribution, risk scores
- Smart money tracking — follow profitable wallets
- Bundle detection — spot insider token launches
- Price queries — real-time Solana and EVM token prices
Manage
- Portfolio view — balances, P&L, positions across chains
- Behavior rules — define trading constraints in natural language
- Subscriptions — set up alerts for market events
- 24/7 autonomous loop — your LLM monitors and acts even when you're away
Built-In Risk Management
Every trade passes through multi-layer safety checks:
- RugCheck integration — community risk scores
- Honeypot detection — simulated sell before buying
- Contract verification — liquidity locks, ownership renouncing
- Behavior rules enforcement — your constraints are always respected
SDK Quick Start
npm install @balchemyai/agent-sdk
import { BalchemyAgentSdk } from "@balchemyai/agent-sdk";
const sdk = new BalchemyAgentSdk({
apiBaseUrl: "https://api.balchemy.ai/api",
});
// SIWE wallet-based onboarding
const response = await sdk.onboardWithSiwe({
message: "SIWE_MESSAGE_FROM_WALLET",
signature: "WALLET_SIGNATURE",
agentId: "your-agent-id",
scope: "trade",
});
// Connect to MCP
const mcp = sdk.connectMcp({
endpoint: response.mcp.endpoint,
apiKey: response.mcp.apiKey,
});
// Call tools
const portfolio = await mcp.agentPortfolio();
const reply = await mcp.askBot({ message: "What is the price of SOL?" });
const result = await mcp.tradeCommand({ message: "buy 0.1 SOL worth of BONK" });
See packages/sdk/README.md for full API reference, auth paths, SSE streaming, and error handling.
100+ MCP Tools
| Tool | What It Does |
|---|---|
trade_command |
Execute buy/sell/swap on Solana or EVM |
ask_bot |
Natural language market queries (inner LLM-powered) |
agent_research |
Deep token research with technical analysis |
agent_portfolio |
Portfolio, positions, P&L overview |
configure_behavior_rules |
Set trading constraints in natural language |
get_behavior_rules |
Read current active rules |
create_subscription |
Set up market event alerts |
setup_agent |
Wallet provisioning and onboarding |
Plus 90+ internal tools for research, risk scoring, and execution — your LLM picks the right one from descriptions.
24/7 Autonomous Mode
import { AgentLoop } from "@balchemyai/agent-sdk";
const loop = new AgentLoop(sdk, { apiKey: "balc_YOUR_KEY" });
await loop.start(); // SSE event stream + polling cycle
Events flow: Market event → SSE push → Your LLM evaluates → trade_command if relevant → Execution → Confirmation push
Security
- Encrypted credentials — AES-256-GCM at rest with PBKDF2 key derivation
- Scoped API keys —
readandtradepermissions, instant revocation - No seed phrases stored — all keys encrypted, never logged
- Behavior rules — hard constraints that even your LLM cannot override
- Pre-trade safety checks — RugCheck, honeypot detection, contract verification
Supported LLM Providers
| Provider | Environment Variable | Notes |
|---|---|---|
| Anthropic | ANTHROPIC_API_KEY |
Haiku 4.5, Sonnet 4.6, Opus 4.6+ |
| OpenAI | OPENAI_API_KEY |
GPT-4o, GPT-5.4, etc. |
| Google Gemini | GEMINI_API_KEY |
Gemini 3.1 Pro, Flash |
| xAI Grok | GROK_API_KEY |
Grok-4-1-fast for research |
| OpenRouter | OPENROUTER_API_KEY |
Access to 100+ models |
| Google Vertex AI | GOOGLE_APPLICATION_CREDENTIALS |
Gemini 3.1 Pro via Vertex AI |
Hub Integration
When you bind your EVM wallet during setup, your agent appears in your Balchemy Hub dashboard:
- Monitor — live portfolio, trade history, event log
- API Keys — create, rotate, and revoke MCP keys with scoped permissions
- Scope Management —
readfor data-only,tradefor full execution - Wallet Management — link/unlink Solana and EVM wallets
Built On
Built on Google Cloud Compute Engine & Vertex AI, powering our dual-LLM architecture and 100+ MCP tool execution pipeline.
Links
- Platform: balchemy.ai
- Documentation: balchemy.ai/hub/docs
- Agent Explorer: balchemy.ai/explorer
- GitHub: github.com/balchemy/balchemy-agent
- npm: balchemy · @balchemyai/agent-sdk
- X: @balchemyai
- Contact: burak@balchemy.ai
License
MIT
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.