-
Notifications
You must be signed in to change notification settings - Fork 245
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
Feature/mcp-client #473
Open
glassBead-tc
wants to merge
20
commits into
srcbookdev:main
Choose a base branch
from
glassBead-tc:feature/mcp-client
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/mcp-client #473
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glassBead-tc
force-pushed
the
feature/mcp-client
branch
from
January 20, 2025 02:01
5a67234
to
232927e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Summary
This PR integrates the Model Context Protocol (MCP) client into Srcbook. This integration significantly expands Srcbook's current and future capabilities by giving the local-first version access to a wide array of external tools and resources. Those included in the srcbook_mcp_config.example.json file require no API key or registration, meaning the community can begin building integrations with them immediately. This PR provides support for a single MCP server, sequential-thinking, implemented here with a simple on-off toggle in the dialog window during build sessions.
Importantly, MCP works only on the local dev server in this PR. Enabling MCP for local-first production will require addressing #456, and more generally, configuring Srcbook to target different builds based on the host machine's chip architecture (i.e. Intel vs Apple Silicon). I chose to keep this PR focused on the MCP integration and will address the above issue in a follow-up PR, and in the issue discussion on GitHub.
🛠 Implementation Details
MCP Client Integration:
packages/api/mcp/
.Enhanced AI Capabilities:
Configuration Updates:
README.md
to include MCP integration details.MCP_README.md
with comprehensive setup and usage instructions.Dependencies:
20.x
to ensure compatibility and stability, especially with regard to Rollup: this will become important later when implementing conditional build targeting in Docker based on whether the user's host machine runs on an Intel or ARM architecture."@modelcontextprotocol/sdk": "^1.1.0"
.📚 Related Documentation
Updated
README.md
:Added
MCP_README.md
:🔗 Related Issues
🧪 Testing
Unit Tests: (To be added)
Manual Testing:
Demo Video:
📸 Screenshots/GIFs
(If applicable, insert images or GIFs here)
🔗 Additional Information
Dependencies:
"@modelcontextprotocol/sdk": "^1.1.0"
20.x
to avoid compatibility issues, especially with Rollup handling different architectures.Setup Instructions:
packages/api/
.srcbook_mcp_config.example.json
tosrcbook_mcp_config.json
.srcbook_mcp_config.json
:/PATH/TO/YOUR/DESKTOP
and/PATH/TO/YOUR/DOWNLOADS
with the actual paths on your machine.🗣️ Future Development
Local Production Support in Docker:
Notebook Integration:
Additional Server Integrations:
📽️ Demo Video
A demonstration video showcasing the MCP integration (here, with the sequential-thinking server) is available on YouTube. Link
📚 Additional Resources
Notes for Reviewers:
Code Location: Most of the new code resides in the
packages/api/mcp/
directory. Please focus your review on this folder to understand the MCP client implementation.Configuration Requirements: Users must update their
srcbook_mcp_config.json
with the correct filesystem paths to enable MCP filesystem access. Detailed instructions are provided inMCP_README.md
.Pending Unit Tests: While unit tests are not yet included, they are being developed to ensure the reliability and stability of the MCP integration. Contributions or suggestions for testing strategies are welcome.
Contributors:
🎉 Conclusion
The MCP client is a significant expansion of Srcbook's potential, but more remains to be done to make it a fully functional feature, and addressing the issues around platform targeting and filesystem access is the next step in that process.
Thank you for reviewing this PR! 🙏