Content
# AI Search MCP Server
[](https://badge.fury.io/py/ai-search-mcp)
[](https://pypi.org/project/ai-search-mcp/)
[](https://github.com/lianwusuoai/ai-search-mcp/blob/main/LICENSE)
Generic AI Search MCP Server, supports any AI model compatible with OpenAI API format for online search.
## Features
- Supports any OpenAI API compatible model
- Supports streaming and non-streaming responses
- Automatically filters AI thinking content
- Fully configurable
- Windows platform perfectly supports Chinese display
## Installation
```bash
# Use uvx (recommended)
uvx ai-search-mcp
# Or use pip
pip install ai-search-mcp
```
## Update
```bash
# Use pip to update
pip install --upgrade ai-search-mcp
# Using uvx will automatically use the latest version
uvx ai-search-mcp
```
## Uninstall
```bash
# Use pip to uninstall
pip uninstall ai-search-mcp
# uvx does not need to be uninstalled, each run is an independent environment
```
## Quick Start
### Kiro IDE
Edit `.kiro/settings/mcp.json`:
```json
{
"mcpServers": {
"ai-search": {
"command": "uvx",
"args": ["ai-search-mcp"],
"env": {
"AI_API_URL": "http://localhost:10000",
"AI_API_KEY": "your-api-key",
"AI_MODEL_ID": "Grok"
}
}
}
}
```
### Claude Desktop
Edit `claude_desktop_config.json`:
```json
{
"mcpServers": {
"ai-search": {
"command": "uvx",
"args": ["ai-search-mcp"],
"env": {
"AI_API_URL": "http://localhost:10000",
"AI_API_KEY": "your-api-key",
"AI_MODEL_ID": "Grok"
}
}
}
}
```
## Configuration
### Required Environment Variables
| Variable | Description |
|------|------|
| `AI_API_URL` | AI API address |
| `AI_API_KEY` | API key |
| `AI_MODEL_ID` | Model ID |
### Optional Environment Variables
| Variable | Default Value | Description |
|------|--------|------|
| `AI_TIMEOUT` | `60` | Timeout (seconds), it is recommended to set to 120 for complex queries |
| `AI_STREAM` | `true` | Streaming response |
| `AI_FILTER_THINKING` | `true` | Filter thinking content |
### Timeout Configuration Recommendations
If you encounter complex query timeouts, you can increase the timeout:
```json
{
"mcpServers": {
"ai-search": {
"command": "uvx",
"args": ["ai-search-mcp"],
"env": {
"AI_API_URL": "http://localhost:10000",
"AI_API_KEY": "your-api-key",
"AI_MODEL_ID": "Grok",
"AI_TIMEOUT": "120"
}
}
}
}
```
## Supported Services
Any service compatible with the OpenAI API format can be used, such as:
- Grok (local deployment)
- OpenAI (GPT-4, GPT-3.5)
- Local models (Ollama, LM Studio)
- Other compatible services
## Command Line Tools
```bash
# View version
ai-search-mcp --version
# Validate configuration
ai-search-mcp --validate-config
```
## Development
```bash
git clone https://github.com/lianwusuoai/ai-search-mcp.git
cd ai-search-mcp
pip install -e .
```
## License
MIT License
## Links
- [GitHub](https://github.com/lianwusuoai/ai-search-mcp)
- [PyPI](https://pypi.org/project/ai-search-mcp/)
- [Issue Feedback](https://github.com/lianwusuoai/ai-search-mcp/issues)