home / mcp / langsearch mcp server
Provides web search and semantic reranking capabilities via MCP using the LangSearch API.
Configuration
View docs{
"mcpServers": {
"ojamals-langsearch-mcp-python": {
"url": "https://mcp.langsearch.local/mcp",
"headers": {
"LANGSEARCH_API_KEY": "YOUR_API_KEY"
}
}
}
}You run a lightweight MCP server that gives you fast web search results and semantic reranking by connecting to LangSearch. It lets you query billions of pages, fetch full page summaries, filter by freshness, and reorder results by semantic relevance, all through a simple MCP interface you can test locally or deploy for broader access.
You interact with the server through an MCP client to perform web searches and semantic reranking. Start by testing locally to understand how tools respond, then integrate into your own workflow.
To run a quick interactive test, start the server in development mode using the MCP inspector so you can browse available tools, invoke them, and view structured outputs. This lets you verify the behavior before integrating it into your app.
If you want to install and use the server with Claude Desktop, you can install the MCP server locally and configure Claude Desktop to point to it. You’ll provide your API key during setup and reference the local MCP command in Claude’s configuration.
If you prefer remote or HTTP-style access, you can run the server as an HTTP endpoint and connect clients over HTTP. The server exposes an endpoint for MCP clients to access the web search and semantic reranking tools.
Prerequisites you need to prepare before installing: Python 3.10 or higher, the uv package manager, and a LangSearch API key.
1. Open a terminal and navigate to your project directory.
2. Install and set up the project dependencies with the package manager.
3. Create a local environment file and add your API key.
The server requires an API key to access LangSearch services. Provide this key as an environment variable when starting the server or in your launcher configuration.
Example environment variable you will need to set in your environment or launcher configuration: LANGSEARCH_API_KEY=YOUR_API_KEY.
If you encounter missing API key errors, double-check that LANGSEARCH_API_KEY is set in your environment and that the key has the correct permissions for LangSearch.
Invalid parameters or network issues will surface as structured errors with descriptive messages to guide you toward a resolution.
Search the web across billions of documents with options for result count, summaries, and freshness filters to return structured results.
Reorder a list of documents by semantic relevance to a query, returning top results with relevance scores.