-
Notifications
You must be signed in to change notification settings - Fork 8
feat: impl mcp host #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
alexchenzl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- use ai.nanobrowser.mcp.host as the host application's name, following the convention "com.my_company.my_application"
- use pnpm as package manager, keep it the same as the Nanobrowser repo
- would be great to have a document to describe the capabilities of this MCP server, eg. description, supported tools, resources etc.
Thank you for the feedback! I've addressed all your suggestions: ✅ Changes Made
🔧 Additional Improvements
The MCP Host now provides a clean, well-documented interface for AI systems to interact with browser functionality through standardized tools and resources. The documentation makes it easy for developers and integrators to understand and extend the API |
alexchenzl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Looks like install-vite-deps.sh is not necessary, devDependencies in package.json should be enough
- It should be better to update versions of dependencies, use the same version as the one in Nanobrowse or use latest versions if possible.
- Use the similar eslint configuration as Nanobrowser to lint the source code, so that the source code in this repo follow similar rules.
- Is it possible to create an installation configuration for dev environment in the install.sh for developers, so that we can use the dist and node_modules directly when debugging the application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependencies in $APP_DIR is incomplete. Errors will happen if you run "node index.js" in the $APP_DIR.
The issue was caused by pnpm's symlink structure being broken when copying node_modules with cp -r, solution:
cp -a "$SCRIPT_DIR/node_modules" "$APP_DIR/"
-a (archive mode) preserves symlinks, permissions, timestamps, and all file attributes
This maintains pnpm's symlink structure intact
Module resolution works correctly because the symlink paths remain valid
The issues you reported have been fixed. Please review them again. https://github.com/nanobrowser/nanobrowser I will check the issues you reported tomorrow. |
alexchenzl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's almost done!
I still failed to start mcp host after running the install.sh at first
Finally I changed the path of node to the full path of node in the file mcp-host.sh and got it worked, now I can call the mcp tool in cursor.
So there's only one more step that needs to be done:
- update the install.sh, use full path of node in the mcp-host.sh
I'm trying to compile nanobrowser-mcp-host as a standalone binary so that I don't have to install nodejs. |
That would be better. In fact, I have ever even thought of building a go/rust native app as the bridge to provide APIs, they usually provide smaller footprints and better performance than Nodejs. |
Finish: #1