A modern AI service proxy built with Cloudflare Workers and Hono framework, supporting multiple AI providers including Anthropic Claude and OpenAI.
- Multi-provider AI service integration (Anthropic Claude, OpenAI)
- Built on Cloudflare Workers for global edge deployment
- Fast and efficient request handling with Hono framework
- Type-safe implementation with TypeScript
- CORS support for cross-origin requests
- Health check and provider info endpoints
- Node.js (LTS version recommended)
- npm or pnpm package manager
- Cloudflare account for deployment
- API keys for supported AI providers
- Clone the repository
- Install dependencies:
pnpm install
- Copy the example environment file:
cp .env.example .env
- Configure your environment variables in
.env
with your API keys and preferences
Start the development server:
pnpm run dev
The server will start in development mode with hot reloading enabled.
Deploy to Cloudflare Workers:
pnpm run deploy
GET /health
- Returns server status and configuration
GET /api/provider
- Returns current AI provider and model configuration
POST /api/mcp
- Main endpoint for AI service requests
- Accepts JSON payload with context, query, and options
├── src/
│ ├── controllers/ # Request handlers
│ ├── models/ # Type definitions
│ ├── services/ # AI service implementations
│ └── index.ts # Main application entry
├── public/ # Static assets
└── wrangler.jsonc # Cloudflare Workers configuration
MIT