Building Custom MCPs
Build powerful custom integrations with MCP Studio's visual builder. Write Python or Node.js code with AI assistance, validate your integration, and deploy to productionβall from your browser.
AI-Powered Development: Describe what you want in plain English, and DarcyIQ will generate the code for you. Edit, test, and deploy without leaving the browser.
Overview
The MCP Builder provides a complete development environment for creating custom integrations. Whether you're connecting to a proprietary API, building a custom database connector, or creating specialized tools, the builder has everything you need.
AI Code Generation
Describe your goal in natural language
Visual Code Editor
Full-featured editor with syntax highlighting
Real-Time Validation
Catch errors before deployment
Integrated Testing
Test your tools without deploying
Secrets Management
Secure credential storage
Auto-Save
Never lose your work

The 5-Tab Workflow
MCP Studio guides you through building an integration with five tabs:
Start
Begin your integration
AI generation, templates, or blank canvas
Build
Write and test code
Edit code, configure secrets, validate, test
Deploy
Deploy to production
Validate and deploy with streaming progress
Connect
Enable the integration
Toggle for Darcy, get connection details
Monitor
Debug and troubleshoot
View real-time logs
Creating a New MCP Server
Navigate to MCP Studio
From the DarcyIQ sidebar, click MCP Studio, then select the My MCPs tab.
Click Create MCP
Click the Create MCP button in the top right corner.
Name Your Integration
Enter a descriptive name for your integration (e.g., "Customer Database Connector" or "Slack Notifier").
Choose Your Starting Point
You'll be taken to the Start tab where you can choose how to begin.
Start Tab: Choose Your Approach
The Start tab offers three ways to begin building:
Option 1: AI Code Generation (Recommended)
Let DarcyIQ write the code for you:
Describe Your Goal: In the text area, describe what you want your integration to do
Click Generate: DarcyIQ analyzes your request and generates complete code
Review and Edit: The generated code appears in the Build tab for review
Example Prompts:
Database Query
"Create an integration that connects to PostgreSQL and allows querying customer data by email or ID"
API Integration
"Build an integration for the Stripe API that can retrieve payment history and customer details"
Notification Service
"Create a Slack integration that can send messages to any channel with formatting support"
File Processing
"Build an integration that reads CSV files and returns the data as structured JSON"
Option 2: Start from a Template
Choose from pre-built templates:
Basic Python
Minimal Python MCP server
Simple integrations
Python with Auth
Python template with authentication
Secure API connections
Basic Node.js
Minimal Node.js MCP server
JavaScript developers
REST API Wrapper
Template for wrapping REST APIs
API integrations
Option 3: Blank Canvas
Start with an empty editor and write everything from scratch. Recommended only for experienced MCP developers or importing existing MCPs into MCP Studio.
Build Tab: Code Editor
The Build tab is where you write, edit, and test your integration code.
Code Editor Features
Syntax Highlighting
Full color coding for Python and JavaScript
Error Detection
Real-time validation as you type
Auto-Detection
Runtime automatically detected from code
Line Numbers
Easy navigation and debugging
Auto-Save
Changes saved automatically every 3 seconds
Writing MCP Server Code
Your MCP server code defines the tools that will be available to DarcyIQ. Here's the basic structure:
Python Example:
Node.js Example:
Tool Documentation
Best Practice: Write clear docstrings for your tools. The AI uses these descriptions to understand when and how to use each tool.
Good documentation includes:
Brief Description
One-line summary of what the tool does
"Retrieve customer information by ID"
Args Section
Document each parameter
"customer_id: The unique identifier for the customer"
Returns Section
Describe the output
"Customer details including name, email, and account status"
Validation
Click the Validate button to check your code for errors:
Syntax Errors
Code compiles without errors
Import Validation
All imports are available
Tool Detection
At least one tool is defined
Secret Detection
Environment variables are identified
Validation results appear inline with your code:
β Valid
Code passes all checks
β οΈ Warning
Non-critical issues to review
β Error
Must be fixed before deployment
Secrets Management
The Secrets section lets you configure environment variables securely:
Auto-Detection
MCP Studio automatically detects environment variables used in your code (e.g., os.environ.get("API_KEY")).
Configure Secrets
For each detected secret, provide:
Name: The environment variable name (auto-filled)
Display Name: A friendly label for the UI
Description: What this credential is for
Required: Whether deployment requires this value
Enter Values
Enter the actual secret values. These are stored securely and never exposed in code or logs.
Testing Your Tools
The Test Panel lets you test tools before deployment:
Open Test Panel
Click Test in the Build tab toolbar to open the test panel.
Select a Tool
Choose which tool to test from the dropdown.
Enter Parameters
Fill in the required parameters for the tool.
Run Test
Click Run to execute the tool. Results appear in the panel.
Runtime Support
MCP Studio supports two runtimes:
Python
Version
Python 3.11+
Package Manager
pip with requirements.txt
MCP SDK
mcp package
Common Libraries
requests, httpx, asyncio, pandas
Specifying Dependencies:
Add a comment block at the top of your file:
Node.js
Version
Node.js 18+
Package Manager
npm with package.json
MCP SDK
@modelcontextprotocol/sdk
Common Libraries
axios, node-fetch, lodash
Specifying Dependencies:
Dependencies are auto-detected from import statements, or you can include a package.json comment:
Best Practices for Custom MCPs
Code Organization
Single Responsibility
Each tool should do one thing well
Clear Naming
Use descriptive tool and parameter names
Error Handling
Always handle potential errors gracefully
Logging
Add logging for debugging (visible in Monitor tab)
Error Handling
Security Considerations
Use Environment Variables
Never hardcode credentials
Validate Input
Check parameters before using them
Limit Scope
Only request permissions you need
Sanitize Output
Don't expose sensitive data in responses
Common Patterns
REST API Wrapper
Database Query
Next Steps
Once your code is ready, proceed to deployment:
Deploy your integration
View more code examples
Troubleshoot issues
Last updated
Was this helpful?