- Home
- MCP servers
- Random Value
Random Value
- typescript
0
GitHub Stars
typescript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
This MCP server generates random values on demand, offering random numbers within a specified range and random alphanumeric strings of a chosen length. It follows the Model Context Protocol (MCP) to provide reliable, well-structured responses and robust input validation, making it a practical tool for testing, simulations, and placeholder data generation.
How to use
You connect to this MCP server using an MCP client and request the available tools to generate random data. Use the two tools to obtain a random number or a random string, passing the appropriate parameters.
How to install
Prerequisites you need before installing:
-
Install Node.js (version 14 or later) on your machine.
-
Ensure you have npm available.
-
Clone the project repository to your development environment.
-
Install dependencies.
-
Build the project.
-
Start the MCP server.
Configuration and usage notes
MCP servers for this project are run locally using a standard input/output (stdio) configuration. The server can be started by running the JavaScript entry once built.
Example of an MCP client configuration to connect to the local stdio MCP server:
{
"mcpServers": {
"random_value": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/absolute/path/to/random-value-mcp-server"
}
}
}
Available tools
generate_random_number
Generates a random integer within a specified inclusive range using parameters min and max. Validates that min <= max and returns a single integer.
generate_random_string
Generates a random alphanumeric string of a specified length using characters A-Z, a-z, and 0-9. Validates that length is at least 1 and returns the string.