mcp-zoomeye-org 0.1.0__tar.gz

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.
@@ -0,0 +1,75 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ /dist
3
+ /node_modules
4
+ **/__pycache__
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # Logs
9
+ /logs
10
+ *.log
11
+
12
+ # PyBuilder
13
+ .Python
14
+ .pybuilder/
15
+ target/
16
+ pip-wheel-metadata/
17
+
18
+ # PyInstaller
19
+ # Usually these files are written by a python script from a template
20
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
21
+ *.manifest
22
+ *.spec
23
+
24
+ # Installer logs
25
+ pip-log.txt
26
+ pip-delete-this-directory.txt
27
+
28
+ # Django stuff:
29
+ *.log
30
+ local_settings.py
31
+ db.sqlite3
32
+ db.sqlite3-journal
33
+
34
+ # Flask stuff:
35
+ instance/
36
+ .webassets-cache
37
+
38
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
39
+ __pypackages__/
40
+
41
+ # Jupyter Notebook
42
+ .ipynb_checkpoints
43
+
44
+ # IPython
45
+ profile_default/
46
+ ipython_config.py
47
+
48
+ # pyenv
49
+ .python-version
50
+
51
+ # OS
52
+ .DS_Store
53
+
54
+ # Tests
55
+ /coverage
56
+ /.nyc_output
57
+
58
+ # IDEs and editors
59
+ /.idea
60
+
61
+ # IDE - VSCode
62
+ .vscode/*
63
+ !.vscode/settings.json
64
+ !.vscode/tasks.json
65
+ !.vscode/launch.json
66
+ !.vscode/extensions.json
67
+ !.vscode/python.code-profile
68
+ /data
69
+ /public
70
+ .env
71
+ .env.dev
72
+ venv
73
+ /out
74
+ /build
75
+ tests/
@@ -0,0 +1,34 @@
1
+ # Changelog
2
+
3
+ All notable changes to the ZoomEye MCP Server will be documented in this file.
4
+
5
+ ## [0.1.5] - 2025-06-27
6
+
7
+ ### Fixes
8
+ - Fixed a bug in AsyncClient Proxy Parameter
9
+
10
+ ## [0.1.4] - 2025-06-25
11
+
12
+ ### New Features
13
+ - Added vulnerability query functionality
14
+ - Added vulnerability search capability
15
+
16
+ ### Performance Improvements
17
+ - Optimized code by converting synchronous operations to asynchronous
18
+
19
+ ## [0.1.3] - 2025-03-19
20
+
21
+ ### New Features
22
+ - Added comprehensive usage guide and interactive examples
23
+ - Introduced `prompts.py` for improved search syntax guidance
24
+ - Enhanced natural language interaction support with AI assistants
25
+
26
+ ### Documentation Updates
27
+ - Restructured and optimized README.md
28
+ - Improved description of MCP (Model Context Protocol) server functionality
29
+ - Added integration guidelines for major AI development environments (Claude Desktop, Cursor, Windsurf, Cline, Continue, Zed)
30
+ - Included visual search examples
31
+
32
+ ### Other Improvements
33
+ - Optimized code structure and comments
34
+ - Enhanced error handling and feedback messages
@@ -0,0 +1,25 @@
1
+ FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv
2
+
3
+ WORKDIR /app
4
+
5
+ ENV UV_COMPILE_BYTECODE=1
6
+ ENV UV_LINK_MODE=copy
7
+
8
+ RUN --mount=type=cache,target=/root/.cache/uv \
9
+ --mount=type=bind,source=uv.lock,target=uv.lock \
10
+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
11
+ uv sync --frozen --no-install-project --no-dev --no-editable
12
+
13
+ ADD . /app
14
+ RUN --mount=type=cache,target=/root/.cache/uv \
15
+ uv sync --frozen --no-dev --no-editable
16
+
17
+ FROM python:3.12-slim-bookworm
18
+
19
+ WORKDIR /app
20
+
21
+ COPY --from=uv --chown=app:app /app/.venv /app/.venv
22
+
23
+ ENV PATH="/app/.venv/bin:$PATH"
24
+
25
+ ENTRYPOINT ["mcp-zoomeye-org"]
@@ -0,0 +1,440 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-zoomeye-org
3
+ Version: 0.1.0
4
+ Summary: A Model Context Protocol server providing tools for ZoomEye queries for LLMs
5
+ Author-email: zoomeye team <zoomeye@knownsec.com>
6
+ License: MIT
7
+ Keywords: llm,mcp,zoomeye
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Requires-Python: >=3.10
14
+ Requires-Dist: mcp>=1.0.0
15
+ Requires-Dist: pydantic>=2.0.0
16
+ Requires-Dist: python-dotenv>=1.0.0
17
+ Requires-Dist: requests>=2.32.3
18
+ Description-Content-Type: text/markdown
19
+
20
+ # 🚀 ZoomEye MCP Server
21
+
22
+ A Model Context Protocol (MCP) server that provides network asset information based on query conditions. This server allows Large Language Models (LLMs) to obtain network asset information by querying ZoomEye using dorks and other search parameters.
23
+
24
+ ## 🔔 Announcement
25
+
26
+ 🎉 We are excited to announce the official open-source release of **ZoomEye MCP Server** — a powerful Model Context Protocol (MCP) server that brings real-time cyber asset intelligence to AI assistants and development environments.
27
+
28
+ 🚀 Free Trial: 7-Day FREE Access to ZoomEye MCP!
29
+ Experience ZoomEye MCP — the AI-powered cyberspace asset search engine — absolutely free for 7 days!
30
+
31
+ 🔍 Search global internet assets, track real-time changes, and unlock AI-driven insights — all in one place.
32
+
33
+ 👉 How to claim:
34
+
35
+ 1. Follow us on Twitter: [@zoomeye_team](https://x.com/zoomeye_team)
36
+ 2. DM us "MCP" and your MCP setup screenshot
37
+ 3. Get instant access to your 7-day membership
38
+
39
+ 🎁 Limited-time free trial — explore the power of AI asset search today!
40
+
41
+ 💡 Provide insightful feedback that gets officially adopted, and you'll unlock **even more rewards**!
42
+
43
+ 🔧 Fully compatible with leading MCP environments:
44
+
45
+ - Claude Desktop
46
+ - Cursor
47
+ - Windsurf
48
+ - Cline
49
+ - Continue
50
+ - Zed
51
+ - Cherry Studio
52
+ - Chatbox
53
+
54
+ 🔗 Explore ZoomEye MCP Server on:
55
+
56
+ - GitHub: [knownsec/mcp_zoomeye_org](https://github.com/knownsec/mcp_zoomeye_org)
57
+ - MCP.so: [mcp.so/server/mcp_zoomeye](https://mcp.so/server/mcp_zoomeye/zoomeye-ai)
58
+ - Smithery: [smithery.ai/server/@zoomeye-ai/mcp_zoomeye](https://smithery.ai/server/@zoomeye-ai/mcp_zoomeye)
59
+ - Cursor Directory: [cursor.directory/mcp/zoomeye](https://cursor.directory/mcp/zoomeye)
60
+ - Pulse MCP: [pulsemcp.com/servers/zoomeye](https://www.pulsemcp.com/servers/zoomeye)
61
+ - Glama MCP: [glama.ai/mcp/servers](https://glama.ai/mcp/servers)
62
+
63
+ We welcome everyone to use, explore, and contribute!
64
+
65
+ ## 🔑 How can I get a ZoomEye API key?
66
+
67
+ To use this MCP server, you’ll need a ZoomEye API key.
68
+
69
+ 1. Go to https://www.zoomeye.org
70
+ 2. Register or log in
71
+ 3. Click your avatar → **Profile**
72
+ 4. Copy your **API-KEY**
73
+ 5. Set the environment variable:
74
+
75
+ `export ZOOMEYE_API_KEY="your_api_key_here"`
76
+
77
+ ![zoomeye1](./zoomeye1.png)
78
+
79
+ ![zoomeye2](./zoomeye2.png)
80
+
81
+ ## Features
82
+
83
+ - Query ZoomEye for network asset information using dorks
84
+ - Caching mechanism to improve performance and reduce API calls
85
+ - Automatic retry mechanism for failed API requests
86
+ - Comprehensive error handling and logging
87
+
88
+ ## Available Tools
89
+
90
+ - `zoomeye_search` - Get network asset information based on query conditions.
91
+ - Required parameters:
92
+ - `qbase64` (string): Base64 encoded query string for ZoomEye search
93
+ - Optional parameters:
94
+ - `page` (integer): View asset page number, default is 1
95
+ - `pagesize` (integer): Number of records per page, default is 10, maximum is 1000
96
+ - `fields` (string): The fields to return, separated by commas
97
+ - `sub_type` (string): Data type, supports v4, v6, and web. Default is v4
98
+ - `facets` (string): Statistical items, separated by commas if there are multiple
99
+ - `ignore_cache` (boolean): Whether to ignore the cache
100
+
101
+ ## Usage Guide
102
+
103
+ ### Basic Usage
104
+
105
+ Once the server is running, you can interact with it through your AI assistant or development environment. Here's how to use it:
106
+
107
+ 1. **Start the server** using one of the installation methods above
108
+ 2. **Configure your AI assistant** (Claude Desktop, Cursor, Windsurf, Cline, Continue, Zed, etc.) to use the server
109
+ 3. **Query network information** using natural language
110
+
111
+ ![searchexample](example.png)
112
+
113
+ ### Search Syntax Guide
114
+
115
+ - Search Scope covers devices (IPv4, IPv6) and websites (domains).
116
+ - When entering a search string, the system will match keywords in "global" mode, including content from various
117
+ protocols such as HTTP, SSH, FTP, etc. (e.g., HTTP/HTTPS protocol headers, body, SSL, title, and other protocol
118
+ banners).
119
+ - Search strings are case-insensitive and will be segmented for matching (the search results page provides a "
120
+ segmentation" test feature). When using == for search, it enforces exact case-sensitive matching with strict syntax.
121
+ - Please use quotes for search strings (e.g., "Cisco System" or 'Cisco System'). If the search string contains quotes,
122
+ use the escape character, e.g.,"a\"b". If the search string contains parentheses, use the escape character, e.g.,
123
+ portinfo\(\).
124
+
125
+ You can see more detailed search syntax rules in [prompts.py](src/mcp_zoomeye_org/prompts.py).
126
+
127
+ For more information on the ZoomEye Search API, refer to the [ZoomEye API v2 documentation](https://www.zoomeye.org/doc).
128
+
129
+ ## Getting Started
130
+
131
+ ### Prerequisites
132
+
133
+ 1. **ZoomEye API Key**
134
+
135
+ - Register for an account at [ZoomEye](https://www.zoomeye.org/)
136
+ - Obtain your API key from your account settings
137
+ - The API key will be used to authenticate your requests to the ZoomEye API
138
+ 2. **Python Environment**
139
+
140
+ - Python 3.10 or higher is required
141
+ - Alternatively, you can use Docker to run the server without installing Python
142
+
143
+ ## Installation
144
+
145
+ ### Using PIP
146
+
147
+ Alternatively, you can install `mcp-zoomeye-org` via pip:
148
+
149
+ ```bash
150
+ pip install mcp-zoomeye-org
151
+ ```
152
+
153
+ After installation, you can run it as a script using the following command:
154
+
155
+ ```bash
156
+ python -m mcp_zoomeye_org
157
+ ```
158
+
159
+ ### Using uv
160
+
161
+ [`uv`](https://docs.astral.sh/uv/) is a fast Python package installer and resolver written in Rust. It's a modern alternative to pip that offers significant performance improvements.
162
+
163
+ #### Installation of uv
164
+
165
+ ```bash
166
+ # Install uv using curl (macOS/Linux)
167
+ curl -LsSf https://astral.sh/uv/install.sh | sh
168
+
169
+ # Or using PowerShell (Windows)
170
+ irm https://astral.sh/uv/install.ps1 | iex
171
+
172
+ # Or using Homebrew (macOS)
173
+ brew install uv
174
+ ```
175
+
176
+ #### Using uvx to run mac-zoomeye-org
177
+
178
+ No specific installation is required when using [`uvx`](https://docs.astral.sh/uv/guides/tools/), which allows you to run Python packages directly:
179
+
180
+ #### Installing with uv
181
+
182
+ Alternatively, you can install the package using uv:
183
+
184
+ ```bash
185
+ # Install in the current environment
186
+ uv pip install mac-zoomeye-org
187
+
188
+ # Or create and install in a new virtual environment
189
+ uv venv
190
+ uv pip install mac-zoomeye-org
191
+ ```
192
+
193
+ ## Configuration
194
+
195
+ ### Environment Variables
196
+
197
+ The ZoomEye MCP server requires the following environment variable:
198
+
199
+ - `ZOOMEYE_API_KEY`: Your ZoomEye API key for authentication
200
+
201
+ You can set this environment variable in several ways:
202
+
203
+ 1. **Export in your shell session**:
204
+
205
+ ```bash
206
+ export ZOOMEYE_API_KEY="your_api_key_here"
207
+ ```
208
+
209
+ ### Configure Claude.app
210
+
211
+ Add the following in Claude settings:
212
+
213
+ <details>
214
+ <summary>Using uvx</summary>
215
+
216
+ ```json
217
+ "mcpServers": {
218
+ "zoomeye": {
219
+ "command": "uvx",
220
+ "args": ["mac-zoomeye-org"],
221
+ "env": {
222
+ "ZOOMEYE_API_KEY": "your_api_key_here"
223
+ }
224
+ }
225
+ }
226
+ ```
227
+
228
+ </details>
229
+
230
+
231
+ <details>
232
+ <summary>Installed via pip</summary>
233
+
234
+ ```json
235
+ "mcpServers": {
236
+ "zoomeye": {
237
+ "command": "python",
238
+ "args": ["-m", "mcp_server_zoomeye"],
239
+ "env": {
240
+ "ZOOMEYE_API_KEY": "your_api_key_here"
241
+ }
242
+ }
243
+ }
244
+ ```
245
+
246
+ </details>
247
+
248
+ ### Configure Zed
249
+
250
+ Add the following in Zed's settings.json:
251
+
252
+ <details>
253
+ <summary>Using uvx</summary>
254
+
255
+ ```json
256
+ "context_servers": [
257
+ "mac-zoomeye-org": {
258
+ "command": "uvx",
259
+ "args": ["mac-zoomeye-org"],
260
+ "env": {
261
+ "ZOOMEYE_API_KEY": "your_api_key_here"
262
+ }
263
+ }
264
+ ],
265
+ ```
266
+
267
+ </details>
268
+
269
+ <details>
270
+ <summary>Installed via pip</summary>
271
+
272
+ ```json
273
+ "context_servers": {
274
+ "mac-zoomeye-org": {
275
+ "command": "python",
276
+ "args": ["-m", "mcp_server_zoomeye"],
277
+ "env": {
278
+ "ZOOMEYE_API_KEY": "your_api_key_here"
279
+ }
280
+ }
281
+ },
282
+ ```
283
+
284
+ </details>
285
+
286
+ ## Example Interactions
287
+
288
+ ### Example 1: Retrieve global Apache Tomcat assets
289
+
290
+ ```json
291
+ {
292
+ "name": "zoomeye_search",
293
+ "arguments": {
294
+ "qbase64": "app=\"Apache Tomcat\""
295
+ }
296
+ }
297
+ ```
298
+
299
+ Response:
300
+
301
+ ```json
302
+ {
303
+ "code": 60000,
304
+ "message": "success",
305
+ "total": 163139107,
306
+ "query": "app=\"Apache Tomcat\"",
307
+ "data": [
308
+ {
309
+ "url": "https://1.1.1.1:443",
310
+ "ssl.jarm": "29d29d15d29d29d00029d29d29d29dea0f89a2e5fb09e4d8e099befed92cfa",
311
+ "ssl.ja3s": "45094d08156d110d8ee97b204143db14",
312
+ "iconhash_md5": "f3418a443e7d841097c714d69ec4bcb8",
313
+ "robots_md5": "0b5ce08db7fb8fffe4e14d05588d49d9",
314
+ "security_md5": "0b5ce08db7fb8fffe4e14d05588d49d9",
315
+ "ip": "1.1.1.1",
316
+ "domain": "www.google.com",
317
+ "hostname": "SPACEX",
318
+ "os": "windows",
319
+ "port": 443,
320
+ "service": "https",
321
+ "title": ["GoogleGoogle appsGoogle Search"],
322
+ "version": "1.1.0",
323
+ "device": "webcam",
324
+ "rdns": "c01031-001.cust.wallcloud.ch",
325
+ "product": "OpenSSD",
326
+ "header": "HTTP/1.1 302 Found Location: https://www.google.com/?gws_rd=ssl Cache-Control: private...",
327
+ "header_hash": "27f9973fe57298c3b63919259877a84d",
328
+ "body": "HTTP/1.1 302 Found Location: https://www.google.com/?gws_rd=ssl Cache-Control: private...",
329
+ "body_hash": "84a18166fde3ee7e7c974b8d1e7e21b4",
330
+ "banner": "SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3",
331
+ "update_time": "2024-07-03T14:34:10",
332
+ "header.server.name": "nginx",
333
+ "header.server.version": "1.8.1",
334
+ "continent.name": "Europe",
335
+ "country.name": "Germany",
336
+ "province.name": "Hesse",
337
+ "city.name": "Frankfurt",
338
+ "lon": "118.753262",
339
+ "lat": "32.064838",
340
+ "isp.name": "aviel.ru",
341
+ "organization.name": "SERVISFIRST BANK",
342
+ "zipcode": "210003",
343
+ "idc": 0,
344
+ "honeypot": 0,
345
+ "asn": 4837,
346
+ "protocol": "tcp",
347
+ "ssl": "SSL Certificate Version: TLS 1.2 CipherSuit: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256...",
348
+ "primary_industry": "Finance",
349
+ "sub_industry": "bank",
350
+ "rank": 60
351
+ }
352
+ ]
353
+ }
354
+ ```
355
+
356
+ ## Debugging and Troubleshooting
357
+
358
+ ### Using MCP Inspector
359
+
360
+ The Model Context Protocol Inspector is a tool that helps debug MCP servers by simulating client interactions. You can use it to test your ZoomEye MCP server:
361
+
362
+ ```bash
363
+ # For uvx installation
364
+ npx @modelcontextprotocol/inspector uvx mac-zoomeye-org
365
+
366
+ # If developing locally
367
+ cd path/to/servers/src/mcp_server_zoomeye
368
+ npx @modelcontextprotocol/inspector uv run mac-zoomeye-org
369
+ ```
370
+
371
+ ### Common Issues
372
+
373
+ 1. **Authentication Errors**
374
+
375
+ - Ensure your ZoomEye API key is correct and properly set as an environment variable
376
+ - Check that your API key has not expired or been revoked
377
+ 2. **Connection Issues**
378
+
379
+ - Verify your internet connection
380
+ - Check if the ZoomEye API is experiencing downtime
381
+ 3. **No Results**
382
+
383
+ - Your query might be too specific or contain syntax errors
384
+ - Try simplifying your query or using different search terms
385
+ 4. **Rate Limiting**
386
+
387
+ - ZoomEye API has rate limits based on your account type
388
+ - Space out your requests or upgrade your account for higher limits
389
+
390
+ ## Advanced Usage
391
+
392
+ ### Caching
393
+
394
+ The ZoomEye MCP server implements caching to improve performance and reduce API calls:
395
+
396
+ - Responses are cached based on the query parameters
397
+ - Cache duration is configurable (default: 1 hour)
398
+ - You can bypass the cache by setting `ignore_cache` to `true` in your query
399
+
400
+ ### Custom Fields
401
+
402
+ You can request specific fields in your query results by using the `fields` parameter:
403
+
404
+ ```json
405
+ {
406
+ "name": "zoomeye_search",
407
+ "arguments": {
408
+ "qbase64": "app=\"Apache\"",
409
+ "fields": "ip,port,domain,service,os,country,city"
410
+ }
411
+ }
412
+ ```
413
+
414
+ ### Pagination
415
+
416
+ For queries that return many results, you can paginate through them:
417
+
418
+ ```json
419
+ {
420
+ "name": "zoomeye_search",
421
+ "arguments": {
422
+ "qbase64": "app=\"Apache\"",
423
+ "page": 2,
424
+ "pagesize": 20
425
+ }
426
+ }
427
+ ```
428
+
429
+ ## Contributing
430
+
431
+ We encourage contributions to mac-zoomeye-org to help expand and improve its functionality. Whether it's adding new related tools, enhancing existing features, or improving documentation, your input is valuable.
432
+
433
+ For examples of other MCP servers and implementation patterns, see:
434
+ https://github.com/modelcontextprotocol/servers
435
+
436
+ Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mac-zoomeye-org more robust and practical.
437
+
438
+ ## License
439
+
440
+ mac-zoomeye-org is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more information, see the LICENSE file in the project repository.