Skip to main content
POST
/
wp-json
/
getmcp
/
v1
/
servers
/
{server_id}
/
tools
/
import-curl
curl --request POST \
     --url https://yoursite.com/wp-json/getmcp/v1/servers/2/tools/import-curl \
     --header 'Authorization: Bearer gmcp_your_api_key' \
     --header 'content-type: application/json' \
     --data '
{
  "curl_command": "curl -X POST https://api.stripe.com/v1/customers -H \"Authorization: Bearer sk_test_abc123\" -H \"Content-Type: application/x-www-form-urlencoded\" -d \"[email protected]\" -d \"name=John Doe\""
}
'
{
  "id": 12,
  "uuid": "7c4a1e3b-9f2d-4a8b-b5c6-0d1e2f3a4b5c",
  "server_id": 2,
  "name": "imported_tool",
  "description": "",
  "endpoint_url": "https://api.stripe.com/v1/customers",
  "http_method": "POST",
  "input_schema": {
    "type": "object",
    "properties": {
      "email": {
        "type": "string",
        "description": "email"
      },
      "name": {
        "type": "string",
        "description": "name"
      }
    },
    "required": []
  },
  "parameter_mapping": {
    "email": {"target": "body", "key": "email"},
    "name": {"target": "body", "key": "name"}
  },
  "response_mapping": {
    "selector": "",
    "format": "json",
    "template": ""
  },
  "headers": {
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "cache_ttl": 0,
  "timeout": 30,
  "rate_limit_per_min": 60,
  "retry_count": 0,
  "retry_backoff": "exponential",
  "sort_order": 0,
  "status": "draft",
  "tags": [],
  "last_tested_at": null,
  "last_test_response_ms": null,
  "server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
  "server_hex": "a1b2c3d4e5f6a1b2",
  "created_at": "2025-03-18T10:00:00",
  "updated_at": "2025-03-18T10:00:00",
  "_notice": "Auth credentials detected in cURL (bearer) and saved as Test Credentials only. To use this tool in production, configure Authentication in the server's Authentication tab."
}

Documentation Index

Fetch the complete documentation index at: https://docs.getmcp.com/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint accepts a raw curl command string, parses it, and automatically creates a new tool in the specified server with the extracted configuration. The tool is created with status draft so you can review and activate it from the dashboard.
The tool is created automatically — no second request needed. The response is the full created tool object, not just a parsed preview.
If auth credentials are detected in the cURL command (e.g. Authorization: Bearer sk_test_xxx), they are saved as Test Credentials only and a _notice field is added to the response. You must configure Production Authentication separately in the server’s Authentication tab.

Path Parameters

server_id
string
required
The UUID of the server the tool will belong to (e.g. 836995ae-1cff-41ec-823e-a4f07ccca3a0). Numeric IDs are also accepted for backwards compatibility.

Body Parameters

curl_command
string
required
The complete curl command string to parse.
curl --request POST \
     --url https://yoursite.com/wp-json/getmcp/v1/servers/2/tools/import-curl \
     --header 'Authorization: Bearer gmcp_your_api_key' \
     --header 'content-type: application/json' \
     --data '
{
  "curl_command": "curl -X POST https://api.stripe.com/v1/customers -H \"Authorization: Bearer sk_test_abc123\" -H \"Content-Type: application/x-www-form-urlencoded\" -d \"[email protected]\" -d \"name=John Doe\""
}
'
{
  "id": 12,
  "uuid": "7c4a1e3b-9f2d-4a8b-b5c6-0d1e2f3a4b5c",
  "server_id": 2,
  "name": "imported_tool",
  "description": "",
  "endpoint_url": "https://api.stripe.com/v1/customers",
  "http_method": "POST",
  "input_schema": {
    "type": "object",
    "properties": {
      "email": {
        "type": "string",
        "description": "email"
      },
      "name": {
        "type": "string",
        "description": "name"
      }
    },
    "required": []
  },
  "parameter_mapping": {
    "email": {"target": "body", "key": "email"},
    "name": {"target": "body", "key": "name"}
  },
  "response_mapping": {
    "selector": "",
    "format": "json",
    "template": ""
  },
  "headers": {
    "Content-Type": "application/x-www-form-urlencoded"
  },
  "cache_ttl": 0,
  "timeout": 30,
  "rate_limit_per_min": 60,
  "retry_count": 0,
  "retry_backoff": "exponential",
  "sort_order": 0,
  "status": "draft",
  "tags": [],
  "last_tested_at": null,
  "last_test_response_ms": null,
  "server_uuid": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
  "server_hex": "a1b2c3d4e5f6a1b2",
  "created_at": "2025-03-18T10:00:00",
  "updated_at": "2025-03-18T10:00:00",
  "_notice": "Auth credentials detected in cURL (bearer) and saved as Test Credentials only. To use this tool in production, configure Authentication in the server's Authentication tab."
}