MCP Support (BETA)
What is MCP?
MCP (Model Context Protocol) is a standardized protocol that allows AI agents to interact with Playground in a structured, safe way. Instead of manually creating plays step-by-step, you can now ask an AI agent to generate plays from your requirements, significantly reducing the time needed to create new Salesforce components.
Think of it as having an AI assistant that:
- Searches for existing similar plays to prevent duplicates
- Generates professional titles and descriptions
- Creates Salesforce component code automatically
- Handles file uploads reliably
- Keeps you in control with approval workflows
Key Capabilities
1. Smart Duplicate Detection
Before creating a new play, Playground automatically searches for related plays and shows recommendations. This prevents duplicate work and encourages collaboration across your team.
2. AI-Generated Metadata
The system automatically generates:
- Professional titles - Multiple suggestions based on your requirements
- HTML descriptions - Rich, formatted descriptions ready for Playground
- No manual typing needed
3. User Approval Workflow
You remain in full control:
- Review all generated titles and descriptions
- Amend them as needed
- Explicitly approve before proceeding
4. Naming Convention Support
Define how component names should be formatted to match your coding standards:
- Prefix strategy:
ACME_AccountTrigger - Suffix strategy:
AccountTrigger_v2 - Namespace strategy:
acme.AccountTrigger - Custom strategy: Your own naming pattern
5. Automatic Code Generation
From requirements like "Validate account phone numbers on insert/update", the system generates:
- Apex Triggers with proper context
- Apex Classes with business logic structure
- XML metadata files with correct API versions
- Proper directory structure (
force-app/main/default/)
6. Reliable File Upload
Binary-stream file uploads (not base64) ensure:
- Faster uploads
- No timeout errors
- Direct compatibility with Playground backend
Typical Workflow
Step 1: Define Requirements
Start by telling the AI agent what you want to build:
Step 2: Check for Duplicates
Playground MCP searches for existing similar plays and shows recommendations to prevent duplicate work.
Step 3: Review Generated Metadata
- Title options: "Account Validator", "Phone Validation Engine", etc.
- Description: Professional HTML-formatted description
- You approve/amend both before proceeding
Step 4: Define Naming Convention
Ensures all generated components follow your organization's standards.
Step 5: Auto-Generate Structure
The system creates:
ACME_AccountTrigger.trigger+ metadata XMLACME_BusinessLogicHandler.cls+ metadata XML.playgignorefile with best-practice patterns
Step 6: Upload & Create
- Files are packaged and uploaded to Playground
- Play is created with your generated content
- You get the public URL
Time saved: From 30+ minutes → 2-3 minutes of interactive time
Getting Started
Step 1: Generate Playground Credentials
- Login to your Playground instance
- Navigate to Profile → App Passwords
- Click "Create New"
- Copy and securely store the generated token
Step 2: Get MCP Endpoint
The MCP server endpoint is:
Step 3: Configure Your AI Agent
Provide these headers to your AI agent:
Step 4: Start Creating Plays
Command your AI agent:
Note: Any AI agent supporting HTTP header authentication can connect to the MCP server.
System Requirements
- Playground account with API access
- An AI agent that supports HTTP-based MCP protocol
- Basic knowledge of Salesforce components
- Valid app password credentials
Limitations & Known Constraints
What MCP Does NOT Do
- ❌ Deploy to Salesforce orgs (returns generated structure only)
- ❌ Generate complex business logic (skeleton code provided; you fill TODO sections)
- ❌ Validate against your existing Salesforce metadata
- ❌ Handle advanced Salesforce patterns (custom objects, permission sets, etc.)
Current Scope
- Supports creating new plays only (not updating existing)
- Single-play creation per workflow
- Tested up to 50MB file sizes
- Requires manual code review before deployment
Best Practices
✅ Do's
- ✅ Review all generated code before using
- ✅ Test thoroughly in sandbox first
- ✅ Use meaningful naming conventions
- ✅ Provide detailed requirements to the AI agent
- ✅ Report issues and provide feedback
- ✅ Keep credentials secure
❌ Don'ts
- ❌ Use generated code directly in production
- ❌ Rely solely on auto-generated descriptions
- ❌ Share credentials or auth tokens
- ❌ Create plays for complex business logic without review
- ❌ Bypass the approval workflow
- ❌ Deploy without testing
Troubleshooting
"No related plays found" when they exist
- Try simpler keywords
- Check user permissions on Playground
- Verify auth credentials are correct
Upload timeout errors
- Reduce file size by using
.playgignore - Check Playground backend status
- Retry the upload
Component naming conflicts
- Use unique prefix/suffix strategy
- Check existing component names in Playground
- Contact support if namespace issues persist
Generated code has TODOs
- This is by design - you provide the business logic
- Review and complete all TODO sections before deployment
- Do NOT use auto-generated code as-is in production
FAQ
Q: Is MCP free?
A: Yes, MCP is included with your Playground subscription (Beta).
Q: What agents can connect?
A: Any AI agent supporting HTTP-based authentication and MCP protocol.
Q: What if generated code has issues?
A: You're responsible for reviewing and testing. Complete all TODO sections and validate in sandbox first.
Q: Can I use this in production?
A: Use at your own risk. We recommend thorough testing before production use.
Q: How do I report issues?
A: Visit the Playground Community to report issues and get support.
Support & Feedback
Report Issues
Visit the Playground Community to:
- Report bugs and issues
- Request features
- Get help with setup
- Share feedback
Provide Feedback
We actively collect feedback on:
- Missing features you need
- Confusing workflows
- Generated code quality
- Documentation gaps
Your input shapes the product roadmap.
Legal Disclaimer
⚠️ BETA FEATURE DISCLAIMER
This MCP Server is provided "AS-IS" in BETA and subject to change without notice. While we test thoroughly, we make no guarantees regarding:
- Availability or uptime
- Absence of bugs or errors
- Compatibility with future versions
- Generated code quality or security
Use at your own risk. You are fully responsible for reviewing, testing, and validating any generated code before use in production.