Create MCP server

POST/tools/mcp-server/create
RequiresBearerauthentication

Body parameters

namestringrequired
mcp_server_urlstringrequired
Returns  

Response fields

successbooleanoptional
messagestringoptional
dataobjectoptional
idstringoptional
namestringoptional
descriptionstringoptional
mcp_server_urlstringoptional
mcp_serversobject[]optional
idstringoptional
namestringoptional
descriptionstringoptional
mcp_server_urlstringoptional
mcp_server_toolsobject[]optional
idstringoptional
namestringoptional
descriptionstringoptional
input_schemaobjectoptional
mcp_server_idstringoptional
mcp_server_urlstringoptional
POSTRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X POST "https://experiment.app.pheno.ml/tools/mcp-server/create" \
  -H "Authorization: Bearer $PHENOML_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My MCP Server",
  "mcp_server_url": "https://mcp.example.com"
}'
200 OKExample Response
{
  "success": true,
  "message": "MCP Server and Tools created successfully",
  "mcp_servers": [
    {
      "id": "123",
      "name": "My MCP Server",
      "description": "My MCP Server is a server that provides MCP services",
      "mcp_server_url": "https://mcp.example.com"
    }
  ],
  "mcp_server_tools": [
    {
      "id": "tool-001",
      "name": "search_endpoints",
      "description": "Search across the documented endpoints",
      "input_schema": {
        "query": "string"
      },
      "mcp_server_id": "123",
      "mcp_server_url": "https://mcp.example.com"
    },
    {
      "id": "tool-002",
      "name": "get_endpoint",
      "description": "Fetch a single endpoint by ID",
      "input_schema": {
        "endpoint_id": "string"
      },
      "mcp_server_id": "123",
      "mcp_server_url": "https://mcp.example.com"
    }
  ]
}