@whoisxmlapidotcom/mcp-whoisxmlapi 1.0.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 +157 -0
- package/index.js +11 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# MCP Server `mcp-whoisxmlapi`
|
|
2
|
+
|
|
3
|
+
`mcp-whoisxmlapi` is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that provides AI tools access to the WhoisXMLAPI in a secure and scalable way.
|
|
4
|
+
|
|
5
|
+
For full documentation, see [the MCP Server documentation](https://mcp-whoisxmlapi.pages.dev/).
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Token-based Authentication**: Secure API access using bearer tokens configured via environment variables
|
|
10
|
+
- **SSE Support**: Run as an HTTP server with Server-Sent Events (SSE) for web-based integrations
|
|
11
|
+
- **Timeout Control**: Configurable request timeouts
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
### Option 1: Docker (Recommended)
|
|
16
|
+
|
|
17
|
+
You can run `mcp-whoisxmlapi` directly with Docker without installing the binary:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"whoisxmlapi": {
|
|
23
|
+
"command": "docker",
|
|
24
|
+
"args": [
|
|
25
|
+
"run",
|
|
26
|
+
"-i",
|
|
27
|
+
"--rm",
|
|
28
|
+
"-e", "WHOISXMLAPI_TOKEN",
|
|
29
|
+
"whoisxmlapidotcom/mcp-whoisxmlapi:latest"
|
|
30
|
+
// Add custom options if needed:
|
|
31
|
+
// "--timeout=30s"
|
|
32
|
+
],
|
|
33
|
+
"env": {
|
|
34
|
+
"WHOISXMLAPI_TOKEN": "your-api-token-here"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Option 2: npm
|
|
42
|
+
|
|
43
|
+
Install via npm for convenience:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Install globally
|
|
47
|
+
npm install -g @whoisxmlapidotcom/mcp-whoisxmlapi
|
|
48
|
+
|
|
49
|
+
# Or install locally in your project
|
|
50
|
+
npm install @whoisxmlapidotcom/mcp-whoisxmlapi
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
#### Editor Configuration with npm
|
|
54
|
+
|
|
55
|
+
If installed globally via npm:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"whoisxmlapi": {
|
|
61
|
+
"command": "mcp-whoisxmlapi",
|
|
62
|
+
"args": [
|
|
63
|
+
// Uncomment and modify as needed:
|
|
64
|
+
// "--timeout=30s"
|
|
65
|
+
],
|
|
66
|
+
"env": {
|
|
67
|
+
"WHOISXMLAPI_TOKEN": "your-api-token-here"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If installed locally in a project:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"mcpServers": {
|
|
79
|
+
"whoisxmlapi": {
|
|
80
|
+
"command": "npx",
|
|
81
|
+
"args": [
|
|
82
|
+
"@whoisxmlapidotcom/mcp-whoisxmlapi"
|
|
83
|
+
// Add custom options if needed:
|
|
84
|
+
// "--timeout=30s"
|
|
85
|
+
],
|
|
86
|
+
"env": {
|
|
87
|
+
"WHOISXMLAPI_TOKEN": "your-api-token-here"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Option 3: Binary Download
|
|
95
|
+
|
|
96
|
+
You can also download the appropriate binary for your operating system from the [Downloads](https://mcp-whoisxmlapi.pages.dev/downloads) page and provide the full path to the binary (e.g., `/path/to/mcp-whoisxmlapi`) in your editor configuration.
|
|
97
|
+
|
|
98
|
+
### Docker
|
|
99
|
+
|
|
100
|
+
The MCP server is available as a Docker image using `stdio` to communicate:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
docker pull whoisxmlapidotcom/mcp-whoisxmlapi:latest
|
|
104
|
+
docker run --rm -e WHOISXMLAPI_TOKEN=your-token whoisxmlapidotcom/mcp-whoisxmlapi:latest
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
For SSE mode with Docker, expose the SSE port (default `3000`):
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
docker run --rm -p 3000:3000 -e WHOISXMLAPI_TOKEN=your-token whoisxmlapidotcom/mcp-whoisxmlapi:latest --sse --sse-port 3000
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The configuration for SSE mode changes slightly in your editor's settings -- and note you'll need to run the Docker container in SSE mode for this to work prior to adding the configuration to your editor's or AI client settings:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": {
|
|
118
|
+
"whoisxmlapi": {
|
|
119
|
+
"url": "http://localhost:3000"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Do note that some MCP Clients will not support non-HTTPS endpoints.
|
|
126
|
+
|
|
127
|
+
With this configuration you can use the same MCP server for multiple AI clients at once: normally, AI clients will create multiple instances of an MCP server.
|
|
128
|
+
|
|
129
|
+
## Environment Variables
|
|
130
|
+
|
|
131
|
+
- `WHOISXMLAPI_TOKEN`: Required. The API token for authenticating with the WhoisXMLAPI service.
|
|
132
|
+
|
|
133
|
+
## Running Modes
|
|
134
|
+
|
|
135
|
+
### Standard (stdio) Mode
|
|
136
|
+
|
|
137
|
+
By default, `mcp-whoisxmlapi` runs in stdio mode, which is suitable for integration with editors and other tools that communicate via standard input/output.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
export WHOISXMLAPI_TOKEN=your-token-here
|
|
141
|
+
mcp-whoisxmlapi
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Server-Sent Events (SSE) Mode
|
|
145
|
+
|
|
146
|
+
Alternatively, you can run `mcp-whoisxmlapi` as an HTTP server with SSE support for web-based integrations:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
export WHOISXMLAPI_TOKEN=your-token-here
|
|
150
|
+
mcp-whoisxmlapi --sse --sse-port=3000
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
In SSE mode, the server will listen on the specified port (default: 3000) and provide the same MCP tools over HTTP using Server-Sent Events. This is useful for web applications or environments where stdio communication isn't practical.
|
|
154
|
+
|
|
155
|
+
**Available SSE Options:**
|
|
156
|
+
- `--sse`: Enable SSE server mode
|
|
157
|
+
- `--sse-port=PORT`: Specify the port to listen on (default: 3000)
|
package/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const child_process = require('child_process');
|
|
4
|
+
const mapping = { linux_arm: [ '@whoisxmlapidotcom', 'mcp-whoisxmlapi_linux_arm', 'mcp-whoisxmlapi' ], linux_x64: [ '@whoisxmlapidotcom', 'mcp-whoisxmlapi_linux_amd64', 'mcp-whoisxmlapi' ], linux_arm64: [ '@whoisxmlapidotcom', 'mcp-whoisxmlapi_linux_arm64', 'mcp-whoisxmlapi' ], win32_x64: [ '@whoisxmlapidotcom', 'mcp-whoisxmlapi_windows_amd64', 'mcp-whoisxmlapi.exe' ], win32_arm: [ '@whoisxmlapidotcom', 'mcp-whoisxmlapi_windows_arm', 'mcp-whoisxmlapi.exe' ], win32_arm64: [ '@whoisxmlapidotcom', 'mcp-whoisxmlapi_windows_arm64', 'mcp-whoisxmlapi.exe' ], darwin_x64: [ '@whoisxmlapidotcom', 'mcp-whoisxmlapi_darwin_amd64', 'mcp-whoisxmlapi' ], darwin_arm64: [ '@whoisxmlapidotcom', 'mcp-whoisxmlapi_darwin_arm64', 'mcp-whoisxmlapi' ] };
|
|
5
|
+
const modulesDirectory = path.dirname(path.dirname(__dirname));
|
|
6
|
+
const definition = mapping[process.platform + '_' + process.arch];
|
|
7
|
+
const packagePath = path.join(modulesDirectory, ...definition);
|
|
8
|
+
child_process.spawn(packagePath, process.argv.splice(2), {
|
|
9
|
+
stdio: 'inherit',
|
|
10
|
+
env: process.env,
|
|
11
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@whoisxmlapidotcom/mcp-whoisxmlapi",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"bin": {
|
|
5
|
+
"mcp-whoisxmlapi": "index.js"
|
|
6
|
+
},
|
|
7
|
+
"optionalDependencies": {
|
|
8
|
+
"@whoisxmlapidotcom/mcp-whoisxmlapi_linux_arm": "1.0.0",
|
|
9
|
+
"@whoisxmlapidotcom/mcp-whoisxmlapi_linux_amd64": "1.0.0",
|
|
10
|
+
"@whoisxmlapidotcom/mcp-whoisxmlapi_linux_arm64": "1.0.0",
|
|
11
|
+
"@whoisxmlapidotcom/mcp-whoisxmlapi_windows_amd64": "1.0.0",
|
|
12
|
+
"@whoisxmlapidotcom/mcp-whoisxmlapi_windows_arm": "1.0.0",
|
|
13
|
+
"@whoisxmlapidotcom/mcp-whoisxmlapi_windows_arm64": "1.0.0",
|
|
14
|
+
"@whoisxmlapidotcom/mcp-whoisxmlapi_darwin_amd64": "1.0.0",
|
|
15
|
+
"@whoisxmlapidotcom/mcp-whoisxmlapi_darwin_arm64": "1.0.0"
|
|
16
|
+
},
|
|
17
|
+
"os": [
|
|
18
|
+
"linux",
|
|
19
|
+
"win32",
|
|
20
|
+
"darwin"
|
|
21
|
+
],
|
|
22
|
+
"cpu": [
|
|
23
|
+
"arm",
|
|
24
|
+
"x64",
|
|
25
|
+
"arm64"
|
|
26
|
+
],
|
|
27
|
+
"files": [
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
30
|
+
"keywords": [
|
|
31
|
+
"mcp",
|
|
32
|
+
"mcp-server",
|
|
33
|
+
"whoisxmlapi",
|
|
34
|
+
"whois",
|
|
35
|
+
"reverse-dns",
|
|
36
|
+
"reverse-whois",
|
|
37
|
+
"ip-geolocation",
|
|
38
|
+
"ip-whois",
|
|
39
|
+
"domain-whois",
|
|
40
|
+
"domain-availability",
|
|
41
|
+
"domain-search",
|
|
42
|
+
"domain-status"
|
|
43
|
+
],
|
|
44
|
+
"description": "A MCP server for the WhoisXML API"
|
|
45
|
+
}
|