satyam-ti/url-validator-mcp-server
If you are the rightful owner of url-validator-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The URL Validator is an MCP server application designed to validate URLs using Express, TypeScript, Playwright, and OpenAI.
URL Validator
An MCP server application built with Express, TypeScript, Playwright, and OpenAI to validate URLs. This service performs comprehensive checks on URLs, involving browser interaction and AI-powered analysis.
Prerequisites
- Node.js (v18.x or higher recommended)
- npm (usually comes with Node.js)
Local Development Setup
-
Clone the repository:
git clone <repository-url> cd url-validator
(Replace
<repository-url>
with the actual URL of your repository) -
Install dependencies: This command installs all the necessary Node.js packages defined in
package.json
.npm install
-
Install Playwright browsers: Playwright requires browser binaries for its operation. This command will download them.
npx playwright install
-
Create a
.env
file: This project uses an OpenAI API key. Create a file named.env
in the root of the project and add your API key:OPENAI_API_KEY=your_openai_api_key_here
Important: Ensure
.env
is listed in your.gitignore
file to prevent committing sensitive keys. -
Build the project: Compile the TypeScript code into JavaScript, which will be placed in the
dist
directory.npm run build
Running the Application
For Development
This command uses ts-node
to run the TypeScript server directly from the src
directory. This is often used with tools that enable hot-reloading for a better development experience.
npm run dev
The server will typically start on a default port (e.g., 4000, or as specified in the application's configuration). Check the console output for the exact port.
For Production
First, ensure the project has been built (npm run build
). This command runs the compiled JavaScript version of the server from the dist
directory.
npm start
Project Structure
src/
: Contains the TypeScript source code.server.ts
: Likely the main entry point for the Express server.
dist/
: Contains the compiled JavaScript code (output ofnpm run build
).package.json
: Defines project metadata, dependencies, and scripts.tsconfig.json
: TypeScript compiler configuration..env
: (To be created by you) For environment variables like API keys..gitignore
: Specifies intentionally untracked files that Git should ignore..gitpod.yml
: Configuration for Gitpod (a cloud-based development environment).setup.sh
: This script is intended for MCP (Model Context Protocol) hive onboarding, not for general local project setup.
MCP Hive Onboarding
The setup.sh
script is specifically designed for integrating this project with the MCP hive environment. It handles dependencies, Playwright browsers, and project build steps required for that platform. For local development, please follow the "Local Development Setup" instructions above.