Mcp Server And Claude for Desktop Example
LocalAbout Mcp Server And Claude for Desktop Example
A basic MCP server example built and run with pnpm, with instructions for connecting it to Claude for Desktop. It focuses on the server startup and client configuration workflow.
Key features
- 01Install dependencies and build the server
- 02Inspect with MCP Inspector
- 03Example Claude for Desktop configuration
Use cases
- 01Try running a basic MCP server
- 02Inspect the server with MCP Inspector
- 03Configure the server in Claude for Desktop
MCP support
The example shows how to run an MCP server and connect it through Claude for Desktop's mcpServers configuration. The README does not specify which tools or resources the server exposes.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMcp Server Basic Sample
Prepare mcp server app
1. Install packages
pnpm install
2. Build
pnpm build
Mcp Inspector
Inspector - Model Context Protocol
pnpm start
pnpm inspect
Claude for Desktop
Download Claude for Desktop
Set Configure Claude for Desktop
Open the config file in VSCode.
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
/Users/[user]/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"RandomNumber": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/PARENT/FOLDER/build/index.js"]
}
}
}
If you use mise.
$ mise which node
/Users/[user]/.local/share/mise/installs/node/22.14.0/bin/node
/Users/[user]/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"RandomNumber": {
"command": "/Users/[user]/.local/share/mise/installs/node/22.14.0/bin/node",
"args": ["/ABSOLUTE/PATH/TO/PARENT/FOLDER/build/index.js"]
}
}
}
reference: https://github.com/modelcontextprotocol/servers/issues/64#issuecomment-2503152420
Resources
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.