tryaii-mcp-server
Version:
MCP Server for TryAII - Lightweight proxy to TryAII API service
177 lines (129 loc) ⢠5.74 kB
Markdown
# TryAII MCP Server
š **A lightweight Model Context Protocol (MCP) server that provides access to the TryAII AI comparison service**
[](https://www.npmjs.com/package/tryaii-mcp-server)
[](https://modelcontextprotocol.io)
## šÆ What is TryAII MCP Server?
This is a lightweight MCP server that acts as a proxy to the TryAII API service, allowing you to:
- **Compare responses** from multiple AI models simultaneously
- **Chat with specific models** from OpenAI, Anthropic, Google, DeepSeek, xAI, and Mistral
- **Run collective intelligence** queries using multiple top models
- **Access 30+ models** with a single API key
## šļø Architecture
This MCP server is designed as a thin client that:
1. Reads your `TRYAII_API_KEY` from environment variables
2. Proxies tool calls to the external TryAII API service
3. Returns formatted responses to your MCP client
**Benefits:**
- ā
**Lightweight**: Minimal local dependencies
- ā
**Secure**: Your provider API keys are managed centrally
- ā
**Always Updated**: New models and features without client updates
- ā
**Scalable**: Backed by robust cloud infrastructure
## š§ Installation & Setup
### 1. Install the Package
```bash
npm install -g tryaii-mcp-server
```
### 2. Get Your API Key
1. Visit [TryAII](https://tryaii.com) to get your API key
2. Your API key will look like: `tai_xxxxxxxxxxxxxxxxxxxxxxxxx`
### 3. Configure Claude Desktop
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"tryaii": {
"command": "tryaii-mcp-server",
"env": {
"TRYAII_API_KEY": "tai_your_api_key_here"
}
}
}
}
```
**Config file locations:**
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
### 4. Restart Claude Desktop
After updating the config, restart Claude Desktop to load the new MCP server.
## š ļø Available Tools
| Tool | Description |
|------|-------------|
| `get_available_models` | Get all available AI models with capabilities and pricing |
| `chat_with_model` | Have a conversation with a specific AI model |
| `compare_models` | Compare responses from multiple AI models |
| `brains` | Get responses from top models simultaneously (GPT-4o, Claude 3.7/4, Gemini 2.5) |
| `get_model_info` | Get detailed information about a specific model |
## š Supported Models
### OpenAI Models
- **Latest**: `gpt-4o`, `gpt-4o-mini`, `gpt-4.1`, `gpt-4.1-nano`
- **Reasoning Models**: `o3`, `o3-mini`, `o3-pro`, `o4-mini`, `o1`
### Anthropic Models
- **Claude 4 Series**: `claude-sonnet-4-20250514`, `claude-opus-4-20250514`
- **Claude 3.7**: `claude-3-7-sonnet-20250219` (with extended thinking)
- **Claude 3.5**: `claude-3-5-sonnet-20241022`, `claude-3-5-haiku-20241022`
- **Claude 3**: `claude-3-opus-20240229`, `claude-3-haiku-20240307`
### Google Gemini Models
- **Gemini 2.5**: `gemini-2.5-pro-preview-05-06`, `gemini-2.5-flash-preview-05-20`
- **Gemini 2.0**: `gemini-2.0-flash`, `gemini-2.0-flash-lite`
- **Gemini 1.5**: `gemini-1.5-pro`, `gemini-1.5-flash`
### DeepSeek Models
- **Reasoning**: `deepseek-reasoner` (with thinking capabilities)
- **Chat**: `deepseek-chat`
### xAI Models
- **Grok 4**: `grok-4-latest`
- **Grok 3**: `grok-3-latest`, `grok-3-fast-latest`, `grok-3-mini-latest`, `grok-3-mini-fast-latest`
### Mistral Models
- **Large**: `mistral-large-latest`
- **Small**: `mistral-small-latest`
## š” Example Usage in Claude
### Compare Models
```
Use the compare_models tool to compare how GPT-4 and Claude 3.5 Sonnet explain quantum computing
```
### Collective Intelligence
```
Use the brains tool to get insights from multiple top AI models about the future of artificial intelligence
```
### Chat with Specific Model
```
Use chat_with_model to have a conversation with deepseek-reasoner about solving a complex math problem
```
### Get Model Information
```
Use get_model_info to see the capabilities and pricing of gpt-4o
```
## š Security & Privacy
- **API Key Security**: Your `TRYAII_API_KEY` is securely transmitted to the TryAII service
- **No Provider Keys Needed**: You don't need to manage OpenAI, Anthropic, or other provider API keys
- **Centralized Management**: All provider API keys are securely managed by the TryAII service
- **Rate Limiting**: Built-in rate limiting and usage tracking
## š Troubleshooting
### Common Issues
1. **"TRYAII_API_KEY environment variable is required"**
- Make sure you've added the API key to your Claude Desktop config
- Restart Claude Desktop after updating the config
2. **"Failed to communicate with TryAII service"**
- Check your internet connection
- Verify your API key is valid
- Check if the TryAII service is operational
3. **Tools not appearing in Claude**
- Verify the config file path and JSON syntax
- Restart Claude Desktop
- Check Claude Desktop logs for errors
### Getting Help
- Check the [TryAII Documentation](https://docs.tryaii.com)
- Report issues on [GitHub](https://github.com/tryaii/mcp-server/issues)
- Contact support via the TryAII website
## š Updates
This MCP server automatically benefits from updates to the TryAII service:
- **New Models**: Added automatically without client updates
- **Feature Improvements**: Enhanced capabilities without reinstalling
- **Performance Optimizations**: Better response times and reliability
To update the MCP server package:
```bash
npm update -g tryaii-mcp-server
```
## š License
Apache 2.0 License - see [LICENSE](LICENSE) file for details.
---
Made with ā¤ļø by the TryAII team