Package Exports
- zai-mcp-server
- zai-mcp-server/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zai-mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
🤖 ZAI Multi-Provider MCP Server
FREE Multi-Provider AI MCP Server with support for OpenRouter, Anthropic, and DeepSeek APIs. Features automatic failover, AI-to-AI loops, and smart data collection. No license validation required - completely free for all users!
✨ Key Features
- 🆓 Completely FREE - No license validation or restrictions
- 🤖 Multi-Provider Support - OpenRouter, Anthropic, DeepSeek APIs
- 🔄 Automatic Failover - Smart switching between providers/models
- 🔁 AI-to-AI Loops - Infinite improvement cycles
- 📊 Smart Data Collection - Automatic training data collection
- ⚡ High Availability - Multiple API keys with rotation
- 🎯 Quality Filtering - Only valuable interactions collected
- 🌐 Global Access - Works worldwide, no restrictions
🚀 Quick Setup
Option 1: OpenRouter (Recommended - Free Models Available)
{
"mcpServers": {
"zai-mcp-server": {
"command": "npx",
"args": ["-y", "zai-mcp-server@latest"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-abc123...,sk-or-v1-def456...,sk-or-v1-ghi789...",
"MODEL": "google/gemini-2.0-flash-exp:free"
}
}
}
}
Option 2: Anthropic Claude
{
"mcpServers": {
"zai-mcp-server": {
"command": "npx",
"args": ["-y", "zai-mcp-server@latest"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-api03-abc123...",
"MODEL": "claude-3-5-sonnet-20241022"
}
}
}
}
Option 3: DeepSeek (Best Value)
{
"mcpServers": {
"zai-mcp-server": {
"command": "npx",
"args": ["-y", "zai-mcp-server@latest"],
"env": {
"DEEPSEEK_API_KEY": "sk-abc123...",
"MODEL": "deepseek-chat"
}
}
}
}
Option 4: Multi-Provider (Ultimate Setup)
{
"mcpServers": {
"zai-mcp-server": {
"command": "npx",
"args": ["-y", "zai-mcp-server@latest"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-abc123...,sk-or-v1-def456...",
"ANTHROPIC_API_KEY": "sk-ant-api03-abc123...",
"DEEPSEEK_API_KEY": "sk-abc123...",
"MODEL": "deepseek-chat"
}
}
}
}
📋 Supported Models
OpenRouter Models
google/gemini-2.0-flash-exp:free
- FREE (Recommended)anthropic/claude-3-haiku:beta
- Fast and efficientopenai/gpt-4o-mini
- Compact and powerfulmeta-llama/llama-3.1-8b-instruct:free
- FREE Open sourceqwen/qwen-2.5-72b-instruct
- High performance
Anthropic Models (2025)
claude-opus-4-20250514
- Most powerful (newest)claude-sonnet-4-20250514
- High performance (newest)claude-3-5-sonnet-20241022
- Recommended balanceclaude-3-5-haiku-20241022
- Fastest and cheapest
DeepSeek Models (2025)
deepseek-chat
- General purpose (DeepSeek-V3)deepseek-reasoner
- Advanced reasoning (DeepSeek-R1)
🛠️ Installation
VSCode MCP Configuration
- Open VSCode Settings (Ctrl/Cmd + ,)
- Search for "MCP" or go to Extensions → MCP
- Add the configuration above to your MCP settings
- Restart VSCode to activate
Alternative: Direct Installation
# Install globally
npm install -g zai-mcp-server
# Or run directly
npx zai-mcp-server@latest
🎯 Available Tools
activate_infinite_loop
- Start AI-to-AI improvement loopsstop_ai_loops
- Stop all active loopslist_active_loops
- View running loopsget_ai_provider_status
- Check provider statusreset_ai_providers
- Reset failed providersget_ai_prompts
- Get AI-generated promptsacknowledge_agent_response
- Process AI responses
💡 Usage Examples
Start AI-to-AI Loop
Use the "activate_infinite_loop" tool with:
- message: "actloop improve my React component performance"
- aiToAi: true
Check Provider Status
Use the "get_ai_provider_status" tool to see:
- Current provider and model
- Available API keys
- Failed providers
- Request statistics
Stop Loops
Use "stop_ai_loops" with:
- message: "stploop"
📊 Data Collection
This server automatically collects valuable AI-to-AI interactions for training data:
What Gets Collected:
- ✅ AI-to-AI problem-solving conversations
- ✅ Code generation and improvement examples
- ✅ Multi-iteration debugging sessions
- ✅ High-quality interactions (80%+ score)
What Gets Filtered Out:
- ❌ Low-quality responses
- ❌ Error-heavy conversations
- ❌ Personal information
- ❌ Non-problem-solving interactions
Data Usage:
- Training data is used to improve AI models
- Helps advance AI-to-AI collaboration research
- Contributes to open AI development
🔧 Configuration Options
Environment Variables
OPENROUTER_API_KEY
- Comma-separated OpenRouter keysANTHROPIC_API_KEY
- Comma-separated Anthropic keysDEEPSEEK_API_KEY
- Comma-separated DeepSeek keysMODEL
- Primary model to useZAI_FREE_MODE
- Always true (no license needed)ZAI_DATA_COLLECTION
- Always true (automatic)
Multiple API Keys
"OPENROUTER_API_KEY": "key1,key2,key3,key4"
The server automatically rotates between keys for high availability.
🚀 Advanced Features
Automatic Failover
- Switches between providers when one fails
- Rotates API keys automatically
- Tries different models for best results
Smart Data Collection
- Only collects valuable AI interactions
- Filters out errors and low-quality responses
- Compresses and stores efficiently
High Availability
- Multiple API providers
- Multiple keys per provider
- Automatic error recovery
🆓 Why It's Free
This MCP server is completely free because:
- No License Validation - No restrictions or paywalls
- Community Driven - Open source development
- Data Collection - Valuable training data helps fund development
- AI Advancement - Contributes to AI research and development
🤝 Contributing
We welcome contributions! This project helps advance AI-to-AI collaboration research.
📄 License
MIT License - Use freely in any project, commercial or personal.
🔗 Links
- GitHub: zraldloop
- Issues: Report bugs
- NPM: zai-mcp-server
🎉 Start using your FREE multi-provider AI MCP server today!