# Mcp Validator (`rocketagro/mcp-validator`) Actor

**MCP Validator** is a professional validation and compliance testing tool for [Model Context Protocol (MCP)](https://modelcontextprotocol.io) servers. It ensures your MCP server’s **tools, resources, prompts, and templates** are correct, compliant, and production-ready.

- **URL**: https://apify.com/rocketagro/mcp-validator.md
- **Developed by:** [Jahid Hasan](https://apify.com/rocketagro) (community)
- **Categories:** Automation, Developer tools, MCP servers
- **Features:** Full permissions
- **Stats:** 8 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## MCP Validator

**MCP Validator** is a professional validation and compliance testing tool for [Model Context Protocol (MCP)](https://modelcontextprotocol.io) servers.\
It ensures your MCP server’s **tools, resources, prompts, and templates** are correct, compliant, and production-ready.

✅ Run it directly on [Apify](https://apify.com) – no setup, no infrastructure.\
✅ Get **structured validation reports** you can share with your team or integrate into workflows.\
✅ Catch schema errors, protocol issues, and performance bottlenecks before they hit production.

***

### 🚀 Why Choose MCP Validator?

If you’re building an MCP server, you need confidence that it:

- Correctly exposes **tools**, **resources**, **prompts**, and **templates**.
- Accepts valid inputs and rejects invalid ones with proper errors.
- Returns data in the **right schema format** every time.
- Stays reliable and responsive in production environments.

👉 **MCP Validator does all this for you automatically.**\
No manual testing. No guesswork. Just clear reports you can trust.

***

### ✨ Key Features

- 🔍 **Automatic Discovery** – connect to your MCP server and fetch all exposed tools, resources, and prompts.
- 🛠 **Tool Validation** – validate input/output schemas, run sample calls, and verify error handling.
- 📚 **Resource Validation** (...upcoming) – test resource reads, pagination, and schema compliance.
- 📝 **Prompt & Template Checks** (...upcoming) – validate placeholders, substitutions, and template structure.
- 📊 **Structured Reports** – detailed JSON/CSV outputs for compliance or CI/CD use.

***

The scraped data in this template are page headings but you can easily edit the code to scrape whatever you want from the page.

### 📊 MCP Server Config Example

sse server

```json
{
  "type": "sse",
  "url": "https://mcp.api.coingecko.com/sse"
}
```

mcp server

```json
{
  "type": "httpStream",
  "url": "http://mcp.api.coingecko.com"
}
```

stdio server

```json
{
  "type": "stdio",
  "options": {
    "command": "python3",
    "args": ["app.py", "--port", 8080],
    "env": {
      "LOG_LEVEL": "info",
      "API_KEY": "my_secret_key"
    }
  }
}
```

### 📊 Auth Setup

no auth setup

```json
{
  "auth": {
    "type": "none"
  }
}
```

basic auth setup

```json
{
  "auth": {
    "type": "basic",
    "username": "basic_auth_user",
    "password": "basic_auth_password"
  }
}
```

Bearar api_token auth setup

```json
{
  "auth": {
    "type": "token",
    "token": "huze_api_token"
  }
}
```

### 📊 Test Tool Calls

no schema validation

```json
{
  "testCases": [
    {
      "name": "get_new_coins_list",
      "arguments": {},
      "actions": {
        "validate_input_schema": false,
        "validate_output_schema": false,
        "match_output_data": false
      }
    }
  ]
}
```

input and output schema validation

```json
{
  "testCases": [
    {
      "name": "get_new_coins_list",
      "arguments": {},
      "actions": {
        "validate_input_schema": true,
        "validate_output_schema": true,
        "match_output_data": false
      },
      "input_schema": {},
      "output_schema": {}
    }
  ]
}
```

output object matcher

```json
{
  "testCases": [
    {
      "name": "get_new_coins_list",
      "arguments": {},
      "actions": {
        "validate_input_schema": false,
        "validate_output_schema": false,
        "match_output_data": true
      },
      "expected_output": {}
    }
  ]
}
```

### 📊 Example Report Output

```js
{
  metadata: {
    validator_version: 'v0.1',
    timestamp: '2025-10-06T14:39:24.164Z',
    server_type: 'sse',
    server_url: 'https://mcp.api.coingecko.com/sse',
    latency: 118,
    overall_status: 'PASS'
  },
  summary: {
    total_tools: 46,
    total_resources: 0,
    total_prompts: 0,
    total_templates: 0,
    warnings: 0,
    passed: 0,
    failed: 0
  },
  lists: {
    tools: [
      'get_asset_platforms',
      'get_id_coins',
      'get_list_coins_categories',
      'get_new_coins_list',
      'get_coins_markets',
      'get_coins_top_gainers_losers'
    ],
    resources: [],
    prompts: [],
    templates: []
  },
  tools: [
    {
      name: 'translate_text',
      status: 'PASS',
      schema_validation: [Object],
      test_cases: [Object],
      errors: {}
    }
  ],
  errors: []
}
```

***

### ⚡ How It Works

- **Deploy MCP Validator** from [Apify Marketplace](https://apify.com/)
- **Provide your MCP server URL and optional test cases**.
- The validator connects, discovers tools/resources/prompts, and runs validation checks.
- Get a **structured report** (JSON/CSV/text) with pass/fail results.

***

### 💡 Use Cases

- ✅ **Developers** – catch schema errors before deployment.
- ✅ **QA Teams** – validate compliance across staging & production.
- ✅ **Enterprises** – ensure reliable MCP integrations at scale.
- ✅ **Audits & Compliance** – provide proof your server matches MCP spec.

***

### 🛠 Plans & Availability

- **Flat $10/Month Coffee Bill** → Run ad-hoc validations, view JSON/CSV reports.
  Available exclusively on [Apify Marketplace](https://apify.com/).

***

### 📞 Support

Need help or a custom feature?
📧 Contact us at [support@mcp-validator.com](mailto://support@mcp-validator.com) (or via Apify support).

# Actor input Schema

## `type` (type: `string`):

Select the type of stream for processing.

## `url` (type: `string`):

The URL to process or use.

## `options` (type: `object`):

A set of configuration options for stdio.

## `auth` (type: `object`):

Configuration for authentication, including tokens and credentials.

## `testCases` (type: `array`):

A list of test case objects.

## Actor input object example

```json
{
  "type": "sse",
  "url": "https://mcp.api.coingecko.com/sse",
  "options": {
    "command": "python3",
    "args": [
      "app.py",
      "--port",
      8080
    ],
    "env": {
      "LOG_LEVEL": "info",
      "API_KEY": "my_secret_key"
    }
  },
  "auth": {
    "type": "none",
    "token": "server_token_123",
    "username": "server_user",
    "password": "server_pass",
    "headers": {
      "Authorization": "Bearer ${token}",
      "X-API-Key": "token"
    }
  },
  "testCases": [
    {
      "name": "get_new_coins_list",
      "arguments": {},
      "actions": {
        "validate_input_schema": false,
        "validate_output_schema": false,
        "match_output_data": false
      },
      "input_schema": {},
      "output_schema": {},
      "expected_output": {}
    }
  ]
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "type": "sse",
    "url": "https://mcp.api.coingecko.com/sse",
    "options": {
        "command": "python3",
        "args": [
            "app.py",
            "--port",
            8080
        ],
        "env": {
            "LOG_LEVEL": "info",
            "API_KEY": "my_secret_key"
        }
    },
    "auth": {
        "type": "none",
        "token": "server_token_123",
        "username": "server_user",
        "password": "server_pass",
        "headers": {
            "Authorization": "Bearer ${token}",
            "X-API-Key": "token"
        }
    },
    "testCases": [
        {
            "name": "get_new_coins_list",
            "arguments": {},
            "actions": {
                "validate_input_schema": false,
                "validate_output_schema": false,
                "match_output_data": false
            },
            "input_schema": {},
            "output_schema": {},
            "expected_output": {}
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rocketagro/mcp-validator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "type": "sse",
    "url": "https://mcp.api.coingecko.com/sse",
    "options": {
        "command": "python3",
        "args": [
            "app.py",
            "--port",
            8080,
        ],
        "env": {
            "LOG_LEVEL": "info",
            "API_KEY": "my_secret_key",
        },
    },
    "auth": {
        "type": "none",
        "token": "server_token_123",
        "username": "server_user",
        "password": "server_pass",
        "headers": {
            "Authorization": "Bearer ${token}",
            "X-API-Key": "token",
        },
    },
    "testCases": [{
            "name": "get_new_coins_list",
            "arguments": {},
            "actions": {
                "validate_input_schema": False,
                "validate_output_schema": False,
                "match_output_data": False,
            },
            "input_schema": {},
            "output_schema": {},
            "expected_output": {},
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("rocketagro/mcp-validator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "type": "sse",
  "url": "https://mcp.api.coingecko.com/sse",
  "options": {
    "command": "python3",
    "args": [
      "app.py",
      "--port",
      8080
    ],
    "env": {
      "LOG_LEVEL": "info",
      "API_KEY": "my_secret_key"
    }
  },
  "auth": {
    "type": "none",
    "token": "server_token_123",
    "username": "server_user",
    "password": "server_pass",
    "headers": {
      "Authorization": "Bearer ${token}",
      "X-API-Key": "token"
    }
  },
  "testCases": [
    {
      "name": "get_new_coins_list",
      "arguments": {},
      "actions": {
        "validate_input_schema": false,
        "validate_output_schema": false,
        "match_output_data": false
      },
      "input_schema": {},
      "output_schema": {},
      "expected_output": {}
    }
  ]
}' |
apify call rocketagro/mcp-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rocketagro/mcp-validator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wqwtAZkQdJMXbgPWs/builds/mo51KNygvEPK1J2RQ/openapi.json
