MCP Server for checking domain name availability using WHOIS and DNS.
Project description
FastDomainCheck MCP Server (Python)
This is a domain availability check server implemented using Python and the Model Context Protocol (MCP). It provides MCP Tools to check if single or multiple domain names are already registered.
This project aims to provide the same functionality as the Go language implementation located in the go-version directory.
Features
- Check domain registration status via MCP Tool interface.
- Supports checking single domains.
- Supports batch checking multiple domains.
- Uses the
python-whoislibrary for WHOIS lookups andsocketfor DNS lookups as a fallback/confirmation.
Dependencies
- Python 3.8+
mcp[cli](Model Context Protocol SDK and command-line tool)python-whois(For performing WHOIS queries)
Installation
It is recommended to use a Python virtual environment.
-
Clone the repository (if you haven't already):
git clone <your-repo-url> cd FastDomainCheck-MCP-Server-python
-
Create and activate a virtual environment (recommended):
python -m venv venv source venv/bin/activate # Linux/macOS # venv\Scripts\activate # Windows
-
Install dependencies (using uv or pip): Using uv:
# Ensure uv is installed: pip install uv uv pip install -r requirements.txt # Or, if you don't have requirements.txt yet, add individually: # uv pip install "mcp[cli]" python-whois
Using pip:
pip install -r requirements.txt # Or, if you don't have requirements.txt yet, add individually: # pip install "mcp[cli]" python-whois
(Generate
requirements.txtusinguv pip freeze > requirements.txtorpip freeze > requirements.txtafter installing dependencies)
Running the Server
There are multiple ways to run the server:
-
Using the MCP Runner (Recommended for development):
mcp run server.py
-
Directly using Python (if uvicorn is installed):
python server.py -
Using the installed script (After installing the package): First, install the package locally:
# Using uv uv pip install . # Or using pip # pip install .
Then, run the command:
fastdomaincheck-server
-
Using
uvx(Executes the package in an isolated environment):uvx fastdomaincheck-mcp-server
The server will listen for MCP connections on http://127.0.0.1:8000 by default when run with uvicorn (methods 2, 3, 4).
Usage (MCP Tools)
When the server is running, MCP-compatible clients can connect and invoke the following tools:
1. check_domain
Checks the availability of a single domain.
- Arguments:
domain(str): The domain name to check (e.g., "google.com").
- Returns: (str)
"available": The domain is available for registration."registered": The domain is already registered."error: <reason>": An error occurred during the query.
2. check_domains
Checks the availability of multiple domains in batch.
- Arguments:
domains(list[str]): A list of domain names to check (e.g.,["google.com", "availabledomain123.org"]).
- Returns: (dict[str, str])
- A dictionary where keys are domain names and values are their status (
"available","registered", or"error: <reason>"). - Example:
{"google.com": "registered", "availabledomain123.org": "available"}
- A dictionary where keys are domain names and values are their status (
Running Tests
To run the unit tests, execute the following command in the project root directory:
python -m unittest discover tests
Or run the specific test file:
python -m unittest tests/test_checker.py
Go Version Reference
This project's functionality is intended to match the Go language implementation located in the go-version directory.
Contributing
Feel free to open issues or submit pull requests.
License
MIT License (You should add a LICENSE file, typically containing the MIT license text)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastdomaincheck_mcp_server-0.1.0.tar.gz.
File metadata
- Download URL: fastdomaincheck_mcp_server-0.1.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec0325defc83443ff25ce6d34a4790b1feea776e4842bba55a762cd99dc0f8b5
|
|
| MD5 |
20af70380880d2f01e8a3b72ea4f58b6
|
|
| BLAKE2b-256 |
179e9b80471543d4e20c5835c3e46147f1bf53cf070886ebb05ba73ed8808f49
|
File details
Details for the file fastdomaincheck_mcp_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fastdomaincheck_mcp_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e9b106869d91a8d7a5fe6f2bf13a2c78aec530069b9d479c160ad2fa9a50220
|
|
| MD5 |
f770f92d3f299ac064b17c63aa0480ab
|
|
| BLAKE2b-256 |
5e4c243070a684285778cb6a62f17f5b5b70651488371caad7a360252741882b
|