@oevortex/ddg_search 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +226 -223
- package/bin/cli.js +150 -144
- package/package.json +1 -37
- package/src/index.js +82 -78
- package/src/tools/feloTool.js +85 -0
- package/src/tools/fetchUrlTool.js +118 -118
- package/src/tools/metadataTool.js +58 -58
- package/src/tools/searchTool.js +64 -64
- package/src/utils/search.js +401 -401
- package/src/utils/search_felo.js +204 -0
package/README.md
CHANGED
|
@@ -1,223 +1,226 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<img src="https://img.shields.io/npm/v/@oevortex/ddg_search.svg" alt="npm version" />
|
|
3
|
-
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache 2.0" />
|
|
4
|
-
<img src="https://img.shields.io/badge/YouTube-%40OEvortex-red.svg" alt="YouTube Channel" />
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<li><b>
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
<li><b>
|
|
152
|
-
<li><b>
|
|
153
|
-
<li><b>
|
|
154
|
-
<li><b>
|
|
155
|
-
<li><b>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
<
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://img.shields.io/npm/v/@oevortex/ddg_search.svg" alt="npm version" />
|
|
3
|
+
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache 2.0" />
|
|
4
|
+
<img src="https://img.shields.io/badge/YouTube-%40OEvortex-red.svg" alt="YouTube Channel" /> <h1>DuckDuckGo & Felo AI Search MCP 🔍🧠</h1>
|
|
5
|
+
<p>A blazing-fast, privacy-friendly Model Context Protocol (MCP) server for web search and AI-powered responses using DuckDuckGo and Felo AI.</p>
|
|
6
|
+
<a href="https://youtube.com/@OEvortex"><strong>Subscribe for updates & tutorials</strong></a>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
> [!IMPORTANT]
|
|
12
|
+
> DuckDuckGo Search MCP supports the Model Context Protocol (MCP) standard, making it compatible with various AI assistants and tools.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ✨ Features
|
|
17
|
+
|
|
18
|
+
<div style="display: flex; flex-wrap: wrap; gap: 1.5em; margin-bottom: 1.5em;"> <div><b>🌐 Web search</b> using DuckDuckGo HTML</div>
|
|
19
|
+
<div><b>🧠 AI search</b> using Felo AI</div>
|
|
20
|
+
<div><b>📄 URL content extraction</b> with smart filtering</div>
|
|
21
|
+
<div><b>📊 URL metadata extraction</b> (title, description, images)</div>
|
|
22
|
+
<div><b>⚡ Performance optimized</b> with caching</div>
|
|
23
|
+
<div><b>🛡️ Security features</b> including rate limiting and rotating user agents</div>
|
|
24
|
+
<div><b>🔌 MCP-compliant</b> server implementation</div>
|
|
25
|
+
<div><b>🆓 No API keys required</b> - works out of the box</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
> [!IMPORTANT]
|
|
29
|
+
> Unlike many search tools, this package performs actual web scraping rather than using limited APIs, giving you more comprehensive results.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 🚀 Quick Start
|
|
34
|
+
|
|
35
|
+
<div style="background: #222; color: #fff; padding: 1.5em; border-radius: 8px; margin: 1.5em 0;">
|
|
36
|
+
<b>Run instantly with npx:</b>
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx -y @oevortex/ddg_search
|
|
40
|
+
```
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
> [!TIP]
|
|
44
|
+
> This will download and run the MCP server directly without installation – perfect for quick use with AI assistants.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 🛠️ Installation Options
|
|
49
|
+
|
|
50
|
+
<details>
|
|
51
|
+
<summary><b>Global Installation</b></summary>
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install -g @oevortex/ddg_search
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Run globally:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
ddg-search-mcp
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
</details>
|
|
64
|
+
|
|
65
|
+
<details>
|
|
66
|
+
<summary><b>Local Installation (Development)</b></summary>
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
git clone https://github.com/OEvortex/ddg_search.git
|
|
70
|
+
cd ddg_search
|
|
71
|
+
npm install
|
|
72
|
+
npm start
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
</details>
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 🧑💻 Command Line Options
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx -y @oevortex/ddg_search --help
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
> [!TIP]
|
|
86
|
+
> Use the <code>--version</code> flag to check which version you're running.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 🤖 Using with MCP Clients
|
|
91
|
+
|
|
92
|
+
> [!IMPORTANT]
|
|
93
|
+
> The most common way to use this tool is by integrating it with MCP-compatible AI assistants.
|
|
94
|
+
|
|
95
|
+
Add the server to your MCP client configuration:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"mcpServers": {
|
|
100
|
+
"ddg-search": {
|
|
101
|
+
"command": "npx",
|
|
102
|
+
"args": ["-y", "@oevortex/ddg_search"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Or if installed globally:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"mcpServers": {
|
|
113
|
+
"ddg-search": {
|
|
114
|
+
"command": "ddg-search-mcp"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
> [!TIP]
|
|
121
|
+
> After configuring, restart your MCP client to apply the changes.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 🧰 Tools Overview
|
|
126
|
+
|
|
127
|
+
<div style="display: flex; flex-wrap: wrap; gap: 2.5em; margin: 1.5em 0;">
|
|
128
|
+
<div style="margin-bottom: 1.5em;">
|
|
129
|
+
<b>🔍 Web Search Tool</b><br/>
|
|
130
|
+
<code>web-search</code><br/>
|
|
131
|
+
<ul>
|
|
132
|
+
<li><b>query</b> (string, required): The search query</li>
|
|
133
|
+
<li><b>page</b> (integer, optional, default: 1): Page number</li>
|
|
134
|
+
<li><b>numResults</b> (integer, optional, default: 10): Number of results (1-20)</li>
|
|
135
|
+
</ul>
|
|
136
|
+
<i>Example: Search the web for "climate change solutions"</i>
|
|
137
|
+
</div>
|
|
138
|
+
<div style="margin-bottom: 1.5em;">
|
|
139
|
+
<b>🧠 Felo AI Search Tool</b><br/>
|
|
140
|
+
<code>felo-search</code><br/>
|
|
141
|
+
<ul>
|
|
142
|
+
<li><b>query</b> (string, required): The search query or prompt</li>
|
|
143
|
+
<li><b>stream</b> (boolean, optional, default: false): Whether to stream the response</li>
|
|
144
|
+
</ul>
|
|
145
|
+
<i>Example: Search Felo AI for "Explain quantum computing in simple terms"</i>
|
|
146
|
+
</div>
|
|
147
|
+
<div style="margin-bottom: 1.5em;">
|
|
148
|
+
<b>📄 Fetch URL Tool</b><br/>
|
|
149
|
+
<code>fetch-url</code><br/>
|
|
150
|
+
<ul>
|
|
151
|
+
<li><b>url</b> (string, required): The URL to fetch</li>
|
|
152
|
+
<li><b>maxLength</b> (integer, optional, default: 10000): Max content length</li>
|
|
153
|
+
<li><b>extractMainContent</b> (boolean, optional, default: true): Extract main content</li>
|
|
154
|
+
<li><b>includeLinks</b> (boolean, optional, default: true): Include link text</li>
|
|
155
|
+
<li><b>includeImages</b> (boolean, optional, default: true): Include image alt text</li>
|
|
156
|
+
<li><b>excludeTags</b> (array, optional): Tags to exclude</li>
|
|
157
|
+
</ul>
|
|
158
|
+
<i>Example: Fetch the content from "https://example.com"</i>
|
|
159
|
+
</div>
|
|
160
|
+
<div style="margin-bottom: 1.5em;">
|
|
161
|
+
<b>📊 URL Metadata Tool</b><br/>
|
|
162
|
+
<code>url-metadata</code><br/>
|
|
163
|
+
<ul>
|
|
164
|
+
<li><b>url</b> (string, required): The URL to extract metadata from</li>
|
|
165
|
+
</ul>
|
|
166
|
+
<i>Example: Get metadata for "https://example.com"</i>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## 📁 Project Structure
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
```text
|
|
176
|
+
bin/ # Command-line interface
|
|
177
|
+
src/
|
|
178
|
+
index.js # Main entry point
|
|
179
|
+
tools/ # Tool definitions and handlers
|
|
180
|
+
searchTool.js
|
|
181
|
+
fetchUrlTool.js
|
|
182
|
+
metadataTool.js
|
|
183
|
+
feloTool.js
|
|
184
|
+
utils/
|
|
185
|
+
search.js # Search and URL utilities
|
|
186
|
+
search_felo.js # Felo AI search utilities
|
|
187
|
+
package.json
|
|
188
|
+
README.md
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 🤝 Contributing
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
Contributions are welcome! Please open issues or submit pull requests.
|
|
197
|
+
|
|
198
|
+
> [!NOTE]
|
|
199
|
+
> Please follow the existing code style and add tests for new features.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## 📺 YouTube Channel
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
<div align="center">
|
|
207
|
+
<a href="https://youtube.com/@OEvortex"><img src="https://img.shields.io/badge/YouTube-%40OEvortex-red.svg" alt="YouTube Channel" /></a>
|
|
208
|
+
<br/>
|
|
209
|
+
<a href="https://youtube.com/@OEvortex">youtube.com/@OEvortex</a>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 📄 License
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
Apache License 2.0
|
|
218
|
+
|
|
219
|
+
> [!NOTE]
|
|
220
|
+
> This project is licensed under the Apache License 2.0 – see the <a href="LICENSE">LICENSE</a> file for details.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
<div align="center">
|
|
225
|
+
<sub>Made with ❤️ by <a href="https://youtube.com/@OEvortex">@OEvortex</a></sub>
|
|
226
|
+
</div>
|