knyazev741/cocoon-proxy-api
OpenAI-compatible API proxy for the Cocoon decentralized AI network on TON blockchain. Crypto-native payments, SSE streaming, MCP server.
Platform-specific configuration:
{
"mcpServers": {
"cocoon-proxy-api": {
"command": "npx",
"args": [
"-y",
"cocoon-proxy-api"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
An OpenAI-compatible API proxy for the Cocoon decentralized AI network on TON blockchain. Provides a familiar REST API interface with built-in billing, API key management, and automatic TON deposit detection.
Users get an API key, deposit TON to your wallet with a memo code, and make standard OpenAI-format API calls. No need to compile C++ clients or deploy smart contracts.
git clone https://github.com/knyazev741/cocoon-api-proxy.git
cd cocoon-api-proxy
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtCopy the example environment file and fill in your values:
cp .env.example .envRequired settings:
COCOON_DEPOSIT_WALLET -- your TON wallet address for receiving user depositsSee .env.example for all available options.
python -m app.mainThe server starts on http://0.0.0.0:8000 by default.
For production, use a reverse proxy (Caddy, nginx) for HTTPS.
curl -X POST http://localhost:8000/v1/keysReturns an API key (ck_...) and a unique deposit code. The API key is shown once -- save it.
If COCOON_ADMIN_TOKEN is set, include it as `Authoriza
Loading reviews...