Skip to content

Conversation

@ochafik
Copy link
Collaborator

@ochafik ochafik commented Dec 16, 2025

Summary

  • threejs-server: Use server.registerTool for the non-UI render-threejs-code tool instead of registerAppTool, since it doesn't have an associated UI resource
  • All example servers: Add missing registerAppTool and registerAppResource imports that were causing "ReferenceError: registerAppTool is not defined" at runtime

Affected servers for import fix:

  • budget-allocator-server
  • cohort-heatmap-server
  • customer-segmentation-server
  • scenario-modeler-server
  • system-monitor-server
  • threejs-server
  • wiki-explorer-server

Test plan

  • All 9 example servers start successfully with npm run examples:start
  • All servers respond to MCP initialize requests

🤖 Generated with Claude Code

The learn_threejs tool doesn't have a UI component - it only returns
documentation text. Using registerAppTool without _meta causes a
runtime error when the function tries to access config._meta.ui.

Fixes crash: "Cannot read property 'ui' of undefined"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ochafik ochafik force-pushed the ochafik/fix-registerAppTool-missing-meta branch from 9e6eb9a to 665e771 Compare December 16, 2025 23:39
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 16, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@173

commit: b33f2b9

jonathanhefner
jonathanhefner previously approved these changes Dec 16, 2025
…ports

All example servers were using registerAppTool and registerAppResource
but not importing them from @modelcontextprotocol/ext-apps/server,
causing "ReferenceError: registerAppTool is not defined" at runtime.

Affected servers:
- budget-allocator-server
- cohort-heatmap-server
- customer-segmentation-server
- scenario-modeler-server
- system-monitor-server
- threejs-server
- wiki-explorer-server

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ochafik ochafik changed the title fix(threejs-server): use server.registerTool for non-UI tool fix(examples): use server.registerTool for non-UI tool + fix missing imports Dec 17, 2025
@ochafik ochafik merged commit c3e9d4d into main Dec 17, 2025
19 checks passed
ochafik added a commit that referenced this pull request Dec 17, 2025
The learn_threejs tool was added in #173, which adds a second option
in the Tool dropdown. This updates the golden snapshot to match.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants