Logo

dev-resources.site

for different kinds of informations.

MCP using node on asdf

Published at
12/12/2024
Categories
mcp
claude
asdf
Author
cojiroooo
Categories
3 categories in total
mcp
open
claude
open
asdf
open
Author
9 person written this
cojiroooo
open
MCP using node on asdf

What happend?

I tried this tutorial( 👉https://modelcontextprotocol.io/quickstart ) , and encountered following error in MCP log when I started the Claude Desktop App.

2024-12-12T07:24:00.201Z [error] Could not start MCP server weather: Error: spawn node ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn node',
  path: 'node',
  spawnargs: [Array]
}
Enter fullscreen mode Exit fullscreen mode

Environment

macOS 14.3.1(Sonoma)
asdf v0.13.1
node v20.11.0

% which node
/Users/user_name/.asdf/shims/node
Enter fullscreen mode Exit fullscreen mode

Solution

My claude_desktop_config.json has problems.
I changed laude_desktop_config.json like "after" and restarted the Claude Desktop App.

  • before
{
    "mcpServers": {
        "weather": {
            "command": "node",
            "args": [
                "/Users/user_name/develop/mcp/tutorial/weather-server/build/index.js"
            ]
        }
    }
}
Enter fullscreen mode Exit fullscreen mode
  • after
{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["/Users/user_name/develop/mcp/tutorial/weather-server/build/index.js"],
      "env": {
        "PATH": "/Users/user_name/.asdf/shims:/usr/bin:/bin",
        "ASDF_DIR": "/opt/homebrew/opt/asdf/libexec",
        "ASDF_DATA_DIR": "/Users/user_name/.asdf",
        "ASDF_NODEJS_VERSION": "20.11.0"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

I add "env" key.
ASDF_DIR is set this(↓) value.

% echo $ASDF_DIR                             
/opt/homebrew/opt/asdf/libexec
Enter fullscreen mode Exit fullscreen mode
claude Article's
29 articles in total
Favicon
Integrating Locally running Postgres with Claude Desktop
Favicon
Write tools for LLMs with go - mcp-golang
Favicon
MCP using node on asdf
Favicon
Modify the local bolt.new interface to allow input of the API key
Favicon
Enabling Application Downloads in Local bolt.new
Favicon
Running bolt.new Locally
Favicon
In the Beginning...
Favicon
Dario Amodei: Anthropic CEO on Claude, AGI & the Future of AI & Humanity | Podcast Summary
Favicon
Certainly! Absolutely! I apologize!
Favicon
Claude prompting guide - General tips for effective prompting
Favicon
How I used ChatGPT o1 and Claude for generating a SQL RBAC report and was surprised by the results
Favicon
How to use AI for coding the right way
Favicon
Using Cursor + Claude to Make Full-Stack SaaS Apps
Favicon
Exploring Anthropic Claude: A Safe and Ethical AI Assistant
Favicon
Claude 3.5 API Introductory Tutorial
Favicon
Unlocking Rapid Data Extraction: Groq + OCR and Claude Vision
Favicon
Free AI Chat and AI Art
Favicon
Optimising Function Calling (GPT4 vs Opus vs Haiku vs Sonnet)
Favicon
DEMO - Voice to PDF - Complete PDF documents with voice commands using the Claude 3 Opus API
Favicon
Claude LLM - Pros and Cons Compared with Other LLMs
Favicon
Is Claude Self Aware
Favicon
Guide to Effective Prompt Engineering for ChatGPT and LLM Responses
Favicon
AI powered video summarizer with Amazon Bedrock and Anthropic’s Claude
Favicon
Claude 2.1 Unleashed: The AI Revolution That's Outshining GPT-4
Favicon
AWS Bedrock Claude 2.1 - Return only JSON
Favicon
Claude: 10 Minute Docs Audit
Favicon
New Discoveries in No-Code AI App Building with ChatGPT
Favicon
Meet Claude - The AI Assistant That Understands The World Like You Do
Favicon
La IA de Anthropic, Claude, Supera a ChatGPT

Featured ones: