forevertools-mcp 0.1.0__py3-none-any.whl
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.
- .gitignore +9 -0
- LICENSE +21 -0
- PKG-INFO +102 -0
- README.md +81 -0
- forevertools_mcp-0.1.0.dist-info/METADATA +102 -0
- forevertools_mcp-0.1.0.dist-info/RECORD +10 -0
- forevertools_mcp-0.1.0.dist-info/WHEEL +4 -0
- forevertools_mcp-0.1.0.dist-info/entry_points.txt +2 -0
- pyproject.toml +37 -0
- server.py +177 -0
.gitignore
ADDED
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ForeverTools
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
PKG-INFO
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: forevertools-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server wrapping ForeverTools APIs: schema markup, SSL inspection, WHOIS, email validation, and screenshots
|
|
5
|
+
Project-URL: Homepage, https://kiprio.com
|
|
6
|
+
Project-URL: Repository, https://github.com/ForeverTools/forevertools-mcp
|
|
7
|
+
Project-URL: Documentation, https://kiprio.com/docs
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: ai,claude,email,mcp,schema,screenshot,ssl,whois
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Requires-Dist: httpx>=0.25.0
|
|
19
|
+
Requires-Dist: mcp>=1.0.0
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# ForeverTools MCP Server
|
|
23
|
+
|
|
24
|
+
An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that gives Claude access to [ForeverTools APIs](https://kiprio.com): structured data extraction, SSL inspection, WHOIS lookup, email validation, and webpage screenshots.
|
|
25
|
+
|
|
26
|
+
## Tools
|
|
27
|
+
|
|
28
|
+
| Tool | Description |
|
|
29
|
+
|------|-------------|
|
|
30
|
+
| `schema_markup` | Generate Schema.org JSON-LD for any URL (Article, Product, FAQ, Recipe, Event, LocalBusiness, HowTo, BreadcrumbList) |
|
|
31
|
+
| `ssl_inspect` | Check SSL certificate validity, expiry, issuer, protocol, cipher, and security grade |
|
|
32
|
+
| `whois_lookup` | WHOIS registration data: registrar, dates, name servers, registrant country |
|
|
33
|
+
| `email_validate` | Validate email: syntax, MX record check, disposable domain detection |
|
|
34
|
+
| `screenshot` | Capture a webpage screenshot (returns image URL) |
|
|
35
|
+
|
|
36
|
+
## Setup
|
|
37
|
+
|
|
38
|
+
### 1. Get an API key
|
|
39
|
+
|
|
40
|
+
Sign up for a free API key at **[kiprio.com/signup](https://kiprio.com/signup)**.
|
|
41
|
+
|
|
42
|
+
Free tier: 100 requests/day per tool, no credit card required.
|
|
43
|
+
|
|
44
|
+
### 2. Configure Claude Desktop
|
|
45
|
+
|
|
46
|
+
Add to your `claude_desktop_config.json`:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"forevertools": {
|
|
52
|
+
"command": "uvx",
|
|
53
|
+
"args": ["forevertools-mcp"],
|
|
54
|
+
"env": {
|
|
55
|
+
"FOREVERTOOLS_API_KEY": "your_api_key_here"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Or install manually:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install forevertools-mcp
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Then configure with `python -m forevertools_mcp` as the command.
|
|
69
|
+
|
|
70
|
+
### 3. Configure Claude Code
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
claude mcp add forevertools -e FOREVERTOOLS_API_KEY=your_key -- uvx forevertools-mcp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Usage Examples
|
|
77
|
+
|
|
78
|
+
Once connected, Claude can use these tools automatically. Example prompts:
|
|
79
|
+
|
|
80
|
+
- *"Check the SSL certificate for example.com"*
|
|
81
|
+
- *"Generate Article schema markup for https://myblog.com/post/1"*
|
|
82
|
+
- *"Look up the WHOIS info for competitor.com"*
|
|
83
|
+
- *"Validate whether orders@company.co.uk is a real email address"*
|
|
84
|
+
- *"Take a screenshot of https://myapp.com/dashboard"*
|
|
85
|
+
|
|
86
|
+
## Development
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
git clone https://github.com/ForeverTools/forevertools-mcp
|
|
90
|
+
cd forevertools-mcp
|
|
91
|
+
pip install -e ".[dev]"
|
|
92
|
+
export FOREVERTOOLS_API_KEY=your_key
|
|
93
|
+
python server.py
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## API Reference
|
|
97
|
+
|
|
98
|
+
Full API documentation: [kiprio.com/docs](https://kiprio.com/docs)
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
MIT
|
README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# ForeverTools MCP Server
|
|
2
|
+
|
|
3
|
+
An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that gives Claude access to [ForeverTools APIs](https://kiprio.com): structured data extraction, SSL inspection, WHOIS lookup, email validation, and webpage screenshots.
|
|
4
|
+
|
|
5
|
+
## Tools
|
|
6
|
+
|
|
7
|
+
| Tool | Description |
|
|
8
|
+
|------|-------------|
|
|
9
|
+
| `schema_markup` | Generate Schema.org JSON-LD for any URL (Article, Product, FAQ, Recipe, Event, LocalBusiness, HowTo, BreadcrumbList) |
|
|
10
|
+
| `ssl_inspect` | Check SSL certificate validity, expiry, issuer, protocol, cipher, and security grade |
|
|
11
|
+
| `whois_lookup` | WHOIS registration data: registrar, dates, name servers, registrant country |
|
|
12
|
+
| `email_validate` | Validate email: syntax, MX record check, disposable domain detection |
|
|
13
|
+
| `screenshot` | Capture a webpage screenshot (returns image URL) |
|
|
14
|
+
|
|
15
|
+
## Setup
|
|
16
|
+
|
|
17
|
+
### 1. Get an API key
|
|
18
|
+
|
|
19
|
+
Sign up for a free API key at **[kiprio.com/signup](https://kiprio.com/signup)**.
|
|
20
|
+
|
|
21
|
+
Free tier: 100 requests/day per tool, no credit card required.
|
|
22
|
+
|
|
23
|
+
### 2. Configure Claude Desktop
|
|
24
|
+
|
|
25
|
+
Add to your `claude_desktop_config.json`:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"forevertools": {
|
|
31
|
+
"command": "uvx",
|
|
32
|
+
"args": ["forevertools-mcp"],
|
|
33
|
+
"env": {
|
|
34
|
+
"FOREVERTOOLS_API_KEY": "your_api_key_here"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Or install manually:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install forevertools-mcp
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then configure with `python -m forevertools_mcp` as the command.
|
|
48
|
+
|
|
49
|
+
### 3. Configure Claude Code
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
claude mcp add forevertools -e FOREVERTOOLS_API_KEY=your_key -- uvx forevertools-mcp
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Usage Examples
|
|
56
|
+
|
|
57
|
+
Once connected, Claude can use these tools automatically. Example prompts:
|
|
58
|
+
|
|
59
|
+
- *"Check the SSL certificate for example.com"*
|
|
60
|
+
- *"Generate Article schema markup for https://myblog.com/post/1"*
|
|
61
|
+
- *"Look up the WHOIS info for competitor.com"*
|
|
62
|
+
- *"Validate whether orders@company.co.uk is a real email address"*
|
|
63
|
+
- *"Take a screenshot of https://myapp.com/dashboard"*
|
|
64
|
+
|
|
65
|
+
## Development
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
git clone https://github.com/ForeverTools/forevertools-mcp
|
|
69
|
+
cd forevertools-mcp
|
|
70
|
+
pip install -e ".[dev]"
|
|
71
|
+
export FOREVERTOOLS_API_KEY=your_key
|
|
72
|
+
python server.py
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## API Reference
|
|
76
|
+
|
|
77
|
+
Full API documentation: [kiprio.com/docs](https://kiprio.com/docs)
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
MIT
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: forevertools-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server wrapping ForeverTools APIs: schema markup, SSL inspection, WHOIS, email validation, and screenshots
|
|
5
|
+
Project-URL: Homepage, https://kiprio.com
|
|
6
|
+
Project-URL: Repository, https://github.com/ForeverTools/forevertools-mcp
|
|
7
|
+
Project-URL: Documentation, https://kiprio.com/docs
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: ai,claude,email,mcp,schema,screenshot,ssl,whois
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Requires-Dist: httpx>=0.25.0
|
|
19
|
+
Requires-Dist: mcp>=1.0.0
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# ForeverTools MCP Server
|
|
23
|
+
|
|
24
|
+
An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that gives Claude access to [ForeverTools APIs](https://kiprio.com): structured data extraction, SSL inspection, WHOIS lookup, email validation, and webpage screenshots.
|
|
25
|
+
|
|
26
|
+
## Tools
|
|
27
|
+
|
|
28
|
+
| Tool | Description |
|
|
29
|
+
|------|-------------|
|
|
30
|
+
| `schema_markup` | Generate Schema.org JSON-LD for any URL (Article, Product, FAQ, Recipe, Event, LocalBusiness, HowTo, BreadcrumbList) |
|
|
31
|
+
| `ssl_inspect` | Check SSL certificate validity, expiry, issuer, protocol, cipher, and security grade |
|
|
32
|
+
| `whois_lookup` | WHOIS registration data: registrar, dates, name servers, registrant country |
|
|
33
|
+
| `email_validate` | Validate email: syntax, MX record check, disposable domain detection |
|
|
34
|
+
| `screenshot` | Capture a webpage screenshot (returns image URL) |
|
|
35
|
+
|
|
36
|
+
## Setup
|
|
37
|
+
|
|
38
|
+
### 1. Get an API key
|
|
39
|
+
|
|
40
|
+
Sign up for a free API key at **[kiprio.com/signup](https://kiprio.com/signup)**.
|
|
41
|
+
|
|
42
|
+
Free tier: 100 requests/day per tool, no credit card required.
|
|
43
|
+
|
|
44
|
+
### 2. Configure Claude Desktop
|
|
45
|
+
|
|
46
|
+
Add to your `claude_desktop_config.json`:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"forevertools": {
|
|
52
|
+
"command": "uvx",
|
|
53
|
+
"args": ["forevertools-mcp"],
|
|
54
|
+
"env": {
|
|
55
|
+
"FOREVERTOOLS_API_KEY": "your_api_key_here"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Or install manually:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install forevertools-mcp
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Then configure with `python -m forevertools_mcp` as the command.
|
|
69
|
+
|
|
70
|
+
### 3. Configure Claude Code
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
claude mcp add forevertools -e FOREVERTOOLS_API_KEY=your_key -- uvx forevertools-mcp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Usage Examples
|
|
77
|
+
|
|
78
|
+
Once connected, Claude can use these tools automatically. Example prompts:
|
|
79
|
+
|
|
80
|
+
- *"Check the SSL certificate for example.com"*
|
|
81
|
+
- *"Generate Article schema markup for https://myblog.com/post/1"*
|
|
82
|
+
- *"Look up the WHOIS info for competitor.com"*
|
|
83
|
+
- *"Validate whether orders@company.co.uk is a real email address"*
|
|
84
|
+
- *"Take a screenshot of https://myapp.com/dashboard"*
|
|
85
|
+
|
|
86
|
+
## Development
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
git clone https://github.com/ForeverTools/forevertools-mcp
|
|
90
|
+
cd forevertools-mcp
|
|
91
|
+
pip install -e ".[dev]"
|
|
92
|
+
export FOREVERTOOLS_API_KEY=your_key
|
|
93
|
+
python server.py
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## API Reference
|
|
97
|
+
|
|
98
|
+
Full API documentation: [kiprio.com/docs](https://kiprio.com/docs)
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
MIT
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
./.gitignore,sha256=FDagvulEqWnMHZkxgkRCZDOEtwDfB6_WkNbwOZTRCZM,72
|
|
2
|
+
./LICENSE,sha256=zuexm1RfSyxH1L1W1xkQBX7I8zgYjFCvGS3gQDmx8h8,1069
|
|
3
|
+
./PKG-INFO,sha256=JGP_Ujfu4QU4GxHq2tuvtups0MuLIWOih1EKFlkFS-w,3094
|
|
4
|
+
./README.md,sha256=ogqU_VDA1fDzj6TbQNjsdJggsYLxJe01azA1CwGyPeI,2216
|
|
5
|
+
./pyproject.toml,sha256=o9idkyjR4muJ4QzO2wrG9yLnqmrut7AYwdo0dzDmvgo,1074
|
|
6
|
+
./server.py,sha256=deZCMYcWgal1XMZ0k712l-TuGFCvX6EZdY6jOcD8WJs,5677
|
|
7
|
+
forevertools_mcp-0.1.0.dist-info/METADATA,sha256=JGP_Ujfu4QU4GxHq2tuvtups0MuLIWOih1EKFlkFS-w,3094
|
|
8
|
+
forevertools_mcp-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
9
|
+
forevertools_mcp-0.1.0.dist-info/entry_points.txt,sha256=f3htNxgIL9nqf6nsl82gD1nzNXWTfaVmkw3GKYVCd8M,52
|
|
10
|
+
forevertools_mcp-0.1.0.dist-info/RECORD,,
|
pyproject.toml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "forevertools-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "MCP server wrapping ForeverTools APIs: schema markup, SSL inspection, WHOIS, email validation, and screenshots"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
license-files = []
|
|
12
|
+
requires-python = ">=3.10"
|
|
13
|
+
keywords = ["mcp", "claude", "ai", "schema", "ssl", "whois", "email", "screenshot"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"mcp>=1.0.0",
|
|
25
|
+
"httpx>=0.25.0",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.scripts]
|
|
29
|
+
forevertools-mcp = "server:mcp.run"
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://kiprio.com"
|
|
33
|
+
Repository = "https://github.com/ForeverTools/forevertools-mcp"
|
|
34
|
+
Documentation = "https://kiprio.com/docs"
|
|
35
|
+
|
|
36
|
+
[tool.hatch.build.targets.wheel]
|
|
37
|
+
packages = ["."]
|
server.py
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"""ForeverTools MCP Server — wraps kiprio.com API endpoints for Claude."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import json
|
|
5
|
+
import httpx
|
|
6
|
+
from mcp.server.fastmcp import FastMCP
|
|
7
|
+
|
|
8
|
+
BASE_URL = "https://kiprio.com/v1"
|
|
9
|
+
|
|
10
|
+
mcp = FastMCP(
|
|
11
|
+
"ForeverTools",
|
|
12
|
+
instructions="Structured data extraction, SSL inspection, WHOIS lookup, email validation, and screenshot tools powered by kiprio.com",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _api_key() -> str:
|
|
17
|
+
key = os.environ.get("FOREVERTOOLS_API_KEY", "")
|
|
18
|
+
if not key:
|
|
19
|
+
raise ValueError(
|
|
20
|
+
"FOREVERTOOLS_API_KEY not set. Get a free key at https://kiprio.com/signup"
|
|
21
|
+
)
|
|
22
|
+
return key
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _headers() -> dict:
|
|
26
|
+
return {"X-API-Key": _api_key(), "Accept": "application/json"}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@mcp.tool()
|
|
30
|
+
async def schema_markup(url: str, schema_type: str = "Article") -> str:
|
|
31
|
+
"""Generate Schema.org structured data (JSON-LD) for a URL.
|
|
32
|
+
|
|
33
|
+
Supported types: Article, Product, FAQ, Recipe, Event, LocalBusiness, HowTo, BreadcrumbList.
|
|
34
|
+
Returns the JSON-LD script tag ready to embed in HTML, plus the raw schema object.
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
url: The page URL to generate schema markup for.
|
|
38
|
+
schema_type: Schema.org type. Defaults to "Article".
|
|
39
|
+
"""
|
|
40
|
+
valid_types = ["Article", "Product", "FAQ", "Recipe", "Event", "LocalBusiness", "HowTo", "BreadcrumbList"]
|
|
41
|
+
if schema_type not in valid_types:
|
|
42
|
+
return json.dumps({"error": f"schema_type must be one of: {', '.join(valid_types)}"})
|
|
43
|
+
|
|
44
|
+
async with httpx.AsyncClient(timeout=15) as client:
|
|
45
|
+
resp = await client.post(
|
|
46
|
+
f"{BASE_URL}/schema/generate",
|
|
47
|
+
headers=_headers(),
|
|
48
|
+
json={"url": url, "type": schema_type},
|
|
49
|
+
)
|
|
50
|
+
data = resp.json()
|
|
51
|
+
|
|
52
|
+
if not data.get("ok"):
|
|
53
|
+
return json.dumps({"error": data.get("error", "Unknown error"), "url": url})
|
|
54
|
+
|
|
55
|
+
return json.dumps({
|
|
56
|
+
"url": url,
|
|
57
|
+
"type": schema_type,
|
|
58
|
+
"schema": data.get("schema"),
|
|
59
|
+
"json_ld": data.get("json_ld"),
|
|
60
|
+
}, indent=2)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@mcp.tool()
|
|
64
|
+
async def ssl_inspect(domain: str) -> str:
|
|
65
|
+
"""Inspect a domain's SSL/TLS certificate details.
|
|
66
|
+
|
|
67
|
+
Returns certificate validity, expiry date, days remaining, issuer, SANs,
|
|
68
|
+
protocol version, cipher suite, and security grade.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
domain: Domain to inspect (e.g. "example.com"). Strips https:// if present.
|
|
72
|
+
"""
|
|
73
|
+
domain = domain.strip().lower().removeprefix("https://").removeprefix("http://").split("/")[0]
|
|
74
|
+
|
|
75
|
+
async with httpx.AsyncClient(timeout=15) as client:
|
|
76
|
+
resp = await client.get(
|
|
77
|
+
f"{BASE_URL}/ssl",
|
|
78
|
+
headers=_headers(),
|
|
79
|
+
params={"domain": domain},
|
|
80
|
+
)
|
|
81
|
+
data = resp.json()
|
|
82
|
+
|
|
83
|
+
if "error" in data:
|
|
84
|
+
return json.dumps({"error": data["error"], "domain": domain})
|
|
85
|
+
|
|
86
|
+
return json.dumps({
|
|
87
|
+
"domain": data.get("domain", domain),
|
|
88
|
+
"valid": data.get("valid"),
|
|
89
|
+
"expires_at": data.get("expires_at"),
|
|
90
|
+
"days_remaining": data.get("days_remaining"),
|
|
91
|
+
"issuer": data.get("issuer"),
|
|
92
|
+
"subject": data.get("subject"),
|
|
93
|
+
"sans": data.get("sans", []),
|
|
94
|
+
"protocol": data.get("protocol"),
|
|
95
|
+
"cipher": data.get("cipher"),
|
|
96
|
+
"grade": data.get("grade"),
|
|
97
|
+
}, indent=2)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@mcp.tool()
|
|
101
|
+
async def whois_lookup(domain: str) -> str:
|
|
102
|
+
"""Look up WHOIS registration data for a domain.
|
|
103
|
+
|
|
104
|
+
Returns registrar, registration date, expiry date, name servers,
|
|
105
|
+
registrant country, and DNSSEC status.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
domain: Domain to look up (e.g. "example.com").
|
|
109
|
+
"""
|
|
110
|
+
domain = domain.strip().lower().removeprefix("https://").removeprefix("http://").split("/")[0]
|
|
111
|
+
|
|
112
|
+
async with httpx.AsyncClient(timeout=20, follow_redirects=True) as client:
|
|
113
|
+
resp = await client.get(
|
|
114
|
+
f"{BASE_URL}/whois",
|
|
115
|
+
headers=_headers(),
|
|
116
|
+
params={"domain": domain},
|
|
117
|
+
)
|
|
118
|
+
data = resp.json()
|
|
119
|
+
|
|
120
|
+
if "error" in data:
|
|
121
|
+
return json.dumps({"error": data["error"], "domain": domain})
|
|
122
|
+
|
|
123
|
+
return json.dumps(data, indent=2)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@mcp.tool()
|
|
127
|
+
async def email_validate(email: str) -> str:
|
|
128
|
+
"""Validate an email address: syntax, MX records, and disposable domain check.
|
|
129
|
+
|
|
130
|
+
Returns whether the email is valid, has working MX records, is from a
|
|
131
|
+
disposable/temporary domain, and a recommendation (accept/reject/review).
|
|
132
|
+
|
|
133
|
+
Args:
|
|
134
|
+
email: Email address to validate (e.g. "user@example.com").
|
|
135
|
+
"""
|
|
136
|
+
async with httpx.AsyncClient(timeout=15, follow_redirects=True) as client:
|
|
137
|
+
resp = await client.get(
|
|
138
|
+
f"{BASE_URL}/email-validate",
|
|
139
|
+
headers=_headers(),
|
|
140
|
+
params={"email": email},
|
|
141
|
+
)
|
|
142
|
+
data = resp.json()
|
|
143
|
+
|
|
144
|
+
if "error" in data:
|
|
145
|
+
return json.dumps({"error": data["error"], "email": email})
|
|
146
|
+
|
|
147
|
+
return json.dumps(data, indent=2)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
@mcp.tool()
|
|
151
|
+
async def screenshot(url: str, width: int = 1280, height: int = 800) -> str:
|
|
152
|
+
"""Capture a screenshot of a webpage and return the image URL.
|
|
153
|
+
|
|
154
|
+
Renders the page at the specified viewport size using a headless browser.
|
|
155
|
+
Returns a URL to the screenshot image (PNG, hosted temporarily).
|
|
156
|
+
|
|
157
|
+
Args:
|
|
158
|
+
url: The webpage URL to screenshot.
|
|
159
|
+
width: Viewport width in pixels. Defaults to 1280.
|
|
160
|
+
height: Viewport height in pixels. Defaults to 800.
|
|
161
|
+
"""
|
|
162
|
+
async with httpx.AsyncClient(timeout=30, follow_redirects=True) as client:
|
|
163
|
+
resp = await client.get(
|
|
164
|
+
f"{BASE_URL}/screenshot",
|
|
165
|
+
headers=_headers(),
|
|
166
|
+
params={"url": url, "width": width, "height": height},
|
|
167
|
+
)
|
|
168
|
+
data = resp.json()
|
|
169
|
+
|
|
170
|
+
if "error" in data:
|
|
171
|
+
return json.dumps({"error": data["error"], "url": url})
|
|
172
|
+
|
|
173
|
+
return json.dumps(data, indent=2)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
if __name__ == "__main__":
|
|
177
|
+
mcp.run()
|