{"_id":"pluggedin-random-number-generator-mcp","name":"pluggedin-random-number-generator-mcp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"pluggedin-random-number-generator-mcp","version":"1.0.0","description":"A state-of-the-art cryptographically secure random number generator MCP server","main":"dist/index.js","bin":{"pluggedin-random-number-generator-mcp":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","dev":"ts-node src/index.ts","test":"node test.js","prepare":"npm run build","prepublishOnly":"npm test && npm run build","build:dxt":"node scripts/build-dxt.js","inspector":"npx @modelcontextprotocol/inspector dist/index.js","docker:build":"docker build -t pluggedin-random-number-generator-mcp:latest .","docker:build:alpine":"docker build -f Dockerfile.alpine -t pluggedin-random-number-generator-mcp:alpine .","docker:run":"docker run --rm -i pluggedin-random-number-generator-mcp:latest","docker:test":"docker run --rm pluggedin-random-number-generator-mcp:latest node test.js","version:patch":"npm version patch","version:minor":"npm version minor","version:major":"npm version major","publish:npm":"npm publish --access public","release:patch":"npm run version:patch && npm run publish:npm && git push --follow-tags","release:minor":"npm run version:minor && npm run publish:npm && git push --follow-tags","release:major":"npm run version:major && npm run publish:npm && git push --follow-tags"},"keywords":["mcp","model-context-protocol","random","cryptography","rng","prng","csprng","ai","llm"],"author":{"name":"VeriTeknik"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"devDependencies":{"@types/node":"^22.0.0","ts-node":"^10.9.0","typescript":"^5.0.0"},"engines":{"node":">=18.0.0"},"repository":{"type":"git","url":"git+https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp.git"},"bugs":{"url":"https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp/issues"},"homepage":"https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp#readme","_id":"pluggedin-random-number-generator-mcp@1.0.0","gitHead":"a44fb7c74d58850f9e1bbf25d457164a6a2a97e9","types":"./dist/index.d.ts","_nodeVersion":"23.9.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-qikN6EMkbj6svdAfYyZa9PHiXNsBR3Kk2gw+e34Nauws2bC4nkqaf+jFHw1mIpJYAhjQYMS4lfyXHX23+1GquQ==","shasum":"3b2c1f8088462a32f0d92221358604850d5eddaf","tarball":"https://registry.npmjs.org/pluggedin-random-number-generator-mcp/-/pluggedin-random-number-generator-mcp-1.0.0.tgz","fileCount":9,"unpackedSize":62306,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDn8aiBJeufCYm4zCQyzX1O2ixVzLEFlp80mr1L9Ums0QIgUSKXiZEm7CA/CAYo7Uta84X8/TponlRB8ZYIPqC9cO4="}]},"_npmUser":{"name":"pluggedin","email":"cem@plugged.in","actor":{"name":"pluggedin","email":"cem@plugged.in","type":"user"}},"directories":{},"maintainers":[{"name":"pluggedin","email":"cem@plugged.in"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pluggedin-random-number-generator-mcp_1.0.0_1751418554424_0.9752407391128108"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-02T01:09:14.423Z","1.0.0":"2025-07-02T01:09:14.654Z","modified":"2025-07-02T01:09:14.885Z"},"maintainers":[{"name":"pluggedin","email":"cem@plugged.in"}],"description":"A state-of-the-art cryptographically secure random number generator MCP server","homepage":"https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp#readme","keywords":["mcp","model-context-protocol","random","cryptography","rng","prng","csprng","ai","llm"],"repository":{"type":"git","url":"git+https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp.git"},"author":{"name":"VeriTeknik"},"bugs":{"url":"https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp/issues"},"license":"MIT","readme":"# Plugged.in Random Number Generator MCP Server\n\nA state-of-the-art cryptographically secure random number generator server implementing the Model Context Protocol (MCP). This server provides advanced random number generation capabilities for AI applications, LLMs, and other systems requiring high-quality randomness.\n\n## 🚀 Features\n\n- **Cryptographically Secure**: Uses Node.js built-in `crypto` module for cryptographically secure pseudorandom number generation (CSPRNG)\n- **Multiple Data Types**: Generate integers, floats, bytes, UUIDs, strings, booleans, and random choices\n- **Flexible Configuration**: Customizable ranges, counts, encodings, and character sets\n- **MCP Compliant**: Full compatibility with Model Context Protocol specification including tools and prompts\n- **AI-Friendly Prompts**: Built-in prompt to help LLMs understand they should use this server for random generation\n- **Type Safety**: Written in TypeScript with comprehensive type definitions\n- **Error Handling**: Robust input validation and error reporting\n- **Performance Optimized**: Efficient algorithms suitable for high-throughput applications\n\n## 📦 Installation\n\n### Prerequisites\n\n- Node.js 18.0.0 or higher\n- npm or yarn package manager\n\n### Install via Desktop Extension (DXT)\n\nFor Claude Desktop users, you can install this server as a one-click Desktop Extension:\n\n1. Download the latest `.dxt` file from the [releases page](https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp/releases)\n2. Open Claude Desktop\n3. Go to Settings → Developer → MCP Servers\n4. Click \"Install from file\" and select the downloaded `.dxt` file\n\n### Install from npm\n\n```bash\nnpm install -g pluggedin-random-number-generator-mcp\n```\n\nOr install locally in your project:\n\n```bash\nnpm install pluggedin-random-number-generator-mcp\n```\n\n### Build from Source\n\n```bash\ngit clone https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp.git\ncd pluggedin-random-number-generator-mcp\nnpm install\nnpm run build\n\n# Optional: Build DXT package\nnpm run build:dxt\n```\n\n## 🛠️ Usage\n\n### Running the Server\n\nThe server communicates via stdio (standard input/output) following the MCP protocol:\n\n```bash\n# Using the built version\nnode dist/index.js\n\n# Using development mode\nnpm run dev\n```\n\n### Integration with MCP Clients\n\n#### For global npm installation:\n\nAdd to your MCP client configuration. For Claude Desktop, add to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"random-generator\": {\n      \"command\": \"npx\",\n      \"args\": [\"pluggedin-random-number-generator-mcp\"]\n    }\n  }\n}\n```\n\n#### For local installation:\n\n```json\n{\n  \"mcpServers\": {\n    \"random-generator\": {\n      \"command\": \"node\",\n      \"args\": [\"node_modules/pluggedin-random-number-generator-mcp/dist/index.js\"]\n    }\n  }\n}\n```\n\n## 🔧 Available Tools\n\n### 1. Generate Random Integers\n\nGenerate cryptographically secure random integers within a specified range.\n\n**Parameters:**\n- `min` (integer, optional): Minimum value (inclusive), default: 0\n- `max` (integer, optional): Maximum value (inclusive), default: 100  \n- `count` (integer, optional): Number of integers to generate, default: 1, max: 1000\n\n**Example:**\n```json\n{\n  \"name\": \"generate_random_integer\",\n  \"arguments\": {\n    \"min\": 1,\n    \"max\": 100,\n    \"count\": 5\n  }\n}\n```\n\n### 2. Generate Random Floats\n\nGenerate cryptographically secure random floating-point numbers.\n\n**Parameters:**\n- `min` (number, optional): Minimum value (inclusive), default: 0.0\n- `max` (number, optional): Maximum value (exclusive), default: 1.0\n- `count` (integer, optional): Number of floats to generate, default: 1, max: 1000\n- `precision` (integer, optional): Decimal places to round to, default: 6, max: 15\n\n**Example:**\n```json\n{\n  \"name\": \"generate_random_float\", \n  \"arguments\": {\n    \"min\": 0.0,\n    \"max\": 1.0,\n    \"count\": 3,\n    \"precision\": 4\n  }\n}\n```\n\n### 3. Generate Random Bytes\n\nGenerate cryptographically secure random bytes in various encodings.\n\n**Parameters:**\n- `length` (integer, optional): Number of bytes to generate, default: 32, max: 1024\n- `encoding` (string, optional): Output encoding (\"hex\", \"base64\", \"binary\"), default: \"hex\"\n\n**Example:**\n```json\n{\n  \"name\": \"generate_random_bytes\",\n  \"arguments\": {\n    \"length\": 32,\n    \"encoding\": \"hex\"\n  }\n}\n```\n\n### 4. Generate UUIDs\n\nGenerate cryptographically secure UUID version 4 identifiers.\n\n**Parameters:**\n- `count` (integer, optional): Number of UUIDs to generate, default: 1, max: 100\n- `format` (string, optional): UUID format (\"standard\", \"compact\"), default: \"standard\"\n\n**Example:**\n```json\n{\n  \"name\": \"generate_uuid\",\n  \"arguments\": {\n    \"count\": 3,\n    \"format\": \"standard\"\n  }\n}\n```\n\n### 5. Generate Random Strings\n\nGenerate cryptographically secure random strings with customizable character sets.\n\n**Parameters:**\n- `length` (integer, optional): String length, default: 16, max: 256\n- `charset` (string, optional): Character set (\"alphanumeric\", \"alphabetic\", \"numeric\", \"hex\", \"base64\", \"ascii_printable\"), default: \"alphanumeric\"\n- `count` (integer, optional): Number of strings to generate, default: 1, max: 100\n\n**Example:**\n```json\n{\n  \"name\": \"generate_random_string\",\n  \"arguments\": {\n    \"length\": 12,\n    \"charset\": \"alphanumeric\",\n    \"count\": 2\n  }\n}\n```\n\n### 6. Generate Random Choices\n\nRandomly select items from a provided list using cryptographically secure randomness.\n\n**Parameters:**\n- `choices` (array, required): Array of string items to choose from\n- `count` (integer, optional): Number of items to select, default: 1\n- `allow_duplicates` (boolean, optional): Whether to allow duplicate selections, default: true\n\n**Example:**\n```json\n{\n  \"name\": \"generate_random_choice\",\n  \"arguments\": {\n    \"choices\": [\"apple\", \"banana\", \"cherry\", \"date\"],\n    \"count\": 2,\n    \"allow_duplicates\": false\n  }\n}\n```\n\n### 7. Generate Random Booleans\n\nGenerate cryptographically secure random boolean values with configurable probability.\n\n**Parameters:**\n- `count` (integer, optional): Number of booleans to generate, default: 1, max: 1000\n- `probability` (number, optional): Probability of true (0.0 to 1.0), default: 0.5\n\n**Example:**\n```json\n{\n  \"name\": \"generate_random_boolean\",\n  \"arguments\": {\n    \"count\": 10,\n    \"probability\": 0.7\n  }\n}\n```\n\n## 🤖 AI Prompts\n\nThe server includes a built-in prompt to help LLMs understand they should use this server for random number generation rather than attempting to generate random values themselves.\n\n### Available Prompt: `generate_random`\n\nThis prompt educates the AI about its limitations in generating random numbers and guides it to use the available cryptographically secure tools.\n\n**Parameters:**\n- `type` (string, optional): Type of random value needed (integer, float, uuid, string, bytes, choice, boolean)\n- `requirements` (string, optional): Specific requirements for the random generation\n\n**Example Usage:**\nWhen an LLM receives a request like \"Generate a random password\" or \"Pick a random number\", the prompt will:\n1. Acknowledge that LLMs cannot generate truly random values\n2. Explain the available cryptographically secure tools\n3. Guide the AI to use the appropriate tool for the task\n\nThis ensures that all random generation in your application uses proper cryptographic methods rather than predictable AI-generated patterns.\n\n## 🔒 Security Features\n\nThis server implements several security best practices:\n\n- **Cryptographically Secure Randomness**: All random number generation uses Node.js `crypto` module functions (`randomBytes`, `randomInt`, `randomUUID`) which provide cryptographically secure pseudorandom numbers suitable for security-sensitive applications.\n\n- **Input Validation**: Comprehensive validation of all input parameters to prevent injection attacks and ensure data integrity.\n\n- **Rate Limiting**: Built-in limits on generation counts to prevent resource exhaustion attacks.\n\n- **Error Handling**: Secure error messages that don't leak sensitive information about the system state.\n\n## 🧪 Testing\n\nThe server includes a comprehensive test suite that validates all functionality:\n\n```bash\n# Run the test suite\nnode test.js\n```\n\nThe test suite covers:\n- Tool discovery and listing\n- All random generation functions\n- Input validation and error handling\n- Output format verification\n- Statistical properties validation\n\n## 📊 Performance\n\nThe server is optimized for performance while maintaining security:\n\n- **Efficient Algorithms**: Uses optimized native crypto functions\n- **Memory Management**: Minimal memory footprint with efficient buffer handling\n- **Concurrent Requests**: Thread-safe design supporting multiple simultaneous requests\n- **Scalability**: Suitable for high-throughput applications\n\n## 🔧 Development\n\n### Project Structure\n\n```\npluggedin-random-number-generator-mcp/\n├── src/\n│   └── index.ts          # Main server implementation\n├── dist/                 # Compiled JavaScript output\n├── test.js              # Comprehensive test suite\n├── package.json         # Project configuration\n├── tsconfig.json        # TypeScript configuration\n└── README.md           # This documentation\n```\n\n### Building\n\n```bash\nnpm run build\n```\n\n### Development Mode\n\n```bash\nnpm run dev\n```\n\n### Testing with MCP Inspector\n\nYou can test the server using the MCP Inspector tool:\n\n```bash\nnpm run inspector\n```\n\nThis will start the MCP Inspector web interface where you can:\n- View available tools\n- Test tool execution\n- Inspect request/response payloads\n- Debug server behavior\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n### Development Guidelines\n\n1. Follow TypeScript best practices\n2. Maintain comprehensive test coverage\n3. Update documentation for new features\n4. Ensure all tests pass before submitting\n5. Follow semantic versioning for releases\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🔗 Related Projects\n\n- [Model Context Protocol](https://modelcontextprotocol.io/) - The official MCP specification\n- [Plugged.in](https://plugged.in/) - MCP server management and discovery platform\n- [MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk) - Official TypeScript SDK for MCP\n\n## 📞 Support\n\nFor support, questions, or feature requests:\n\n- Open an issue on [GitHub](https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp/issues)\n- Visit the [Plugged.in platform](https://plugged.in/) for MCP server management\n- Check the [MCP documentation](https://modelcontextprotocol.io/docs) for protocol details\n\n\n\n","readmeFilename":"README.md","_rev":"1-42ff1a777f9ff0206d1699355cf61eeb"}