Skip to content

Commit 077b1fd

Browse files
committed
Added wikipedia support
1 parent 9b9b4ff commit 077b1fd

File tree

5 files changed

+108
-44
lines changed

5 files changed

+108
-44
lines changed

Diff for: README.md

+6-40
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Search1API MCP Server
22

3+
[中文文档](./README_zh.md)
4+
35
A Model Context Protocol (MCP) server that provides search and crawl functionality using Search1API.
46

57
https://github.com/user-attachments/assets/58bc98ae-3b6b-442c-a7fc-010508b5f028
68

9+
More discussions, please join the official [discord](https://discord.com/invite/AKXYq32Bxc)
710

811
## Features
912

@@ -12,7 +15,7 @@ https://github.com/user-attachments/assets/58bc98ae-3b6b-442c-a7fc-010508b5f028
1215
- Web page content extraction
1316
- Website sitemap extraction
1417
- Deep thinking and complex problem solving with DeepSeek R1
15-
- Seamless integration with Claude Desktop, Cursor and Windsurf
18+
- Seamless integration with Claude Desktop, Cursor, Windsurf, Cline and other MCP clients
1619

1720
## Tools
1821

@@ -22,7 +25,7 @@ https://github.com/user-attachments/assets/58bc98ae-3b6b-442c-a7fc-010508b5f028
2225
- Parameters:
2326
* `query` (required): Search query in natural language. Be specific and concise for better results
2427
* `max_results` (optional, default: 10): Number of results to return
25-
* `search_service` (optional, default: "google"): Search service to use (google, bing, duckduckgo, yahoo, github, youtube, arxiv, wechat, bilibili, imdb)
28+
* `search_service` (optional, default: "google"): Search service to use (google, bing, duckduckgo, yahoo, github, youtube, arxiv, wechat, bilibili, imdb, wikipedia)
2629
* `crawl_results` (optional, default: 0): Number of results to crawl for full webpage content
2730
* `include_sites` (optional): List of sites to include in search
2831
* `exclude_sites` (optional): List of sites to exclude from search
@@ -65,8 +68,6 @@ https://github.com/user-attachments/assets/58bc98ae-3b6b-442c-a7fc-010508b5f028
6568
2. Get your api key and 100 free credits
6669

6770
### 2. Configure
68-
#### 2.1 Claude Desktop
69-
Update your Claude configuration file (`claude_desktop_config.json`) with the following content:
7071

7172
```json
7273
{
@@ -82,44 +83,9 @@ Update your Claude configuration file (`claude_desktop_config.json`) with the fo
8283
}
8384
```
8485

85-
Configuration file location:
86-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
87-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
88-
89-
#### 2.2 Cursor
90-
Easy way:
91-
1. Open Cursor Settings to add new MCP server `search1api` with the command `env SEARCH1API_KEY=your-search1api-key npx -y search1api-mcp`
92-
2. Add your own Search1API key to the command
93-
94-
Safe way:
95-
1. Copy the run.template.sh to your file path and rename it to run.sh
96-
2. Add your own Search1API key to the run.sh file
97-
3. Open Cursor Settings to add new MCP server `search1api` with the command `sh ./your_file_path/run.sh`
98-
99-
Read the Cursor MCP Server [Official Documentation](https://docs.cursor.com/context/model-context-protocol#adding-an-mcp-server-to-cursor) to get more information.
100-
101-
#### 2.3 Windsurf
102-
Update your Windsurf configuration file (`mcp_config.json`) with the following content:
103-
104-
```json
105-
{
106-
"mcpServers": {
107-
"search1api": {
108-
"command": "npx",
109-
"args": ["-y", "search1api-mcp"],
110-
"env": {
111-
"SEARCH1API_KEY": "YOUR_SEARCH1API_KEY"
112-
}
113-
}
114-
}
115-
}
116-
```
117-
Read the Windsurf MCP Server [Official Documentation](https://docs.codeium.com/windsurf/mcp) to get more information.
118-
119-
**Notice: After the configuration is done, you can close Windsurf offcial web tools to save your credits**
120-
12186
## Version History
12287

88+
- v0.1.6: Added Wikipedia search service
12389
- v0.1.5: Added new search parameters (include_sites, exclude_sites, time_range) and new search services (arxiv, wechat, bilibili, imdb)
12490
- v0.1.4: Added reasoning tool with deepseek r1 and updated the Cursor and Windsurf configuration guide
12591
- v0.1.3: Added news search functionality

Diff for: README_zh.md

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Search1API MCP 服务
2+
3+
[English](./README.md)
4+
5+
Search1API 官方 MCP 服务,一个 API 里实现搜索和爬虫。
6+
7+
https://github.com/user-attachments/assets/58bc98ae-3b6b-442c-a7fc-010508b5f028
8+
9+
更多讨论,欢迎加入官方 [discord](https://discord.com/invite/AKXYq32Bxc) 频道
10+
11+
## 功能特点
12+
13+
- 网页搜索
14+
- 新闻搜索
15+
- 网页内容提取
16+
- 网站站点地图提取
17+
- 使用 DeepSeek R1 进行深度思考和复杂问题解决
18+
- 可以在 Claude Desktop、Cursor、Windsurf、Cline 等 MCP 客户端安装使用
19+
20+
## 工具
21+
22+
### 1. 搜索工具
23+
- 名称:`search`
24+
- 描述:使用 Search1API 搜索网页
25+
- 参数:
26+
* `query`(必需):用自然语言描述的搜索查询。请具体且简洁以获得更好的结果
27+
* `max_results`(可选,默认值:10):返回结果的数量
28+
* `search_service`(可选,默认值:"google"):使用的搜索服务(google、bing、duckduckgo、yahoo、github、youtube、arxiv、wechat、bilibili、imdb、wikipedia)
29+
* `crawl_results`(可选,默认值:0):需要爬取完整网页内容的结果数量
30+
* `include_sites`(可选):搜索结果中要包含的网站列表
31+
* `exclude_sites`(可选):搜索结果中要排除的网站列表
32+
* `time_range`(可选):搜索结果的时间范围("day"、"month"、"year")
33+
34+
### 2. 新闻工具
35+
- 名称:`news`
36+
- 描述:使用 Search1API 搜索新闻文章
37+
- 参数:
38+
* `query`(必需):用自然语言描述的搜索查询。请具体且简洁以获得更好的结果
39+
* `max_results`(可选,默认值:10):返回结果的数量
40+
* `search_service`(可选,默认值:"bing"):使用的搜索服务(google、bing、duckduckgo、yahoo、hackernews)
41+
* `crawl_results`(可选,默认值:0):需要爬取完整网页内容的结果数量
42+
* `include_sites`(可选):搜索结果中要包含的网站列表
43+
* `exclude_sites`(可选):搜索结果中要排除的网站列表
44+
* `time_range`(可选):搜索结果的时间范围("day"、"month"、"year")
45+
46+
### 3. 爬虫工具
47+
- 名称:`crawl`
48+
- 描述:使用 Search1API 提取 URL 内容
49+
- 参数:
50+
* `url`(必需):要爬取的 URL
51+
52+
### 4. 站点地图工具
53+
- 名称:`sitemap`
54+
- 描述:获取 URL 的所有相关链接
55+
- 参数:
56+
* `url`(必需):获取站点地图的 URL
57+
58+
### 5. 推理工具
59+
- 名称:`reasoning`
60+
- 描述:使用快速的 deepseek r1 模型和网络搜索能力进行深度思考和复杂问题解决(您可以在 search1api 网站上更换其他模型,但速度可能会受影响)
61+
- 参数:
62+
* `content`(必需):需要深度思考的问题或难题
63+
64+
## 设置指南
65+
66+
### 1. 获取 Search1API 密钥
67+
1.[Search1API](https://www.search1api.com/?utm_source=mcp) 注册
68+
2. 获取您的 API 密钥和 100 个免费积分
69+
70+
### 2. 配置
71+
72+
```json
73+
{
74+
"mcpServers": {
75+
"search1api": {
76+
"command": "npx",
77+
"args": ["-y", "search1api-mcp"],
78+
"env": {
79+
"SEARCH1API_KEY": "YOUR_SEARCH1API_KEY"
80+
}
81+
}
82+
}
83+
}
84+
```
85+
86+
## 版本历史
87+
88+
- v0.1.6:添加 Wikipedia 搜索服务
89+
- v0.1.5:添加了新的搜索参数(include_sites、exclude_sites、time_range)和新的搜索服务(arxiv、wechat、bilibili、imdb)
90+
- v0.1.4:添加了使用 deepseek r1 的推理工具,并更新了 Cursor 和 Windsurf 配置指南
91+
- v0.1.3:添加了新闻搜索功能
92+
- v0.1.2:添加了站点地图功能
93+
- v0.1.1:添加了网页爬取功能
94+
- v0.1.0:首次发布,具有搜索功能
95+
96+
## 许可证
97+
98+
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。

Diff for: run.template.sh

-1
This file was deleted.

Diff for: src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const SEARCH_TOOL: Tool = {
6565
type: "string",
6666
description: "Specify the search engine to use. Choose based on your specific needs",
6767
default: "google",
68-
enum: ["google", "bing", "duckduckgo", "yahoo", "github", "youtube", "arxiv", "wechat", "bilibili", "imdb"]
68+
enum: ["google", "bing", "duckduckgo", "yahoo", "github", "youtube", "arxiv", "wechat", "bilibili", "imdb", "wikipedia"]
6969
},
7070
crawl_results: {
7171
type: "number",
@@ -199,7 +199,7 @@ const REASONING_TOOL: Tool = {
199199
const server = new Server(
200200
{
201201
name: "search1api-mcp",
202-
version: "0.1.5",
202+
version: "0.1.6",
203203
},
204204
{
205205
capabilities: {

Diff for: src/types.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export enum SearchService {
2525
ARXIV = "arxiv",
2626
WECHAT = "wechat",
2727
BILIBILI = "bilibili",
28-
IMDB = "imdb"
28+
IMDB = "imdb",
29+
WIKIPEDIA = "wikipedia",
2930
}
3031

3132
export enum NewsService {

0 commit comments

Comments
 (0)