loaditout.ai
SkillsPacksTrendingLeaderboardAPI DocsBlogSubmitRequestsCompareAgentsXPrivacyDisclaimer
{}loaditout.ai
Skills & MCPPacksBlog

cocoon-proxy-api

MCP Tool

knyazev741/cocoon-proxy-api

OpenAI-compatible API proxy for the Cocoon decentralized AI network on TON blockchain. Crypto-native payments, SSE streaming, MCP server.

Install

$ npx loaditout add knyazev741/cocoon-proxy-api

Platform-specific configuration:

.claude/settings.json
{
  "mcpServers": {
    "cocoon-proxy-api": {
      "command": "npx",
      "args": [
        "-y",
        "cocoon-proxy-api"
      ]
    }
  }
}

Add the config above to .claude/settings.json under the mcpServers key.

About

Cocoon API Proxy

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.

Features
  • OpenAI-compatible API -- drop-in replacement for any OpenAI client library
  • Streaming support -- full SSE streaming for chat completions
  • Prepaid billing -- per-request cost tracking with configurable pricing
  • TON payments -- automatic deposit detection via tonapi.io
  • Privacy first -- no prompt or response content is ever logged or stored
  • API key auth -- secure key generation with SHA-256 hashed storage
Quick Start
1. Prerequisites
  • Python 3.11+
  • A running Cocoon client at localhost:10000
  • A TON wallet address for receiving deposits
  • (Optional) A tonapi.io API key for faster deposit detection
2. Install
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.txt
3. Configure

Copy the example environment file and fill in your values:

cp .env.example .env

Required settings:

  • COCOON_DEPOSIT_WALLET -- your TON wallet address for receiving user deposits

See .env.example for all available options.

4. Run
python -m app.main

The server starts on http://0.0.0.0:8000 by default.

For production, use a reverse proxy (Caddy, nginx) for HTTPS.

API Endpoints
Create API Key
curl -X POST http://localhost:8000/v1/keys

Returns 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

Tags

ai-proxyblockchaincryptodecentralized-aifastapimcpopenai-apipythonton

Reviews

Loading reviews...

Quality Signals

0
Installs
Last updated25 days ago
Security: AREADME

Safety

Risk Levelmedium
Data Access
read
Network Accessnone

Details

Sourcegithub-crawl
Last commit3/24/2026
View on GitHub→

Embed Badge

[![Loaditout](https://loaditout.ai/api/badge/knyazev741/cocoon-proxy-api)](https://loaditout.ai/skills/knyazev741/cocoon-proxy-api)