Skip to content

🔴 Bug: Redis error [Error: Socket closed unexpectedly] #61

@pstaylor-patrick

Description

@pstaylor-patrick

Dev Notes

Steps to Reproduce

  1. checkout my forked fix branch at Fix Error: redisUrl is required vercel-labs/mcp-for-next.js#17 (https://github.com/servant-io/mcp-for-next.js/tree/fix/redisUrl)
  2. run:
    #/usr/bin/env bash
    nvm install
    nvm use
    pnpm install -D
    
    # https://github.com/redis/node-redis/blob/9ea260f/packages/client/lib/client/index.ts#L33
    # replace `redis[s]://[[username][:password]@][host][:port][/db-number]` with your actual `REDIS_URL`
    echo "REDIS_URL=\"redis[s]://[[username][:password]@][host][:port][/db-number]\"" > .env.local
    
    pnpm build
    pnpm dev
  3. in another terminal, run:
    #/usr/bin/env bash
    nvm install
    nvm use
    
    # no need to globally install mcp sdk because I
    # rolled it into the dev dependencies
    # npm i -g @modelcontextprotocol/sdk@latest
    
    pnpm test:client http://localhost:3000
  4. 🔴 see that the output reads:
    > next.js-mcp-server@0.1.0 dev /Users/patrick/src/servant-io/mcp-for-next.js
    > next dev
    
       ▲ Next.js 15.2.4
       - Local:        http://localhost:3000
       - Network:      http://192.168.1.52:3000
       - Environments: .env.local
    
     ✓ Starting...
     ✓ Ready in 1650ms
     ○ Compiling /[transport] ...
     ✓ Compiled /[transport] in 1458ms (999 modules)
    Redis error [Error: Socket closed unexpectedly]
    Redis error [Error: Socket closed unexpectedly]
    Redis error [Error: Socket closed unexpectedly]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions