@amplify-studio/open-mcp 0.9.0 → 0.10.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 CHANGED
@@ -1,121 +1,127 @@
1
- # Open MCP
2
-
3
- > An open-source MCP (Model Context Protocol) server solution for AI agent integration.
1
+ # Open MCP Search Server
4
2
 
3
+ [![npm version](https://badge.fury.io/js/%40amplify-studio%2Fopen-mcp.svg)](https://www.npmjs.com/package/@amplify-studio/open-mcp)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@amplify-studio/open-mcp)](https://www.npmjs.com/package/@amplify-studio/open-mcp)
5
+ [![Docker pulls](https://img.shields.io/docker/pulls/amplifystudio/open-mcp)](https://hub.docker.com/r/amplifystudio/open-mcp)
5
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![GitHub stars](https://img.shields.io/github/stars/amplify-studio/open-mcp?style=social)](https://github.com/amplify-studio/open-mcp)
6
8
 
7
- ## Overview
9
+ Looking for free web search and page reading services? Want better MCP integration? Try this project!
8
10
 
9
- Open MCP is a comprehensive server solution that enables AI assistants (like Claude) to interact with external services through the Model Context Protocol. Currently focused on web search and content extraction, with plans to expand into a full-featured AI agent platform.
11
+ **Doc Language:** [English](README.md) | [中文](readme/zh-CN.md)
10
12
 
11
- ## Current Features
13
+ Deploy your own local web search and page reading service in one click. Powered by SearXNG and Firecrawl, integrated with Claude via MCP protocol.
12
14
 
13
- ### 🌐 Web Search
14
- - General web queries via Firecrawl API
15
- - Configurable result limit (default: 10, max: 100)
16
- - JSON-formatted structured output
15
+ ## Features
17
16
 
18
- ### 📄 URL Content Reading
19
- - Extract web page content as text/markdown
20
- - Intelligent caching with TTL
21
- - Section extraction and pagination options
17
+ ### MCP Tools
22
18
 
23
- ## Roadmap
19
+ Tools provided to AI assistants via MCP protocol:
24
20
 
25
- ### Phase 1: Current (Search & Content)
26
- - Web search via Gateway API
27
- - URL content reading
28
- - Intelligent caching
21
+ - 🔍 **Web Search** - Search the web with pagination, time filtering, and language options
22
+ - 📄 **URL Reading** - Extract web page content as markdown with advanced filtering
23
+ - 🎨 **Image Understanding** - Analyze images, videos, and documents using Zhipu AI
24
+ - 🖼️ **Image Generation** - Generate images from text using Zhipu AI
29
25
 
30
- ### Phase 2: Knowledge Base (RAG)
31
- - 🔄 Document indexing
32
- - 🔄 Semantic search
33
- - 🔄 Vector storage integration
26
+ ### Server Features
34
27
 
35
- ### Phase 3: Data Integration
36
- - ⏳ Database connectors
37
- - ⏳ API integrations
38
- - ⏳ File system access
28
+ Infrastructure capabilities for deployment and performance:
39
29
 
40
- ### Phase 4: Agent Framework
41
- - Tool composition
42
- - Workflow orchestration
43
- - ⏳ Multi-agent coordination
30
+ - 💾 **Smart Caching** - Automatic caching with TTL to improve performance
31
+ - 🔄 **Dual Transport** - STDIO or HTTP modes for flexible deployment
32
+ - ⏱️ **Auto Cleanup** - Automatic shutdown after 3min of inactivity
44
33
 
45
- ## Architecture
34
+ ### Powered By
46
35
 
47
- ```
48
- ┌─────────────────────────────────────────────────────────────┐
49
- │ Open MCP │
50
- ├─────────────────────────────────────────────────────────────┤
51
- │ │
52
- │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
53
- │ │ Search │ │ Content │ │ Future │ │
54
- │ │ Module │ │ Reader │ │ Modules │ │
55
- │ └─────┬──────┘ └─────┬──────┘ └─────┬──────┘ │
56
- │ │ │ │ │
57
- │ └────────────────┴────────────────┘ │
58
- │ │ │
59
- │ ┌─────▼─────┐ │
60
- │ │ Core │ │
61
- │ │ Layer │ │
62
- │ └─────┬─────┘ │
63
- │ │ │
64
- │ ┌──────────────────────┼──────────────────────┐ │
65
- │ │ │ │ │
66
- ▼▼ ▼▼ ▼▼ │
67
- ┌─────────┐ ┌─────────┐ ┌─────────┐ │
68
- │ Cache │ │ Gateway │ │ Plugins │ │
69
- └─────────┘ └─────────┘ └─────────┘ │
70
- │ │
71
- └─────────────────────────────────────────────────────────────┘
72
-
73
-
74
- ┌─────────────────┐
75
- │ Gateway API │
76
- │ (External) │
77
- └─────────────────┘
78
- ```
36
+ | Feature | Powered By |
37
+ |---------|------------|
38
+ | Search | [SearXNG](https://searxng.org/) - Privacy-respecting metasearch |
39
+ | Scraping | [Firecrawl](https://www.firecrawl.dev/) - Web scraping API |
40
+ | Image AI | [Zhipu AI](https://open.bigmodel.cn/) - Free tier for vision models |
41
+ | Protocol | [MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk) - Official implementation |
42
+
43
+ ---
44
+
45
+ ## Compatible Clients
46
+
47
+ Works with any MCP client:
48
+
49
+ - **Claude Desktop** / **Claude Code** / **Cursor** / **Cline**
50
+ - **Continue.dev**
51
+ - **HTTP Mode** (for remote deployment)
52
+
53
+ ---
54
+
55
+ ## Quick Start
56
+
57
+ ### Prerequisites
58
+
59
+ Before using this MCP server, you need:
60
+
61
+ 1. **A running Gateway API instance** with SearXNG and Firecrawl
62
+ - Deploy your own Gateway or use a hosted service
63
+ - Get your Gateway URL (e.g., `http://your-gateway.com:80`)
79
64
 
80
- ## Installation
65
+ 2. **(Optional) Zhipu AI API Key** for image features
66
+ - See [Getting Zhipu AI API Key](#getting-zhipu-ai-api-key) below
81
67
 
82
- ### Option 1: From npm (Recommended)
68
+ ### Setting Up Gateway
69
+
70
+ The open-mcp server requires a Gateway API instance. You can deploy your own using Docker Compose:
71
+
72
+ **Quick Start:**
83
73
 
84
- **Using Claude CLI:**
85
74
  ```bash
86
- claude mcp add-json -s user open-mcp '{
87
- "command": "npx",
88
- "args": ["-y", "@amplify-studio/open-mcp@latest"]
89
- }'
75
+ # Clone the repository (if not already done)
76
+ git clone https://github.com/amplify-studio/open-mcp.git
77
+ cd open-mcp
78
+
79
+ # Start the Gateway services
80
+ docker compose --env-file .env up -d
81
+
82
+ # Verify it's running
83
+ curl http://localhost:80/health
90
84
  ```
91
85
 
92
- **With custom gateway:**
86
+ **What's Included:**
87
+
88
+ The Gateway includes 7 services that work together:
89
+
90
+ | Service | Purpose | Port |
91
+ |---------|---------|------|
92
+ | **SearXNG** | Privacy-respecting metasearch engine | 8888 (internal) |
93
+ | **Firecrawl API** | Web scraping and crawling | 3002 (internal) |
94
+ | **Playwright** | Browser automation for dynamic content | 3000 (internal) |
95
+ | **Reader Adapter** | Jina Reader compatible API | 8082 (internal) |
96
+ | **Redis** | Rate limiting and caching | 6379 (internal) |
97
+ | **PostgreSQL** | Data persistence | 5432 (internal) |
98
+ | **Nginx** | API gateway (public endpoint) | **80** |
99
+
100
+ **API Endpoints (via Nginx on port 80):**
101
+
102
+ - 🔍 **Search:** `http://localhost:80/api/search/`
103
+ - 📄 **Read URL:** `http://localhost:80/api/read/<url>`
104
+ - 📊 **Status:** `http://localhost:80/api/status`
105
+
106
+ **Management:**
107
+
93
108
  ```bash
94
- claude mcp add-json -s user open-mcp '{
95
- "command": "npx",
96
- "args": ["-y", "@amplify-studio/open-mcp@latest"],
97
- "env": {
98
- "GATEWAY_URL": "http://115.190.91.253:80"
99
- }
100
- }'
109
+ # View logs
110
+ docker compose logs -f
111
+
112
+ # Stop services
113
+ docker compose down
114
+
115
+ # Restart services
116
+ docker compose restart
101
117
  ```
102
118
 
103
- ### Option 2: Claude Desktop Config
119
+ For detailed configuration, see [docker-compose.yml](docker-compose.yml) and [.env.example](.env.example).
104
120
 
105
- Edit `claude_desktop_config.json`:
121
+ ### Basic Usage
106
122
 
107
- ```json
108
- {
109
- "mcpServers": {
110
- "open-mcp": {
111
- "command": "npx",
112
- "args": ["-y", "@amplify-studio/open-mcp@latest"]
113
- }
114
- }
115
- }
116
- ```
123
+ Add to your Claude Desktop configuration (`claude_desktop_config.json`):
117
124
 
118
- **With custom gateway:**
119
125
  ```json
120
126
  {
121
127
  "mcpServers": {
@@ -123,279 +129,268 @@ Edit `claude_desktop_config.json`:
123
129
  "command": "npx",
124
130
  "args": ["-y", "@amplify-studio/open-mcp@latest"],
125
131
  "env": {
126
- "GATEWAY_URL": "http://115.190.91.253:80"
132
+ "GATEWAY_URL": "http://your-gateway.com:80",
133
+ "ZHIPUAI_API_KEY": "your-zhipu-api-key"
127
134
  }
128
135
  }
129
136
  }
130
137
  }
131
138
  ```
132
139
 
133
- ### Option 3: From GitHub
140
+ **Replace:**
141
+ - `http://your-gateway.com:80` with your actual Gateway URL (**required**)
142
+ - `your-zhipu-api-key` with your Zhipu AI API key (**optional** - only needed for image features)
143
+
144
+ ---
145
+
146
+ ## Usage
134
147
 
135
- Alternative: install directly from GitHub (no npm):
148
+ ### Web Search Tool
149
+
150
+ **Tool Name:** `searxng_web_search`
151
+
152
+ **Parameters:**
153
+ - `query` (string, required): The search query
154
+ - `limit` (number, optional): Maximum results (1-100, default: 10)
155
+
156
+ **Example:**
136
157
 
137
158
  ```json
138
159
  {
139
- "mcpServers": {
140
- "open-mcp": {
141
- "command": "npx",
142
- "args": ["-y", "github:amplify-studio/open-mcp"]
160
+ "query": "Model Context Protocol",
161
+ "limit": 5
162
+ }
163
+ ```
164
+
165
+ **Response:**
166
+
167
+ ```json
168
+ {
169
+ "query": "Model Context Protocol",
170
+ "results": [
171
+ {
172
+ "title": "Result Title",
173
+ "content": "Description or snippet...",
174
+ "url": "https://example.com"
143
175
  }
144
- }
176
+ ],
177
+ "totalCount": 5,
178
+ "duration": "234ms"
145
179
  }
146
180
  ```
147
181
 
148
- ### Option 4: Local Development (For Developers)
182
+ ### URL Reading Tool
149
183
 
150
- ```bash
151
- # Clone the repository
152
- git clone https://github.com/amplify-studio/open-mcp.git
153
- cd open-mcp
184
+ **Tool Name:** `web_url_read`
154
185
 
155
- # Install dependencies
156
- npm install
186
+ **Parameters:**
187
+ - `url` (string, required): The URL to fetch
188
+ - `startChar` (number, optional): Starting character position (default: 0)
189
+ - `maxLength` (number, optional): Maximum characters to return
190
+ - `section` (string, optional): Extract content under specific heading
191
+ - `paragraphRange` (string, optional): Paragraph range like '1-5', '3', '10-'
192
+ - `readHeadings` (boolean, optional): Return only headings (default: false)
157
193
 
158
- # Build the project
159
- npm run build
194
+ **Example:**
160
195
 
161
- # Run directly
162
- node dist/index.js
196
+ ```json
197
+ {
198
+ "url": "https://example.com/article",
199
+ "maxLength": 5000,
200
+ "section": "Introduction"
201
+ }
163
202
  ```
164
203
 
165
- **Claude Desktop Config** (local development):
204
+ **Response:**
205
+
166
206
  ```json
167
207
  {
168
- "mcpServers": {
169
- "open-mcp": {
170
- "command": "node",
171
- "args": ["/path/to/open-mcp/dist/index.js"]
172
- }
173
- }
208
+ "url": "https://example.com/article",
209
+ "content": "# Article Content\n\n...",
210
+ "charCount": 1500,
211
+ "duration": "456ms",
212
+ "cached": false
174
213
  }
175
214
  ```
176
215
 
177
- ### Option 5: Test with MCP Inspector
216
+ ### Image Understanding Tool
178
217
 
179
- ```bash
180
- cd open-mcp
181
- npm run inspector
182
- # Visit http://localhost:6274 to test
183
- ```
218
+ **Tool Name:** `image_understand`
184
219
 
185
- ### Option 6: Global Install (Advanced)
220
+ **Parameters:**
221
+ - `files` (array, required): File paths, URLs, or base64 data
222
+ - `prompt` (string, required): Question or instruction
223
+ - `thinking` (boolean, optional): Enable deep thinking mode
186
224
 
187
- ```bash
188
- cd open-mcp
189
- npm link
190
- # Then use: open-mcp
225
+ **Example:**
226
+
227
+ ```json
228
+ {
229
+ "files": ["/path/to/image.png"],
230
+ "prompt": "What objects are in this image?",
231
+ "thinking": false
232
+ }
191
233
  ```
192
234
 
193
- ## Updating
235
+ **Response:** Text description or answer
194
236
 
195
- To update to the latest version:
237
+ ### Image Generation Tool
196
238
 
197
- ### Using Claude CLI
239
+ **Tool Name:** `image_generate`
198
240
 
199
- ```bash
200
- # Remove old version
201
- claude mcp remove open-mcp
241
+ **Parameters:**
242
+ - `prompt` (string, required): Image description
243
+ - `size` (string, optional): Image size (default: "1024x1024")
202
244
 
203
- # Install latest version
204
- claude mcp add-json -s user open-mcp '{
205
- "command": "npx",
206
- "args": ["-y", "@amplify-studio/open-mcp@latest"]
207
- }'
208
- ```
245
+ **Example:**
209
246
 
210
- ### Clear npx Cache (Optional)
247
+ ```json
248
+ {
249
+ "prompt": "A beautiful sunset over mountains",
250
+ "size": "1024x1024"
251
+ }
252
+ ```
211
253
 
212
- If you encounter issues after updating:
254
+ **Response:** Image URL
213
255
 
214
- ```bash
215
- # Clear npx cache
216
- npm cache clean --force
256
+ ---
217
257
 
218
- # Then reinstall
219
- claude mcp remove open-mcp
220
- claude mcp add-json -s user open-mcp '{
221
- "command": "npx",
222
- "args": ["-y", "@amplify-studio/open-mcp@latest"]
223
- }'
224
- ```
258
+ ## Feature Showcase
225
259
 
226
- ### Check Current Version
260
+ ### Image Understanding Example
227
261
 
228
- ```bash
229
- # View your configuration
230
- cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
231
- ```
262
+ Our image understanding feature is powered by Zhipu AI GLM-4.6V-Flash, capable of accurately analyzing images, videos, and documents.
232
263
 
233
- ## Output Format
264
+ **Original Image:**
234
265
 
235
- Both tools return JSON strings for structured data parsing.
266
+ ![Image to understand](./docs/assets/images/image-to-understand.png)
236
267
 
237
- ### Web Search Output
268
+ **AI Understanding Result:**
238
269
 
239
- ```json
240
- {
241
- "query": "search term",
242
- "results": [
243
- {
244
- "title": "Result Title",
245
- "content": "Description or snippet",
246
- "url": "https://example.com"
247
- }
248
- ],
249
- "totalCount": 1,
250
- "duration": "234ms"
251
- }
252
- ```
270
+ ![Image understanding result](./docs/assets/images/image-understand-result.png)
253
271
 
254
- ### URL Read Output
272
+ For more details about image features, see [Image AI Tools Documentation](./docs/features/image-ai-tools.md)
255
273
 
256
- ```json
257
- {
258
- "url": "https://example.com",
259
- "content": "Page content in markdown/text format...",
260
- "charCount": 1500,
261
- "duration": "456ms",
262
- "cached": false
263
- }
264
- ```
274
+ ---
265
275
 
266
276
  ## Configuration
267
277
 
268
- | Variable | Required | Default | Description |
269
- |----------|----------|---------|-------------|
270
- | `GATEWAY_URL` | No | `http://115.190.91.253:80` | Gateway API base URL |
271
- | `AUTH_USERNAME` | No | - | Basic auth username |
272
- | `AUTH_PASSWORD` | No | - | Basic auth password |
273
- | `HTTP_PROXY` | No | - | Proxy URL for HTTP requests |
274
- | `HTTPS_PROXY` | No | - | Proxy URL for HTTPS requests |
275
- | `NO_PROXY` | No | - | Comma-separated bypass list |
276
- | `MCP_HTTP_PORT` | No | - | Enable HTTP transport on specified port |
278
+ ### Required Environment Variables
277
279
 
278
- ## Gateway API
280
+ | Variable | Description |
281
+ |----------|-------------|
282
+ | `GATEWAY_URL` | **Required.** Your Gateway API URL (e.g., `http://your-gateway.com:80`) |
279
283
 
280
- The server connects to a Gateway API that provides:
284
+ ### Optional Environment Variables
281
285
 
282
- | API | Method | Endpoint | Description |
283
- |-----|--------|----------|-------------|
284
- | Search | POST | `/api/firecrawl-search` | Web search via Firecrawl |
285
- | Read | GET | `/api/read/{url}` | Extract web content |
286
- | Health | GET | `/health` | Health check |
287
- | Status | GET | `/api/status` | Service status |
286
+ | Variable | Description |
287
+ |----------|-------------|
288
+ | `ZHIPUAI_API_KEY` | Optional. Required only for image understanding/generation features |
288
289
 
289
- ## HTTP Transport Mode
290
+ **Need advanced configuration?** See [Advanced Setup Guide](docs/advanced-setup.md) for proxy, authentication, and HTTP transport options.
290
291
 
291
- The server supports two transport modes: **STDIO** (default) and **HTTP**.
292
+ ### Getting Zhipu AI API Key
292
293
 
293
- ### STDIO Mode (Default)
294
+ To use image understanding and generation features, you need a free API key from Zhipu AI:
294
295
 
295
- Standard MCP transport for local development and Claude Desktop integration. The server communicates via stdin/stdout.
296
+ 1. **Register with Invite Link**: [https://www.bigmodel.cn/invite?icode=yn2yXKXS+Ba1UqrD19VwPwZ3c5owLmCCcMQXWcJRS8E=](https://www.bigmodel.cn/invite?icode=yn2yXKXS+Ba1UqrD19VwPwZ3c5owLmCCcMQXWcJRS8E=)
297
+ - Use the invite link for better benefits
296
298
 
297
- ### HTTP Mode
299
+ 2. **Get API Key**:
300
+ - After registration, visit [API Keys page](https://www.bigmodel.cn/usercenter/proj-mgmt/apikeys)
301
+ - Click "生成新的 API Key" (Generate new API key)
302
+ - Copy the generated key (format: `id.secret`)
298
303
 
299
- HTTP transport enables remote server deployment and multi-client connections. Uses the **Streamable HTTP** protocol from MCP specification.
304
+ 3. **Free Tier Benefits**:
305
+ - GLM-4.6V-Flash: Free for vision understanding
306
+ - Cogview-3-Flash: Free for image generation
307
+ - No credit card required for basic usage
300
308
 
301
- #### Starting HTTP Server
309
+ 4. **Set Environment Variable**:
310
+ ```bash
311
+ export ZHIPUAI_API_KEY="your-api-key-here"
312
+ ```
302
313
 
303
- ```bash
304
- # Basic
305
- MCP_HTTP_PORT=3333 npm start
314
+ **Note**: The API key is optional. Only required if you want to use image understanding or generation features.
306
315
 
307
- # With custom gateway
308
- GATEWAY_URL=http://115.190.91.253:80 MCP_HTTP_PORT=3333 npm start
316
+ ---
317
+
318
+ ### Option 1: NPX (Recommended)
309
319
 
310
- # Background mode
311
- MCP_HTTP_PORT=3333 npm start &
320
+ ```bash
321
+ npx -y @amplify-studio/open-mcp@latest
312
322
  ```
313
323
 
314
- #### API Endpoints
324
+ ### Option 2: Global Install
315
325
 
316
- | Endpoint | Method | Description |
317
- |----------|--------|-------------|
318
- | `/health` | GET | Health check |
319
- | `/mcp` | POST | Send JSON-RPC requests |
320
- | `/mcp` | GET | Receive SSE notifications |
321
- | `/mcp` | DELETE | Close session |
326
+ ```bash
327
+ npm install -g @amplify-studio/open-mcp
328
+ open-mcp
329
+ ```
322
330
 
323
- #### Verify Connection
331
+ ### Option 3: Docker
324
332
 
325
333
  ```bash
326
- # Health check
327
- curl http://localhost:3333/health
334
+ docker pull amplifystudio/open-mcp:latest
335
+ ```
328
336
 
329
- # Expected response
330
- # {"status":"healthy","server":"ihor-sokoliuk/mcp-searxng","version":"0.8.2","transport":"http"}
337
+ ```json
338
+ {
339
+ "mcpServers": {
340
+ "open-mcp": {
341
+ "command": "docker",
342
+ "args": [
343
+ "run", "-i", "--rm",
344
+ "-e", "GATEWAY_URL",
345
+ "-e", "ZHIPUAI_API_KEY",
346
+ "amplifystudio/open-mcp:latest"
347
+ ],
348
+ "env": {
349
+ "GATEWAY_URL": "http://your-gateway.com:80",
350
+ "ZHIPUAI_API_KEY": "your-zhipu-api-key"
351
+ }
352
+ }
353
+ }
354
+ }
331
355
  ```
332
356
 
333
- #### Claude Code Integration
357
+ **Note**: For full Docker Compose deployment with all services, see [docker-compose.yml](https://github.com/amplify-studio/open-mcp/blob/main/docker-compose.yml).
358
+
359
+ ### Option 4: Local Development
334
360
 
335
361
  ```bash
336
- # Add HTTP server to Claude Code
337
- claude mcp add --transport http open-mcp http://localhost:3333/mcp
362
+ # Clone the repository
363
+ git clone https://github.com/amplify-studio/open-mcp.git
364
+ cd open-mcp
338
365
 
339
- # Verify
340
- claude mcp list
341
- ```
366
+ # Install dependencies
367
+ npm install
342
368
 
343
- #### Example curl Commands
369
+ # Build the project
370
+ npm run build
344
371
 
345
- ```bash
346
- # 1. Initialize session
347
- curl -X POST http://localhost:3333/mcp \
348
- -H "Content-Type: application/json" \
349
- -H "Accept: application/json, text/event-stream" \
350
- -d '{
351
- "jsonrpc": "2.0",
352
- "id": 1,
353
- "method": "initialize",
354
- "params": {
355
- "protocolVersion": "2025-06-18",
356
- "capabilities": {},
357
- "clientInfo": {"name": "test-client", "version": "1.0"}
358
- }
359
- }'
360
-
361
- # 2. List tools (use returned session-id)
362
- curl -X POST http://localhost:3333/mcp \
363
- -H "Content-Type: application/json" \
364
- -H "mcp-session-id: <session-id>" \
365
- -d '{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}'
366
-
367
- # 3. Call search tool
368
- curl -X POST http://localhost:3333/mcp \
369
- -H "Content-Type: application/json" \
370
- -H "mcp-session-id: <session-id>" \
371
- -d '{
372
- "jsonrpc": "2.0",
373
- "id": 3,
374
- "method": "tools/call",
375
- "params": {
376
- "name": "searxng_web_search",
377
- "arguments": {"query": "test"}
378
- }
379
- }'
372
+ # Run directly
373
+ node dist/index.js
380
374
  ```
381
375
 
382
- #### Security Considerations
376
+ ## HTTP Transport Mode
383
377
 
384
- For production deployments:
378
+ The server supports HTTP transport for remote deployment. See [Advanced Setup Guide](docs/advanced-setup.md#http-transport-mode) for detailed instructions.
385
379
 
386
- 1. **DNS Rebinding Protection** - Enable `enableDnsRebindingProtection` in `http-server.ts`
387
- 2. **Bind to localhost** - Use `127.0.0.1` instead of `0.0.0.0` for local development
388
- 3. **Authentication** - Use API Gateway, reverse proxy, or implement auth headers
389
- 4. **CORS** - Configure `ALLOWED_ORIGINS` environment variable
380
+ **Quick Start**:
381
+ ```bash
382
+ MCP_HTTP_PORT=3333 GATEWAY_URL=http://your-gateway.com:80 npx @amplify-studio/open-mcp@latest
383
+ ```
390
384
 
385
+ Then connect from Claude Code:
391
386
  ```bash
392
- # Example: Production configuration
393
- MCP_HTTP_PORT=3333
394
- ALLOWED_ORIGINS=https://yourdomain.com
387
+ claude mcp add --transport http open-mcp http://localhost:3333/mcp
395
388
  ```
396
389
 
397
390
  ## Development
398
391
 
392
+ ### Setup
393
+
399
394
  ```bash
400
395
  # Install dependencies
401
396
  npm install
@@ -406,6 +401,9 @@ npm run watch
406
401
  # Run tests
407
402
  npm test
408
403
 
404
+ # Generate coverage report
405
+ npm run test:coverage
406
+
409
407
  # Test with MCP Inspector
410
408
  npm run inspector
411
409
 
@@ -413,77 +411,106 @@ npm run inspector
413
411
  npm run build
414
412
  ```
415
413
 
416
- ## Docker Deployment
414
+ ### Testing
417
415
 
418
- The server can be deployed in HTTP mode using Docker for remote access.
416
+ ```bash
417
+ # Run all tests
418
+ npm test
419
419
 
420
- ### Quick Start (HTTP Mode)
420
+ # Run coverage report
421
+ npm run test:coverage
421
422
 
422
- ```bash
423
- # Build the Docker image
424
- docker build -t open-mcp:latest .
425
-
426
- # Run HTTP server on port 3333
427
- docker run -d -p 3333:3333 \
428
- -e MCP_HTTP_PORT=3333 \
429
- -e GATEWAY_URL=http://115.190.91.253:80 \
430
- --name open-mcp \
431
- open-mcp:latest
432
-
433
- # Verify deployment
434
- curl http://localhost:3333/health
423
+ # Test specific file
424
+ npx tsx __tests__/unit/search.test.ts
435
425
  ```
436
426
 
437
- ### Configuration
438
-
439
- | Environment Variable | Description | Default |
440
- |---------------------|-------------|---------|
441
- | `MCP_HTTP_PORT` | HTTP server port | 3333 |
442
- | `GATEWAY_URL` | Gateway API base URL | `http://115.190.91.253:80` |
443
- | `ALLOWED_ORIGINS` | CORS allowed origins | `*` |
427
+ ## Updating
444
428
 
445
- ### Claude Code Integration
429
+ ### Using Claude CLI
446
430
 
447
431
  ```bash
448
- # Add HTTP server to Claude Code
449
- claude mcp add --transport http open-mcp http://your-server:3333/mcp
432
+ # Remove old version
433
+ claude mcp remove open-mcp
434
+
435
+ # Install latest version
436
+ claude mcp add-json -s user open-mcp '{
437
+ "command": "npx",
438
+ "args": ["-y", "@amplify-studio/open-mcp@latest"],
439
+ "env": {
440
+ "GATEWAY_URL": "https://your-gateway-instance.com",
441
+ "ZHIPUAI_API_KEY": "your-zhipu-api-key"
442
+ }
443
+ }'
450
444
  ```
451
445
 
452
- ### Docker Compose (Optional)
453
-
454
- For production deployments, you can use Docker Compose to manage the service:
455
-
456
- ```yaml
457
- services:
458
- open-mcp:
459
- image: open-mcp:latest
460
- container_name: open-mcp
461
- ports:
462
- - "3333:3333"
463
- environment:
464
- - MCP_HTTP_PORT=3333
465
- - GATEWAY_URL=http://115.190.91.253:80
466
- - ALLOWED_ORIGINS=https://yourdomain.com
467
- restart: unless-stopped
446
+ ### Clear npx Cache
447
+
448
+ If you encounter issues after updating:
449
+
450
+ ```bash
451
+ npm cache clean --force
452
+ claude mcp remove open-mcp
453
+ claude mcp add-json -s user open-mcp '{
454
+ "command": "npx",
455
+ "args": ["-y", "@amplify-studio/open-mcp@latest"],
456
+ "env": {
457
+ "GATEWAY_URL": "https://your-gateway-instance.com",
458
+ "ZHIPUAI_API_KEY": "your-zhipu-api-key"
459
+ }
460
+ }'
468
461
  ```
469
462
 
470
463
  ## Contributing
471
464
 
472
- We're building an open-source community for AI agent infrastructure. Contributions welcome!
465
+ We welcome contributions! Please follow these guidelines:
473
466
 
474
467
  - Fork the repository
475
468
  - Create a feature branch
476
469
  - Make your changes
477
470
  - Submit a pull request
478
471
 
472
+ ### Coding Standards
473
+
474
+ - Use TypeScript with strict type safety
475
+ - Follow existing error handling patterns
476
+ - Write concise, informative error messages
477
+ - Include unit tests for new functionality
478
+ - Maintain 90%+ test coverage
479
+
479
480
  ## License
480
481
 
481
- MIT
482
+ MIT License - see [LICENSE](LICENSE) for details.
483
+
484
+ ## Credits & Acknowledgments
485
+
486
+ This project is a fork of [mcp-searxng](https://github.com/ihor-sokoliuk/mcp-searxng) by [Ihor Sokoliuk](https://github.com/ihor-sokoliuk), adapted and enhanced with additional features and improvements.
487
+
488
+ ### Key Dependencies
482
489
 
483
- ## Credits
490
+ This project is built upon these excellent open-source projects:
484
491
 
485
- Based on [mcp-searxng](https://github.com/ihor-sokoliuk/mcp-searxng) by Ihor Sokoliuk
492
+ | Project | Purpose | License |
493
+ |---------|---------|---------|
494
+ | [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) | Official MCP TypeScript SDK | MIT |
495
+ | [node-html-markdown](https://github.com/crosstype/node-html-markdown) | HTML to Markdown conversion | MIT |
496
+ | [undici](https://github.com/nodejs/undici) | HTTP client with proxy support | MIT |
497
+ | [express](https://github.com/expressjs/express) | HTTP server framework | MIT |
498
+ | [cors](https://github.com/expressjs/cors) | CORS middleware | MIT |
499
+
500
+ ### Related Projects
501
+
502
+ Special thanks to these amazing projects:
503
+
504
+ - [mcp-searxng](https://github.com/ihor-sokoliuk/mcp-searxng) - Original project that we forked from, created by [Ihor Sokoliuk](https://github.com/ihor-sokoliuk)
505
+ - [Model Context Protocol](https://modelcontextprotocol.io/) - Official MCP documentation
506
+ - [SearXNG](https://searxng.org/) - Privacy-respecting metasearch engine
507
+ - [Firecrawl](https://www.firecrawl.dev/) - Web scraping and crawling API
486
508
 
487
509
  ---
488
510
 
511
+ ## Star History
512
+
513
+ [![Star History Chart](https://api.star-history.com/svg?repos=amplify-studio/open-mcp&type=Date)](https://star-history.com/#amplify-studio/open-mcp&Date)
514
+
515
+
489
516
  **Made with ❤️ by [Amplify Studio](https://github.com/amplify-studio)**