Mcp Server And Claude for Desktop Example
About
# Mcp Server And Claude for Desktop Example ## 0. SetUp Claude for Desktop [Download - Claude](https://claude.ai/download) ## 1. Packages Installation ```bash pnpm install ``` ## 2. Build ```bash pnpm build ``` ## 3. Configure Claude for Desktop Open the config file in VSCode. ```bash code ~/Library/Application\…
Explore
—
pnpm install
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
0. SetUp Claude for Desktop
1. Packages Installation
pnpm install
2. Build
pnpm build
3. 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
- Example Servers - Model Context Protocol
- modelcontextprotocol/typescript-sdk: The official Typescript SDK for Model Context Protocol servers and clients
- TypeScript で MCP サーバーを実装し、Claude Desktop から利用する
- 簡易な自作MCPサーバーをお試しで実装する方法
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



