langsearch-mcp-server
v1.0.1
Published
MCP server for LangSearch Web Search & Semantic Rerank API. Use with Claude Code, Claude Desktop, or any MCP-compatible client.
Maintainers
Readme
LangSearch MCP Server
MCP server for LangSearch Web Search & Semantic Rerank API.
Features
- Web Search: Search the web with titles, URLs, snippets, summaries, and freshness filters
- Semantic Rerank: Reorder documents by relevance using neural reranker
- Dual Output: Markdown (human-readable) and JSON (machine-readable)
Installation
Option 1: npx (recommended)
No install needed — just configure Claude Code or Claude Desktop:
{
"mcpServers": {
"langsearch": {
"command": "npx",
"args": ["-y", "langsearch-mcp-server"],
"env": {
"LANGSEARCH_API_KEY": "sk-your-key"
}
}
}
}Restart your client after saving.
Option 2: Local Install
npm install -g langsearch-mcp-server
export LANGSEARCH_API_KEY="sk-your-key"Then configure:
{
"mcpServers": {
"langsearch": {
"command": "langsearch-mcp-server",
"env": {
"LANGSEARCH_API_KEY": "sk-your-key"
}
}
}
}Option 3: Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"langsearch": {
"command": "npx",
"args": ["-y", "langsearch-mcp-server"],
"env": {
"LANGSEARCH_API_KEY": "sk-your-key"
}
}
}
}Restart Claude Desktop after saving.
Option 4: From Source
git clone https://github.com/fusman60/langsearch-mcp-server.git
cd mcp-server
npm install
export LANGSEARCH_API_KEY="sk-your-key"Configure with:
{
"mcpServers": {
"langsearch": {
"command": "node",
"args": ["/absolute/path/to/langsearch-mcp-server/src/index.js"],
"env": {
"LANGSEARCH_API_KEY": "sk-your-key"
}
}
}
}Tools
langsearch_web_search
Search the web using LangSearch API.
Parameters: | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | query | string | Yes | - | Search query (1-500 chars) | | count | number | No | 10 | Results to return (1-10) | | freshness | enum | No | noLimit | oneDay, oneWeek, oneMonth, oneYear, noLimit | | summary | boolean | No | false | Include detailed text summaries | | response_format | enum | No | markdown | 'markdown' or 'json' |
Example:
Search for "Claude Code AI assistant" with freshness=oneWeeklangsearch_semantic_rerank
Reorder documents by semantic relevance to a query.
Parameters: | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | query | string | Yes | - | Query to rank against | | documents | string[] | Yes | - | Array of document texts (1-100) | | top_n | number | No | - | Return only top N results (1-100) | | response_format | enum | No | markdown | 'markdown' or 'json' |
Example:
Rerank 10 search results for "transformer attention mechanisms"API Reference
- API Base: https://api.langsearch.com
- Web Search Endpoint: POST /v1/web-search
- Rerank Endpoint: POST /v1/rerank
- Dashboard: https://langsearch.com/dashboard
License
MIT
