MCP Integration Guide
The Model Context Protocol (MCP) is Buildable's core integration technology that allows AI assistants to securely access and interact with your project data in real-time.
What is MCP?
MCP (Model Context Protocol) is an open standard developed by Anthropic that enables AI assistants to connect to external data sources and tools. Buildable implements MCP to provide AI assistants with:
- Contextual Project Data - Access to plans, tasks, and requirements
- Real-time Updates - Live synchronization with your project
- Secure Authentication - API key-based access control
- Standardized Interface - Works with any MCP-compatible AI tool
How MCP Works with Buildable
graph LR
A[AI Assistant] --> B[MCP Client]
B --> C[Buildable API]
C --> D[Project Data]
B --> E[Task Management]
B --> F[Discussions]
B --> G[Progress Tracking]
- AI Assistant makes requests through the MCP protocol
- MCP Client translates requests to Buildable API calls
- Buildable API processes requests with proper authentication
- Project Data is returned to the AI assistant in context
Supported MCP Features
Core Resources
Projects
- Read project metadata and settings
- Access project plans and requirements
- View technical specifications
Tasks
- List and filter project tasks
- Read task details and dependencies
- Update task status and progress
- Create new tasks from conversations
Discussions
- Read project discussions
- Create new discussion threads
- Add responses to existing discussions
- Get discussion summaries
Tools and Actions
Task Operations
complete_task
- Mark tasks as completedstart_task
- Begin working on a taskcreate_task
- Add new tasks to the projectupdate_task_progress
- Report progress updates
Project Queries
get_project_summary
- Overview of project statusget_next_tasks
- Recommended tasks to work onsearch_tasks
- Find tasks by criteriaget_task_dependencies
- View task relationships
Discussion Tools
create_discussion
- Start new project discussionsrespond_to_discussion
- Add responsessearch_discussions
- Find relevant conversations
Setting Up MCP
Step 1: Install MCP Client
The Buildable MCP client is available via npm:
# Install globally
npm install -g @bldbl/mcp
# Or use npx for one-time execution
npx @bldbl/mcp
Step 2: Configure Environment
Set up your environment variables:
# Required
BUILDABLE_API_KEY=your_api_key_here
BUILDABLE_PROJECT_ID=your_project_id
# Optional
BUILDABLE_API_URL=https://bldbl.dev/api # Default
BUILDABLE_AI_ASSISTANT_ID=your_assistant_id
BUILDABLE_DEBUG=false # Enable debug logging
Step 3: Connect Your AI Tool
The setup varies by AI assistant:
Cursor AI
{
"mcp": {
"buildable": {
"command": "npx",
"args": ["-y", "@bldbl/mcp"]
}
}
}
Claude Desktop
{
"mcpServers": {
"buildable": {
"command": "npx",
"args": ["-y", "@bldbl/mcp"]
}
}
}
Authentication & Security
API Key Management
- Project-Specific Keys - Each project requires its own API key
- Granular Permissions - Control read/write access per integration
- Key Rotation - Regularly rotate keys for enhanced security
- Revocation - Instantly disable compromised keys
Security Best Practices
- Environment Variables - Never hardcode API keys
- Key Rotation - Rotate keys every 90 days
- Least Privilege - Use read-only keys when possible
- Monitoring - Review API usage logs regularly
- Secure Storage - Use secure credential management
Rate Limiting
Default limits per API key:
- Free tier: 100 requests/hour
- Pro tier: 1000 requests/hour
- Enterprise: Custom limits
Advanced Configuration
Custom MCP Server
For advanced users, you can run your own MCP server:
import { MCPServer } from '@buildable/mcp-server';
const server = new MCPServer({
apiKey: process.env.BUILDABLE_API_KEY,
projectId: process.env.BUILDABLE_PROJECT_ID,
baseUrl: process.env.BUILDABLE_API_URL,
});
server.start();
Custom Tools
Extend the MCP client with custom tools:
// custom-tools.js
export const customTools = {
analyze_code: async (params) => {
// Custom code analysis logic
return { analysis: "Code looks good!" };
},
generate_tests: async (params) => {
// Custom test generation
return { tests: "Generated test suite" };
}
};
Webhook Integration
Set up webhooks for real-time updates:
# Environment variable
BUILDABLE_WEBHOOK_URL=https://your-server.com/webhook
# The MCP client will receive notifications for:
# - Task status changes
# - New discussions
# - Project updates
Troubleshooting
Common Issues
Connection Failed
# Check API key and project ID
echo $BUILDABLE_API_KEY
echo $BUILDABLE_PROJECT_ID
# Test API connection
curl -H "Authorization: Bearer $BUILDABLE_API_KEY" \
https://bldbl.dev/api/projects/$BUILDABLE_PROJECT_ID
Permission Denied
- Verify API key has required permissions
- Check that the project ID is correct
- Ensure the key hasn't expired
Rate Limit Exceeded
- Monitor your API usage in the dashboard
- Consider upgrading your plan
- Implement request caching
MCP Client Not Found
# Reinstall the client
npm uninstall -g @bldbl/mcp
npm install -g @bldbl/mcp
# Or use npx
npx -y @bldbl/mcp
Debug Mode
Enable detailed logging:
BUILDABLE_DEBUG=true npx @bldbl/mcp
This will show:
- API request/response details
- MCP protocol messages
- Error stack traces
- Performance metrics
Log Analysis
Check logs for common patterns:
# Connection issues
grep "connection" ~/.buildable/logs/mcp.log
# Authentication failures
grep "401\|403" ~/.buildable/logs/mcp.log
# Rate limiting
grep "429" ~/.buildable/logs/mcp.log
Best Practices
Efficient Usage
- Cache Responses - Avoid repeated API calls
- Batch Requests - Group related operations
- Filter Data - Request only needed information
- Use Webhooks - Get real-time updates efficiently
AI Assistant Optimization
- Clear Commands - Use specific, actionable prompts
- Context Awareness - Reference task IDs and project details
- Incremental Updates - Work on tasks step-by-step
- Regular Sync - Keep AI assistant updated on progress
Team Collaboration
- Shared Keys - Use team-shared API keys for collaboration
- Consistent Setup - Standardize MCP configuration across team
- Documentation - Document custom tools and workflows
- Monitoring - Track team usage and performance
Getting Help
- 📖 Integration Guides
- 🔧 API Documentation
- 💬 Discord Community
- 📧 Email: mcp-support@bldbl.dev
- 🐛 GitHub Issues
What's Next?
- Set up Cursor AI integration
- Try Claude Desktop integration
- Explore API endpoints
- Learn about webhook integration