Outsource MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An MCP (Model Context Protocol) server that enables AI applications to outsource tasks to various model providers through a unified interface.
Compatible with any AI tool that supports the Model Context Protocol, including Claude Desktop, Cline, and other MCP-enabled applications.
Built with FastMCP for the MCP server implementation and Agno for AI agent capabilities.
Features
- 🤖 **Multi-Provider Support**: Access 20+ AI providers through a single interface
- 📝 **Text Generation**: Generate text using models from OpenAI, Anthropic, Google, and more
- 🎨 **Image Generation**: Create images using DALL-E 3 and DALL-E 2
- 🔧 **Simple API**: Consistent interface with just three parameters: provider, model, and prompt
- 🔑 **Flexible Authentication**: Only configure API keys for the providers you use
Configuration
Add the following configuration to your MCP client. Consult your MCP client's documentation for specific configuration details.
Note: The environment variables are optional. Only include the API keys for the providers you want to use.
Quick Start
Once installed and configured, you can use the tools in your MCP client:
1. **Generate text**: Use the outsource_text tool with provider "openai", model "gpt-4o-mini", and prompt "Write a haiku about coding"
2. **Generate images**: Use the outsource_image tool with provider "openai", model "dall-e-3", and prompt "A futuristic city skyline at sunset"
Tools
outsource_text
Creates an Agno agent with a specified provider and model to generate text responses.
**Arguments:**
- provider: The provider name (e.g., "openai", "anthropic", "google", "groq", etc.)
- model: The model name (e.g., "gpt-4o", "claude-3-5-sonnet-20241022", "gemini-2.0-flash-exp")
- prompt: The text prompt to send to the model
outsource_image
Generates images using AI models.
**Arguments:**
- provider: The provider name (currently only "openai" is supported)
- model: The model name ("dall-e-3" or "dall-e-2")
- prompt: The image generation prompt
Returns the URL of the generated image.
> **Note**: Image generation is currently only supported by OpenAI models (DALL-E 2 and DALL-E 3). Other providers only support text generation.
Supported Providers
The following providers are supported. Use the provider name (in parentheses) as the provider argument:
Core Providers
- **OpenAI** (openai) - GPT-4, GPT-3.5, DALL-E, etc. | Models
- **Anthropic** (anthropic) - Claude 3.5, Claude 3, etc. | Models
- **Google** (google) - Gemini Pro, Gemini Flash, etc. | Models
- **Groq** (groq) - Llama 3, Mixtral, etc. | Models
- **DeepSeek** (deepseek) - DeepSeek Chat & Coder | Models
- **xAI** (xai) - Grok models | Models
- **Perplexity** (perplexity) - Sonar models | Models
Additional Providers
- **Cohere** (cohere) - Command models | Models
- **Mistral AI** (mistral) - Mistral Large, Medium, Small | Models
- **NVIDIA** (nvidia) - Various models | Models
- **HuggingFace** (huggingface) - Open source models | Models
- **Ollama** (ollama) - Local models | Models
- **Fireworks AI** (fireworks) - Fast inference | Models
- **OpenRouter** (openrouter) - Multi-provider access | Models
- **Together AI** (together) - Open source models | Models
- **Cerebras** (cerebras) - Fast inference | Models