by fatwang2
Provides web and news search, URL crawling, sitemap extraction, deep‑reasoning, and trending topic retrieval via Search1API, exposed as an MCP server for integration with AI clients.
Provides a Model Context Protocol (MCP) server that leverages the Search1API service to perform web searches, news queries, content crawling, sitemap extraction, deep‑reasoning with a fast LLM, and trending‑topic fetching.
.env file (SEARCH1API_KEY=your_key) or set the SEARCH1API_KEY environment variable.npm install
npm run build
npm start
librechat.yaml.Q: Do I need a .env file?
A: Required for LibreChat integration; optional for standalone use if you set the SEARCH1API_KEY environment variable.
Q: Which command should I use to launch the server from an MCP client?
A: Use npx -y search1api-mcp as shown in the client configuration example.
Q: Can I change the underlying LLM used by the reasoning tool? A: Yes, you can select a different model on the Search1API dashboard, but speed may vary.
Q: How do I add this server to LibreChat Docker?
A: Clone the repo, build it, bind the directory into the LibreChat API container, and reference the built index.js in librechat.yaml under mcp_servers.
Q: What search services are supported? A: Google, Bing, DuckDuckGo, Yahoo, X (Twitter), Reddit, GitHub, YouTube, arXiv, WeChat, Bilibili, IMDb, Wikipedia, and more.
A Model Context Protocol (MCP) server that provides search and crawl functionality using Search1API.
Clone the repository:
git clone https://github.com/fatwang2/search1api-mcp.git
cd search1api-mcp
Configure API Key: Before building, you need to provide your Search1API key. See the Setup Guide section below for different methods (e.g., using a .env file or environment variables).
Install dependencies and build:
npm install
npm run build
Note: If using the project's .env file method for the API key, ensure it exists before this step.
Ensure your API key is configured (see Setup Guide).
Start the server:
npm start
The server will then be ready to accept connections from MCP clients.
You need to make your API key available to the server. Choose one of the following methods:
Method A: Project .env File (Recommended for Standalone or LibreChat)
This method is required if integrating with the current version of LibreChat (see specific section below).
search1api-mcp project root directory, create a file named .env:
# In the search1api-mcp directory
echo "SEARCH1API_KEY=your_api_key_here" > .env
your_api_key_here with your actual key.npm install && npm run build.Method B: Environment Variable (Standalone Only)
Set the SEARCH1API_KEY environment variable before starting the server.
export SEARCH1API_KEY="your_api_key_here"
npm start
Method C: MCP Client Configuration (Advanced)
Some MCP clients allow specifying environment variables directly in their configuration. This is useful for clients like Cursor, VS Code extensions, etc.
{
"mcpServers": {
"search1api": {
"command": "npx",
"args": [
"-y",
"search1api-mcp"
],
"env": {
"SEARCH1API_KEY": "YOUR_SEARCH1API_KEY"
}
}
}
}
Note for LibreChat Users: Due to current limitations in LibreChat, Method A (Project .env File) is the required method. See the dedicated integration section below for full instructions.
This section details the required steps for integrating with LibreChat via Docker.
Overview:
docker-compose.yml..env File method within this server's directory.librechat.yaml.Step-by-Step:
Clone the Repository:
Navigate to the directory on your host machine where you manage external services for LibreChat (this is often alongside your docker-compose.yml). A common location is a dedicated mcp-server directory.
# Example: Navigate to where docker-compose.yml lives, then into mcp-server
cd /path/to/your/librechat/setup/mcp-server
git clone https://github.com/fatwang2/search1api-mcp.git
Navigate into the Server Directory:
cd search1api-mcp
Configure API Key (Project .env File Method - Required for LibreChat):
# Create the .env file
echo "SEARCH1API_KEY=your_api_key_here" > .env
# IMPORTANT: Replace 'your_api_key_here' with your actual Search1API key
Install Dependencies and Build:
This step compiles the server code into the build directory.
npm install
npm run build
Configure librechat.yaml:
Edit your main librechat.yaml file to tell LibreChat how to execute this MCP server. Add an entry under mcp_servers:
# In your main librechat.yaml
mcp_servers:
# You can add other MCP servers here too
search1api:
# Optional: Display name for the server in LibreChat UI
# name: Search1API Tools
# Command tells LibreChat to use 'node'
command: node
# Args specify the script for 'node' to run *inside the container*
args:
- /app/mcp-server/search1api-mcp/build/index.js
args path (/app/...) is the location inside the LibreChat API container where the built server will be accessed (thanks to the volume bind in the next step).Configure Docker Volume Bind:
Edit your docker-compose.yml (or more likely, your docker-compose.override.yml) to map the search1api-mcp directory from your host machine into the LibreChat API container. Find the volumes: section for the api: service:
# In your docker-compose.yml or docker-compose.override.yml
services:
api:
# ... other service config ...
volumes:
# ... other volumes likely exist here ...
# Add this volume bind:
- ./mcp-server/search1api-mcp:/app/mcp-server/search1api-mcp
./mcp-server/search1api-mcp): This is the path on your host machine relative to where your docker-compose.yml file is located. Adjust it if you cloned the repo elsewhere.:/app/mcp-server/search1api-mcp): This is the path inside the container. It must match the directory structure used in the librechat.yaml args path.Restart LibreChat:
Apply the changes by rebuilding (if you modified docker-compose.yml) and restarting your LibreChat stack.
docker compose down && docker compose up -d --build
# Or: docker compose restart api (if only librechat.yaml changed)
Now, the Search1API server should be available as a tool provider within LibreChat.
searchquery (required): Search query in natural language. Be specific and concise for better resultsmax_results (optional, default: 10): Number of results to returnsearch_service (optional, default: "google"): Search service to use (google, bing, duckduckgo, yahoo, x, reddit, github, youtube, arxiv, wechat, bilibili, imdb, wikipedia)crawl_results (optional, default: 0): Number of results to crawl for full webpage contentinclude_sites (optional): List of sites to include in searchexclude_sites (optional): List of sites to exclude from searchtime_range (optional): Time range for search results ("day", "month", "year")newsquery (required): Search query in natural language. Be specific and concise for better resultsmax_results (optional, default: 10): Number of results to returnsearch_service (optional, default: "bing"): Search service to use (google, bing, duckduckgo, yahoo, hackernews)crawl_results (optional, default: 0): Number of results to crawl for full webpage contentinclude_sites (optional): List of sites to include in searchexclude_sites (optional): List of sites to exclude from searchtime_range (optional): Time range for search results ("day", "month", "year")crawlurl (required): URL to crawlsitemapurl (required): URL to get sitemapreasoningcontent (required): The question or problem that needs deep thinkingtrendingsearch_service (required): Specify the platform to get trending topics from (github, hackernews)max_results (optional, default: 10): Maximum number of trending items to return.env support for LibreChat integration and updated dependencies.This project is licensed under the MIT License - see the LICENSE file for details.
Please log in to share your review and rating for this MCP.
{
"mcpServers": {
"search1api": {
"command": "npx",
"args": [
"-y",
"search1api-mcp"
],
"env": {
"SEARCH1API_KEY": "<YOUR_API_KEY>"
}
}
}
}claude mcp add search1api npx -y search1api-mcpExplore related MCPs that share similar capabilities and solve comparable challenges
by exa-labs
Provides real-time web search capabilities to AI assistants via a Model Context Protocol server, enabling safe and controlled access to the Exa AI Search API.
by perplexityai
Enables Claude and other MCP‑compatible applications to perform real‑time web searches through the Perplexity (Sonar) API without leaving the MCP ecosystem.
by MicrosoftDocs
Provides semantic search and fetch capabilities for Microsoft official documentation, returning content in markdown format via a lightweight streamable HTTP transport for AI agents and development tools.
by elastic
Enables natural‑language interaction with Elasticsearch indices via the Model Context Protocol, exposing tools for listing indices, fetching mappings, performing searches, running ES|QL queries, and retrieving shard information.
by graphlit
Enables integration between MCP clients and the Graphlit platform, providing ingestion, extraction, retrieval, and RAG capabilities across a wide range of data sources and connectors.
by mamertofabian
Fast cross‑platform file searching leveraging the Everything SDK on Windows, Spotlight on macOS, and locate/plocate on Linux.
by cr7258
Provides Elasticsearch and OpenSearch interaction via Model Context Protocol, enabling document search, index management, cluster monitoring, and alias operations.
by kagisearch
Provides web search and video summarization capabilities through the Model Context Protocol, enabling AI assistants like Claude to perform queries and summarizations.
by liuyoshio
Provides natural‑language search and recommendation for Model Context Protocol servers, delivering rich metadata and real‑time updates.