Content
# Simple MCP Random Integer Generator
This is a simple Model Context Protocol (MCP) server that provides a random integer generation tool for AI assistants to call.
## Features
- **GenerateRandomInteger**: Generates a random integer between specified minimum and maximum values (inclusive)
- Default range: 1 to 100
- Customizable min and max values
## How to Run
1. Make sure you have .NET 8.0 SDK installed
2. Restore packages:
```bash
dotnet restore
```
3. Run the MCP server:
```bash
dotnet run
```
## Tool Description
The server exposes one tool:
- **Name**: `GenerateRandomInteger`
- **Description**: Generates a random integer between the specified minimum and maximum values (inclusive)
- **Parameters**:
- `minValue` (int, optional): The minimum value for the random integer (default: 1)
- `maxValue` (int, optional): The maximum value for the random integer (default: 100)
## Usage with AI Assistants
This MCP server can be connected to AI assistants like Claude Desktop or other MCP-compatible clients. The AI can then call the `GenerateRandomInteger` tool to generate random numbers as needed.
## Example Tool Call
When an AI calls this tool, it might look like:
```json
{
"name": "GenerateRandomInteger",
"arguments": {
"minValue": 10,
"maxValue": 50
}
}
```
This would generate a random integer between 10 and 50 (inclusive).