curl -X POST https://api.leanmcp.com/v1/build \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "email-assistant",
"template": "basic",
"tools": [
{
"name": "send_email",
"description": "Send an email to someone",
"inputSchema": {
"type": "object",
"properties": {
"to": {"type": "string"},
"subject": {"type": "string"},
"body": {"type": "string"}
},
"required": ["to", "subject", "body"]
}
}
],
"resources": [
{
"uri": "user://contacts",
"name": "User Contacts",
"description": "List of user contact information",
"mimeType": "application/json"
}
]
}'
{
"success": true,
"data": {
"mcp_id": "mcp_abc123def456",
"name": "email-assistant",
"status": "ready",
"url": "https://mcp-abc123def456.leanmcp.com",
"build_time": 8.5
},
"meta": {
"request_id": "req_789xyz",
"timestamp": "2023-12-01T12:00:00Z"
}
}
Create a new MCP server from templates and configuration
curl -X POST https://api.leanmcp.com/v1/build \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "email-assistant",
"template": "basic",
"tools": [
{
"name": "send_email",
"description": "Send an email to someone",
"inputSchema": {
"type": "object",
"properties": {
"to": {"type": "string"},
"subject": {"type": "string"},
"body": {"type": "string"}
},
"required": ["to", "subject", "body"]
}
}
],
"resources": [
{
"uri": "user://contacts",
"name": "User Contacts",
"description": "List of user contact information",
"mimeType": "application/json"
}
]
}'
{
"success": true,
"data": {
"mcp_id": "mcp_abc123def456",
"name": "email-assistant",
"status": "ready",
"url": "https://mcp-abc123def456.leanmcp.com",
"build_time": 8.5
},
"meta": {
"request_id": "req_789xyz",
"timestamp": "2023-12-01T12:00:00Z"
}
}
basic
, advanced
, custom
curl -X POST https://api.leanmcp.com/v1/build \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "email-assistant",
"template": "basic",
"tools": [
{
"name": "send_email",
"description": "Send an email to someone",
"inputSchema": {
"type": "object",
"properties": {
"to": {"type": "string"},
"subject": {"type": "string"},
"body": {"type": "string"}
},
"required": ["to", "subject", "body"]
}
}
],
"resources": [
{
"uri": "user://contacts",
"name": "User Contacts",
"description": "List of user contact information",
"mimeType": "application/json"
}
]
}'
{
"success": true,
"data": {
"mcp_id": "mcp_abc123def456",
"name": "email-assistant",
"status": "ready",
"url": "https://mcp-abc123def456.leanmcp.com",
"build_time": 8.5
},
"meta": {
"request_id": "req_789xyz",
"timestamp": "2023-12-01T12:00:00Z"
}
}
{
"name": "calculator",
"template": "basic",
"tools": [
{
"name": "add",
"description": "Add two numbers together",
"inputSchema": {
"type": "object",
"properties": {
"a": {"type": "number"},
"b": {"type": "number"}
}
}
}
]
}
{
"name": "user-data",
"template": "basic",
"resources": [
{
"uri": "user://profile",
"name": "User Profile",
"description": "Current user profile information"
},
{
"uri": "user://settings",
"name": "User Settings",
"description": "User application settings"
}
]
}