mcp-searxng 0.3.0 → 0.3.6

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.
Files changed (3) hide show
  1. package/README.md +36 -2
  2. package/dist/index.js +18 -4
  3. package/package.json +7 -4
package/README.md CHANGED
@@ -19,12 +19,17 @@ An [MCP server](https://modelcontextprotocol.io/introduction) implementation tha
19
19
  - **searxng_web_search**
20
20
  - Execute web searches with pagination
21
21
  - Inputs:
22
- - `query` (string): Search terms
22
+ - `query` (string): The search query. This string is passed to external search services.
23
23
  - `pageno` (number, optional): Search page number, starts at 1 (default 1)
24
24
  - `time_range` (string, optional): Filter results by time range - one of: "day", "month", "year" (default: none)
25
25
  - `language` (string, optional): Language code for results (e.g., "en", "fr", "de") or "all" (default: "all")
26
26
  - `safesearch` (number, optional): Safe search filter level (0: None, 1: Moderate, 2: Strict) (default: instance setting)
27
27
 
28
+ - **web_url_read**
29
+ - Read and convert the content from a URL to markdown
30
+ - Inputs:
31
+ - `url` (string): The URL to fetch and process
32
+
28
33
  ## Configuration
29
34
 
30
35
  ### Setting the SEARXNG_URL
@@ -85,7 +90,36 @@ And then in your MCP config file:
85
90
 
86
91
  ### Docker
87
92
 
88
- #### Build
93
+ #### Using Pre-built Image from Docker Hub
94
+
95
+ ```bash
96
+ docker pull isokoliuk/mcp-searxng:latest
97
+ ```
98
+
99
+ Add this to your `claude_desktop_config.json`:
100
+
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "searxng": {
105
+ "command": "docker",
106
+ "args": [
107
+ "run",
108
+ "-i",
109
+ "--rm",
110
+ "-e",
111
+ "SEARXNG_URL",
112
+ "isokoliuk/mcp-searxng:latest"
113
+ ],
114
+ "env": {
115
+ "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL"
116
+ }
117
+ }
118
+ }
119
+ }
120
+ ```
121
+
122
+ #### Build Locally
89
123
 
90
124
  ```bash
91
125
  docker build -t mcp-searxng:latest -f Dockerfile .
package/dist/index.js CHANGED
@@ -3,6 +3,11 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
5
  import { NodeHtmlMarkdown } from "node-html-markdown";
6
+ import { readFileSync } from "fs";
7
+ import { join } from "path";
8
+ // Read package.json to get the version
9
+ const packageJson = JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8"));
10
+ const packageVersion = packageJson.version;
6
11
  const WEB_SEARCH_TOOL = {
7
12
  name: "searxng_web_search",
8
13
  description: "Performs a web search using the SearXNG API, ideal for general queries, news, articles, and online content. " +
@@ -12,7 +17,7 @@ const WEB_SEARCH_TOOL = {
12
17
  properties: {
13
18
  query: {
14
19
  type: "string",
15
- description: "Search query",
20
+ description: "The search query. This is the main input for the web search",
16
21
  },
17
22
  pageno: {
18
23
  type: "number",
@@ -58,11 +63,20 @@ const READ_URL_TOOL = {
58
63
  // Server implementation
59
64
  const server = new Server({
60
65
  name: "ihor-sokoliuk/mcp-searxng",
61
- version: "0.3.0",
66
+ version: packageVersion,
62
67
  }, {
63
68
  capabilities: {
64
69
  resources: {},
65
- tools: {},
70
+ tools: {
71
+ searxng_web_search: {
72
+ description: WEB_SEARCH_TOOL.description,
73
+ schema: WEB_SEARCH_TOOL.inputSchema,
74
+ },
75
+ web_url_read: {
76
+ description: READ_URL_TOOL.description,
77
+ schema: READ_URL_TOOL.inputSchema,
78
+ },
79
+ },
66
80
  },
67
81
  });
68
82
  function isSearXNGWebSearchArgs(args) {
@@ -146,7 +160,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
146
160
  if (!isSearXNGWebSearchArgs(args)) {
147
161
  throw new Error("Invalid arguments for searxng_web_search");
148
162
  }
149
- const { query, pageno = 1, time_range = "", language = "all", safesearch } = args;
163
+ const { query, pageno = 1, time_range = "", language = "all", safesearch, } = args;
150
164
  const results = await performWebSearch(query, pageno, time_range, language, safesearch);
151
165
  return {
152
166
  content: [{ type: "text", text: results }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-searxng",
3
- "version": "0.3.0",
3
+ "version": "0.3.6",
4
4
  "description": "MCP server for SearXNG integration",
5
5
  "license": "MIT",
6
6
  "author": "Ihor Sokoliuk (https://github.com/ihor-sokoliuk)",
@@ -13,18 +13,21 @@
13
13
  "files": [
14
14
  "dist"
15
15
  ],
16
+ "engines": {
17
+ "node": ">=18"
18
+ },
16
19
  "scripts": {
17
20
  "build": "tsc && shx chmod +x dist/*.js",
18
21
  "prepare": "npm run build",
19
22
  "watch": "tsc --watch"
20
23
  },
21
24
  "dependencies": {
22
- "@modelcontextprotocol/sdk": "1.9.0",
25
+ "@modelcontextprotocol/sdk": "1.10.1",
23
26
  "node-html-markdown": "^1.3.0"
24
27
  },
25
28
  "devDependencies": {
26
29
  "@types/node": "^22.14.1",
27
- "shx": "^0.3.4",
28
- "typescript": "^5.7.2"
30
+ "shx": "^0.4.0",
31
+ "typescript": "^5.8.3"
29
32
  }
30
33
  }