MCP Server Example Random Num
This project demonstrates how to set up a basic MCP server application, including installing dependencies, building the project, using the MCP inspection tool, and configuring the Claude desktop client to connect to a custom MCP service.
rating : 2 points
downloads : 15
What is an MCP server?
An MCP (Model Context Protocol) server is a service that can integrate with AI applications (such as Claude) to extend the functionality of AI. This example shows how to create a basic MCP server that generates random numbers.How to use an MCP server?
By configuring the Claude desktop application to connect to the MCP server, you can directly use the functions provided by the server in Claude.Applicable scenarios
Suitable for scenarios where custom functions need to be integrated into AI conversations, such as data generation and professional calculations.Main Features
Random Number GenerationThe server can generate random numbers within a specified range
Claude IntegrationCan be seamlessly integrated with the Claude desktop application
Advantages and Limitations
Advantages
A simple and easy-to-use MCP server example
A clear configuration guide
Good integration with the Claude desktop application
Limitations
Relatively basic functionality
Requires manual configuration of the Claude application
How to Use
Install Dependencies
Use pnpm to install the project dependencies
Build the Project
Compile TypeScript code to JavaScript
Configure the Claude Desktop Application
Edit the Claude configuration file and add the MCP server settings
Usage Examples
Request a random number in the conversationIn the Claude conversation, you can request the server to generate a random number
Frequently Asked Questions
How to find the Claude configuration file?
Can I use other package managers?
How to test if the server is working properly?
Related Resources
MCP Official Documentation
The official documentation of the Model Context Protocol
TypeScript SDK
The TypeScript SDK repository for MCP
Claude Download
The download page for the Claude desktop application
Featured MCP Services

Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
1.7K
5 points

Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
823
4.3 points

Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
79
4.3 points

Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
130
4.5 points

Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
554
5 points

Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
6.6K
4.5 points

Context7
Context7 MCP is a service that provides real-time, version-specific documentation and code examples for AI programming assistants. It is directly integrated into prompts through the Model Context Protocol to solve the problem of LLMs using outdated information.
TypeScript
5.2K
4.7 points

Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
745
4.8 points