Skip to content

TUI Error when pressing Enter to call a tool #1952

Description

@collimarco

Which version line?

v2 — current (@modelcontextprotocol/inspector@latest)

Which client?

TUI

Inspector version

2.1.0

Node version

v24.16.0

Operating system (and browser, for the web client)

macOS 15.7 / dev container (trixie) in VS Code

Transport

stdio

MCP server under inspection

import { createOpenAPIServer } from '@prefecthq/fastmcp-ts/server';
const spec = await fetch('https://pushpad.xyz/openapi.yaml').then((r) => r.text());
const server = createOpenAPIServer({
    spec,
    name: 'Pushpad',
    client: { headers: { authorization: `Bearer ${process.env.PUSHPAD_TOKEN}` } },
});
await server.run();

Steps to reproduce

  1. Start the TUI: mcp-inspector --tui -- node --env-file-if-exists=.env .
  2. Connect to MCP... tools are displayed correctly
  3. Select a tool, like notifications_list
  4. Press Enter to Test
  5. Inspector TUI crashes with the following error
TUI Error: TypeError: Cannot read properties of null (reading 'useState')
    at useState (/workspaces/pushpad-mcp/node_modules/react/cjs/react.development.js:1622:21)
    at Form (file:///workspaces/pushpad-mcp/node_modules/ink-form/lib/Form.js:11:41)
    at Object.react_stack_bottom_frame (/workspaces/pushpad-mcp/node_modules/@modelcontextprotocol/inspector/node_modules/react-reconciler/cjs/react-reconciler.development.js:17596:20)
    at renderWithHooks (/workspaces/pushpad-mcp/node_modules/@modelcontextprotocol/inspector/node_modules/react-reconciler/cjs/react-reconciler.development.js:5335:22)
    at updateFunctionComponent (/workspaces/pushpad-mcp/node_modules/@modelcontextprotocol/inspector/node_modules/react-reconciler/cjs/react-reconciler.development.js:7720:19)
    at beginWork (/workspaces/pushpad-mcp/node_modules/@modelcontextprotocol/inspector/node_modules/react-reconciler/cjs/react-reconciler.development.js:9277:18)
    at runWithFiberInDEV (/workspaces/pushpad-mcp/node_modules/@modelcontextprotocol/inspector/node_modules/react-reconciler/cjs/react-reconciler.development.js:2505:30)
    at performUnitOfWork (/workspaces/pushpad-mcp/node_modules/@modelcontextprotocol/inspector/node_modules/react-reconciler/cjs/react-reconciler.development.js:15273:22)
    at workLoopSync (/workspaces/pushpad-mcp/node_modules/@modelcontextprotocol/inspector/node_modules/react-reconciler/cjs/react-reconciler.development.js:15099:41)
    at renderRootSync (/workspaces/pushpad-mcp/node_modules/@modelcontextprotocol/inspector/node_modules/react-reconciler/cjs/react-reconciler.development.js:15080:11)

Expected behavior

Inspector TUI should not crash

Actual behavior

Inspector TUI completely crashes with an error

Logs, errors, or screenshots

No response

Already prototyped a fix?

No response

Before you submit

  • I searched existing issues and this is not a duplicate.
  • This is not a security vulnerability report (those go through the private advisory process).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions