A Model Context Protocol (MCP) server that provides search and crawl functionality using Search1API. - Node.js >= 18.0.0 - A valid Search1API API key (See Setup Guide below on how to obtain and configure) 1. Clone the repository: 2. 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 enviro
Add this skill
npx mdskills install fatwang2/search1api-mcpComprehensive MCP server offering web search, news, crawling, and reasoning tools with excellent setup documentation
1# Search1API MCP Server23[中文文档](./README_zh.md)45A Model Context Protocol (MCP) server that provides search and crawl functionality using Search1API.67## Prerequisites89- Node.js >= 18.0.010- A valid Search1API API key (See **Setup Guide** below on how to obtain and configure)1112## Installation (Standalone / General)13141. **Clone the repository:**15 ```bash16 git clone https://github.com/fatwang2/search1api-mcp.git17 cd search1api-mcp18 ```19202. **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).21223. **Install dependencies and build:**23 ```bash24 npm install25 npm run build26 ```27 *Note: If using the project's `.env` file method for the API key, ensure it exists before this step.*2829## Usage (Standalone / General)3031Ensure your API key is configured (see **Setup Guide**).3233Start the server:34```bash35npm start36```3738The server will then be ready to accept connections from MCP clients.3940## Setup Guide4142### 1. Get Search1API Key43441. Register at [Search1API](https://www.search1api.com/?utm_source=mcp)452. Get your API key from your dashboard.4647### 2. Configure API Key4849You need to make your API key available to the server. Choose **one** of the following methods:5051**Method A: Project `.env` File (Recommended for Standalone or LibreChat)**5253This method is required if integrating with the current version of LibreChat (see specific section below).54551. In the `search1api-mcp` project root directory, create a file named `.env`:56 ```bash57 # In the search1api-mcp directory58 echo "SEARCH1API_KEY=your_api_key_here" > .env59 ```602. Replace `your_api_key_here` with your actual key.613. Make sure this file exists **before** running `npm install && npm run build`.6263**Method B: Environment Variable (Standalone Only)**6465Set the `SEARCH1API_KEY` environment variable before starting the server.6667```bash68export SEARCH1API_KEY="your_api_key_here"69npm start70```7172**Method C: MCP Client Configuration (Advanced)**7374Some MCP clients allow specifying environment variables directly in their configuration. This is useful for clients like Cursor, VS Code extensions, etc.7576```json77{78 "mcpServers": {79 "search1api": {80 "command": "npx",81 "args": [82 "-y",83 "search1api-mcp"84 ],85 "env": {86 "SEARCH1API_KEY": "YOUR_SEARCH1API_KEY"87 }88 }89 }90}91```9293**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.9495## Integration with LibreChat (Docker)9697This section details the required steps for integrating with LibreChat via Docker.9899**Overview:**1001011. Clone this server's repository into a location accessible by your LibreChat `docker-compose.yml`.1022. Configure the required API key using the **Project `.env` File method** within this server's directory.1033. Build this server.1044. Tell LibreChat how to run this server by editing `librechat.yaml`.1055. Make sure the built server code is available inside the LibreChat container via a Docker volume bind.1066. Restart LibreChat.107108**Step-by-Step:**1091101. **Clone the Repository:**111 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.112 ```bash113 # Example: Navigate to where docker-compose.yml lives, then into mcp-server114 cd /path/to/your/librechat/setup/mcp-server115 git clone https://github.com/fatwang2/search1api-mcp.git116 ```1171182. **Navigate into the Server Directory:**119 ```bash120 cd search1api-mcp121 ```1221233. **Configure API Key (Project `.env` File Method - Required for LibreChat):**124 ```bash125 # Create the .env file126 echo "SEARCH1API_KEY=your_api_key_here" > .env127 # IMPORTANT: Replace 'your_api_key_here' with your actual Search1API key128 ```1291304. **Install Dependencies and Build:**131 This step compiles the server code into the `build` directory.132 ```bash133 npm install134 npm run build135 ```1361375. **Configure `librechat.yaml`:**138 Edit your main `librechat.yaml` file to tell LibreChat how to execute this MCP server. Add an entry under `mcp_servers`:139 ```yaml140 # In your main librechat.yaml141 mcp_servers:142 # You can add other MCP servers here too143 search1api:144 # Optional: Display name for the server in LibreChat UI145 # name: Search1API Tools146147 # Command tells LibreChat to use 'node'148 command: node149150 # Args specify the script for 'node' to run *inside the container*151 args:152 - /app/mcp-server/search1api-mcp/build/index.js153 ```154 * The `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).1551566. **Configure Docker Volume Bind:**157 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:158 ```yaml159 # In your docker-compose.yml or docker-compose.override.yml160 services:161 api:162 # ... other service config ...163 volumes:164 # ... other volumes likely exist here ...165166 # Add this volume bind:167 - ./mcp-server/search1api-mcp:/app/mcp-server/search1api-mcp168 ```169 * **Host Path (`./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.170 * **Container Path (`:/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.1711727. **Restart LibreChat:**173 Apply the changes by rebuilding (if you modified `docker-compose.yml`) and restarting your LibreChat stack.174 ```bash175 docker compose down && docker compose up -d --build176 # Or: docker compose restart api (if only librechat.yaml changed)177 ```178179Now, the Search1API server should be available as a tool provider within LibreChat.180181## Features182183- Web search functionality184- News search functionality185- Web page content extraction186- Website sitemap extraction187- Deep thinking and complex problem solving with DeepSeek R1188- Seamless integration with Claude Desktop, Cursor, Windsurf, Cline and other MCP clients189190## Tools191192### 1. Search Tool193- Name: `search`194- Description: Search the web using Search1API195- Parameters:196 * `query` (required): Search query in natural language. Be specific and concise for better results197 * `max_results` (optional, default: 10): Number of results to return198 * `search_service` (optional, default: "google"): Search service to use (google, bing, duckduckgo, yahoo, x, reddit, github, youtube, arxiv, wechat, bilibili, imdb, wikipedia)199 * `crawl_results` (optional, default: 0): Number of results to crawl for full webpage content200 * `include_sites` (optional): List of sites to include in search201 * `exclude_sites` (optional): List of sites to exclude from search202 * `time_range` (optional): Time range for search results ("day", "month", "year")203204### 2. News Tool205- Name: `news`206- Description: Search for news articles using Search1API207- Parameters:208 * `query` (required): Search query in natural language. Be specific and concise for better results209 * `max_results` (optional, default: 10): Number of results to return210 * `search_service` (optional, default: "bing"): Search service to use (google, bing, duckduckgo, yahoo, hackernews)211 * `crawl_results` (optional, default: 0): Number of results to crawl for full webpage content212 * `include_sites` (optional): List of sites to include in search213 * `exclude_sites` (optional): List of sites to exclude from search214 * `time_range` (optional): Time range for search results ("day", "month", "year")215216### 3. Crawl Tool217- Name: `crawl`218- Description: Extract content from a URL using Search1API219- Parameters:220 * `url` (required): URL to crawl221222### 4. Sitemap Tool223- Name: `sitemap`224- Description: Get all related links from a URL225- Parameters:226 * `url` (required): URL to get sitemap227228### 5. Reasoning Tool229- Name: `reasoning`230- Description: A tool for deep thinking and complex problem solving with fast deepseek r1 model and web search ability(You can change to any other model in search1api website but the speed is not guaranteed)231- Parameters:232 * `content` (required): The question or problem that needs deep thinking233234### 6. Trending Tool235- Name: `trending`236- Description: Get trending topics from popular platforms237- Parameters:238 * `search_service` (required): Specify the platform to get trending topics from (github, hackernews)239 * `max_results` (optional, default: 10): Maximum number of trending items to return240241## Version History242243- v0.2.0: Added fallback `.env` support for LibreChat integration and updated dependencies.244- v0.1.8: Added X(Twitter) and Reddit search services245- v0.1.7: Added Trending tool for GitHub and Hacker News246- v0.1.6: Added Wikipedia search service247- v0.1.5: Added new search parameters (include_sites, exclude_sites, time_range) and new search services (arxiv, wechat, bilibili, imdb)248- v0.1.4: Added reasoning tool with deepseek r1 and updated the Cursor and Windsurf configuration guide249- v0.1.3: Added news search functionality250- v0.1.2: Added sitemap functionality251- v0.1.1: Added web crawling functionality252- v0.1.0: Initial release with search functionality253254## License255256This project is licensed under the MIT License - see the LICENSE file for details.257
Full transparency — inspect the skill content before installing.