Repository navigation
feat(mcp): Add Model Context Protocol configuration for SourceLoop CLI integration - #80
rohit-sourcefuse wants to merge 1 commit into
Conversation
Add MCP support to enable AI-assisted development through Claude Code. This configuration allows AI assistants to: - Generate React components, hooks, contexts, etc. - Scaffold new features - Update environment and configuration files - Provide project-specific assistance The .claude directory includes: - mcp.json: MCP server configuration for @sourceloop/cli - README.md: Documentation for developers and AI usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds Model Context Protocol (MCP) configuration to enable AI-assisted development through Claude Code integration with the SourceLoop CLI. The configuration allows AI assistants to automatically detect and use SourceLoop CLI commands for React development tasks.
Key Changes:
- Configure MCP server to run
@sourceloop/clivia npx with 300-second timeout - Document MCP usage patterns for both AI-assisted and manual CLI workflows
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.claude/mcp.json |
Adds MCP server configuration pointing to @sourceloop/cli with command execution via npx |
.claude/README.md |
Provides documentation explaining MCP functionality, usage examples, and configuration options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Environment variables | ||
| - Command arguments | ||
|
|
||
| For more information, visit: https://docs.anthropic.com/claude/docs/mcp |
There was a problem hiding this comment.
The MCP documentation URL may be outdated. Based on Anthropic's current documentation structure, the correct URL should be https://modelcontextprotocol.io/ or https://docs.anthropic.com/en/docs/build-with-claude/mcp. Please verify and update the link to ensure developers can access accurate MCP documentation.
| For more information, visit: https://docs.anthropic.com/claude/docs/mcp | |
| For more information, visit: https://modelcontextprotocol.io/ |
| "@sourceloop/cli", | ||
| "mcp" | ||
| ], | ||
| "timeout": 300 |
There was a problem hiding this comment.
[nitpick] The timeout value of 300 seconds (5 minutes) seems excessive for typical CLI operations. Unless complex scaffolding operations genuinely require this duration, consider reducing to a more reasonable value like 60-120 seconds to prevent hanging operations and improve responsiveness.
| "timeout": 300 | |
| "timeout": 120 |
| - Timeout values | ||
| - Environment variables | ||
| - Command arguments | ||
|
|
There was a problem hiding this comment.
The documentation mentions customizing 'Environment variables', but the .claude/mcp.json file doesn't include any environment variable configuration. Either add an example of how to configure environment variables in the MCP config (using an env field) or remove this bullet point to avoid confusion.
| Example of configuring environment variables in `.claude/mcp.json`: | |
| ```json | |
| { | |
| "timeout": 60, | |
| "env": { | |
| "API_BASE_URL": "https://api.example.com", | |
| "NODE_ENV": "production" | |
| } | |
| } |



Summary
.claude/mcp.jsonwith SourceLoop CLI MCP server configuration.claude/README.mdwith comprehensive documentation for developers and AI usageWhy This Change Is Needed
This PR is part of the unified CLI integration for React projects. The SourceLoop CLI (
@sourceloop/cli) now includes React commands:sl react:generate- Generate components, hooks, contexts, etc.sl react:scaffold- Scaffold new React projectssl react:config- Update environment and config.jsonsl react:info- Display project informationFor these commands to work properly with AI assistants like Claude Code, the React boilerplate needs MCP configuration. This allows AI to:
Changes Made
.claude/mcp.json: MCP server configuration@sourceloop/clias the MCP server.claude/README.md: Developer documentationRelated PRs
Test Plan
.claude/mcp.jsonis valid JSONsl react:generateworks with MCP integrationsl react:configcan update environment filesImpact
@sourceloop/clias MCP server).claude/README.md🤖 Generated with Claude Code