Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LangSearch MCP ServerSearch for the latest breakthroughs in AI from the past week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LangSearch MCP Server
A Model Context Protocol (MCP) server that provides web search and semantic reranking capabilities using the LangSearch API.
Features
Web Search: Search billions of web documents with AI-optimized results
Full page summaries
Freshness filtering (day, week, month)
Customizable result count
Machine-readable structured output
Semantic Reranking: Improve search accuracy with deep semantic understanding
Reorder documents by semantic relevance
Relevance scores (0-1 scale)
Better than traditional keyword/vector search
Top-N filtering
Installation
Prerequisites
Python 3.10 or higher
uv package manager
LangSearch API key from https://langsearch.com
Setup
Clone or navigate to the repository:
Install dependencies:
Configure your API key:
Usage
Testing with MCP Inspector
Test the server interactively:
This opens the MCP Inspector where you can:
Browse available tools
Test tool invocations
View structured responses
Installing to Claude Desktop
Install the server for use with Claude Desktop:
Follow the prompts to configure the installation.
Manual Installation in Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Running as HTTP Server
For remote access, run as an HTTP server:
Then run:
Access at http://localhost:8000/mcp
Tools
web_search
Search the web for information across billions of documents.
Parameters:
query(string, required): Search querycount(integer, default=10): Number of results (1-50)summary(boolean, default=true): Include full page summariesfreshness(string, default="noLimit"): Filter by freshness"noLimit": All results"day": Last 24 hours"week": Last 7 days"month": Last 30 days
Returns: Structured data with:
Total result count
Web pages with title, URL, snippet, summary
Original query
Example:
semantic_rerank
Rerank documents based on semantic relevance to a query.
Parameters:
query(string, required): Search query for rankingdocuments(array[string], required): List of document texts to reranktop_n(integer, optional): Return only top N resultsmodel(string, default="langsearch-reranker-v1"): Reranker model
Returns: Structured data with:
Reranked documents with indices
Relevance scores (0-1, higher = more relevant)
Model used
Example:
Development
Project Structure
Running Tests
Error Handling
The server provides clear error messages for:
Missing API key
Invalid parameters
API errors
Network issues
Errors are returned as structured exceptions with descriptive messages.
API Reference
For detailed API documentation, see:
Environment Variables
Variable | Required | Description |
| Yes | Your LangSearch API key |
License
MIT
Support
For issues and questions:
LangSearch API: docs.langsearch.com
MCP Protocol: modelcontextprotocol.io
Contributing
Contributions are welcome! Please ensure:
Type hints are used throughout
Docstrings follow the existing format
Error handling is comprehensive
Tests pass with
uv run mcp dev