# ๐ LangSearch MCP Server - Installation Complete
## โ
Build & Test Summary
All components have been successfully built and tested:
### 1. Installation โ
- Project initialized with `uv`
- Dependencies installed: `mcp[cli]`, `httpx`, `python-dotenv`
- Environment configured with API key
### 2. Server Components โ
- **Web Search Tool**: Searches billions of web documents
- **Semantic Rerank Tool**: Reranks documents by relevance
- Type-safe with Pydantic models
- Async HTTP client with error handling
### 3. Tests Passed โ
```
Web Search: โ
PASSED
Semantic Rerank: โ
PASSED
```
#### Test Results:
- **Web Search**: Successfully retrieved 3 results for "latest developments in AI 2026"
- **Semantic Rerank**: Successfully ranked 5 documents by relevance (score: 0.7495 for top result)
## ๐ฆ Installation for Claude Desktop
### Option 1: Automatic Installation (Recommended)
```bash
cd /Users/omar/Documents/Projects/langsearch-mcp/langsearch-mcp-python
uv run mcp install main.py
```
Follow the prompts to complete installation.
### Option 2: Manual Installation
Add to your Claude Desktop config file:
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"langsearch": {
"command": "uv",
"args": [
"--directory",
"/Users/omar/Documents/Projects/langsearch-mcp/langsearch-mcp-python",
"run",
"main.py"
],
"env": {
"LANGSEARCH_API_KEY": "sk-9022cf715be54fec91f6e2b5730a4b69"
}
}
}
}
```
Then restart Claude Desktop.
## ๐ Usage
Once installed, Claude can use these tools:
### web_search
```
Search for: "latest AI developments"
Results: 10 pages with full summaries
Freshness: last week
```
### semantic_rerank
```
Query: "machine learning algorithms"
Documents: [list of texts]
Returns: Top N documents ranked by relevance (0-1 score)
```
## ๐งช Testing Commands
```bash
# Run comprehensive tests
uv run python test_server.py
# Test with MCP Inspector (interactive)
uv run mcp dev main.py
# Test server startup
uv run python main.py
```
## ๐ Server Statistics
- **Total Tools**: 2
- **API Endpoint**: https://api.langsearch.com/v1
- **Transport**: stdio (for Claude Desktop)
- **Python Version**: 3.13.5
- **MCP Version**: 1.25.0
## ๐ API Configuration
API Key: `sk-9022cf7...4b69` (configured in `.env`)
## ๐ Project Structure
```
langsearch-mcp-python/
โโโ main.py # MCP server (199 lines)
โโโ test_server.py # Test suite
โโโ .env # API configuration
โโโ .env.example # Template
โโโ README.md # Documentation
โโโ pyproject.toml # Dependencies
โโโ uv.lock # Lock file
```
## โจ Next Steps
1. **Install to Claude Desktop** using one of the methods above
2. **Restart Claude Desktop** to load the server
3. **Test in Claude** by asking it to search the web or rerank documents
4. **Monitor logs** if needed: Check Claude Desktop logs for debugging
## ๐ฏ Example Prompts for Claude
Once installed, try these prompts:
- "Search the web for the latest news about SpaceX"
- "Find information about climate change policies in 2026"
- "Search for Python programming tutorials and summarize the top 5"
- "Rerank these documents by relevance to 'machine learning': [paste your documents]"
---
**Status**: ๐ข Ready for Production
**Last Tested**: January 15, 2026