Skip to main content

Overview

The cURL Import feature lets you create tool configurations instantly from curl commands. Instead of manually filling in the URL, method, headers, and body, paste a curl command and GetMCP parses it automatically. This is useful when:
  • You have a working curl command from an API’s documentation
  • You’ve captured a request from your browser’s developer tools
  • You’re migrating existing API integrations to GetMCP
cURL Import Dialog

How to Use

1

Open the Tool Editor

Navigate to your server’s Tools tab and click Add Tool, or click the Import from cURL button directly.
2

Paste the cURL Command

Paste your curl command into the import dialog. Example:
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=customer@example.com" \
  -d "name=John Doe"
3

Review Parsed Fields

GetMCP extracts and populates:
  • Endpoint URL — from the curl URL
  • HTTP Method — from -X flag (defaults to GET)
  • Headers — from all -H flags
  • Auth Type — auto-detected from Authorization header
  • Body — from -d or --data flags
4

Adjust and Save

Review the parsed configuration, adjust any fields as needed, and save the tool.

What Gets Parsed

curl ElementTool FieldNotes
URLEndpoint URLIncluding query parameters
-X METHODHTTP MethodDefaults to GET if omitted
-H "Key: Value"HeadersAll headers extracted
-H "Authorization: Bearer token"Auth Type + CredentialsAuto-detects bearer tokens
-H "Authorization: Basic base64"Auth Type + CredentialsAuto-detects basic auth
-d "key=value"Request BodyForm-encoded data
-d '{"json": "body"}'Request BodyJSON body
--data-urlencodeRequest BodyURL-encoded data
--user user:passAuth (Basic)Basic auth credentials

Authentication Detection

GetMCP automatically detects common authentication patterns:
PatternDetected As
Authorization: Bearer <token>Bearer token auth
Authorization: Basic <base64>Basic auth (decoded)
Authorization: ApiKey <key>API key in header
X-API-Key: <key>API key in header
?api_key=<key> in URLAPI key in query param
Detected credentials are populated into the tool’s auth configuration.

Parse-Only API

The cURL import is also available via the REST API for programmatic use:
POST /wp-json/getmcp/v1/tools/import-curl

{
  "curl": "curl -X GET https://api.example.com/data -H 'Authorization: Bearer token123'"
}
This returns the parsed tool configuration without creating a tool. Useful for building custom integrations.

Tips

Copy curl commands directly from your browser’s developer tools (Network tab → right-click request → Copy as cURL). This captures the exact headers and authentication used by the website.
After import, replace hardcoded values with input parameters. For example, if the URL has ?user_id=123, create a user_id parameter and map it as a query parameter.
Never paste curl commands containing production API credentials into shared environments. Use test/sandbox credentials when importing.