# 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
- **Stats:** 6 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=rocketagro/mcp-validator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Mcp Validator",
        "description": "**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.",
        "version": "0.1",
        "x-build-id": "mo51KNygvEPK1J2RQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/rocketagro~mcp-validator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-rocketagro-mcp-validator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/rocketagro~mcp-validator/runs": {
            "post": {
                "operationId": "runs-sync-rocketagro-mcp-validator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/rocketagro~mcp-validator/run-sync": {
            "post": {
                "operationId": "run-sync-rocketagro-mcp-validator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "type",
                    "auth",
                    "testCases"
                ],
                "properties": {
                    "type": {
                        "title": "Type of Stream",
                        "enum": [
                            "httpStream",
                            "stdio",
                            "sse"
                        ],
                        "type": "string",
                        "description": "Select the type of stream for processing."
                    },
                    "url": {
                        "title": "URL",
                        "type": "string",
                        "description": "The URL to process or use."
                    },
                    "options": {
                        "title": "Configuration Options",
                        "type": "object",
                        "description": "A set of configuration options for stdio."
                    },
                    "auth": {
                        "title": "Authentication Configuration",
                        "type": "object",
                        "description": "Configuration for authentication, including tokens and credentials."
                    },
                    "testCases": {
                        "title": "Test Cases",
                        "type": "array",
                        "description": "A list of test case objects."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
