Skip to main content
Glama
Curl MCP Server

Curl MCP Server

by gabry848

Curl MCP Server

Un server MCP (Model Context Protocol) che fornisce strumenti HTTP/HTTPS completi utilizzando curl. Questo server consente di eseguire richieste HTTP con supporto per vari metodi di autenticazione, upload di file, download e comandi curl personalizzati.

Caratteristiche

  • Richieste HTTP complete: GET, POST, PUT, PATCH, DELETE, HEAD

  • Autenticazione multipla: Bearer Token, Basic Auth, Digest Auth, OAuth2, API Key, Custom Headers

  • Upload e Download di file: Caricamento e scaricamento di file tramite HTTP

  • Cookie Jar: Gestione persistente dei cookie per mantenere sessioni HTTP

  • Comandi curl personalizzati: Esecuzione di comandi curl con controllo completo

  • Test di autenticazione: Verifica delle credenziali di accesso

  • Configurazione avanzata: Timeout, redirect, SSL/TLS, headers personalizzati

Related MCP server: curl-mcp

Installazione

  1. Clona o scarica il progetto

  2. Installa le dipendenze:

npm install

Installazione globale per utilizzo con npx

Per utilizzare il server con npx, puoi:

  1. Installare localmente e linkare:

npm link
  1. Pubblicare su npm (se vuoi condividerlo):

npm publish
  1. Utilizzare direttamente da una cartella locale:

npm pack
npm install -g ./curl-mcp-server-1.0.0.tgz

Strumenti Disponibili

1. http_get

Esegue richieste HTTP GET

  • Parametri: url, headers, auth, timeout, followRedirects, insecure, cookieJar

2. http_post

Esegue richieste HTTP POST

  • Parametri: url, data, headers, auth, contentType, timeout, followRedirects, insecure, cookieJar

3. http_put

Esegue richieste HTTP PUT

  • Parametri: url, data, headers, auth, contentType, timeout, followRedirects, insecure, cookieJar

4. http_delete

Esegue richieste HTTP DELETE

  • Parametri: url, headers, auth, timeout, followRedirects, insecure, cookieJar

5. http_patch

Esegue richieste HTTP PATCH

  • Parametri: url, data, headers, auth, contentType, timeout, followRedirects, insecure, cookieJar

6. http_head

Esegue richieste HTTP HEAD

  • Parametri: url, headers, auth, timeout, followRedirects, insecure, cookieJar

7. curl_custom

Esegue comandi curl personalizzati

  • Parametri: args (array di argomenti curl)

8. http_upload

Carica file tramite HTTP POST

  • Parametri: url, filePath, fieldName, headers, auth, timeout, insecure, cookieJar

9. http_download

Scarica file tramite HTTP GET

  • Parametri: url, outputPath, headers, auth, timeout, followRedirects, insecure, cookieJar

10. auth_test

Testa i metodi di autenticazione

  • Parametri: url, auth, timeout, insecure

Metodi di Autenticazione Supportati

Bearer Token

{
  "type": "bearer",
  "token": "your-jwt-token"
}

Basic Authentication

{
  "type": "basic",
  "username": "user",
  "password": "password"
}

Digest Authentication

{
  "type": "digest",
  "username": "user",
  "password": "password"
}

OAuth2 Token

{
  "type": "oauth2",
  "token": "your-oauth2-token"
}

API Key in Header

{
  "type": "api_key",
  "key": "X-API-Key",
  "value": "your-api-key"
}

Custom Authorization

{
  "type": "custom",
  "header": "Authorization: Custom token123"
}

Il server supporta la gestione persistente dei cookie tramite cookie jar, utile per mantenere sessioni HTTP tra più richieste.

Utilizzo

Specifica il parametro cookieJar con il percorso di un file che verrà usato per salvare e caricare i cookie:

{
  "tool": "http_get",
  "arguments": {
    "url": "https://example.com/api/protected",
    "cookieJar": "/tmp/session-cookies.txt"
  }
}

Il cookie jar:

  • Salva automaticamente i cookie ricevuti dal server

  • Riutilizza i cookie nelle richieste successive

  • Permette di mantenere sessioni autenticate senza dover passare token ad ogni richiesta

  • È compatibile con il formato Netscape cookie file usato da curl

Configurazione per Client MCP

Per Claude Desktop (con npx)

Aggiungi questa configurazione al file di configurazione di Claude Desktop per utilizzare il server tramite npx:

{
  "mcpServers": {
    "curl-mcp": {
      "command": "npx",
      "args": [
        "curl-mcp-server"
      ]
    }
  }
}

Per Claude Desktop (locale)

Aggiungi questa configurazione al file di configurazione di Claude Desktop per utilizzare il server locale:

{
  "mcpServers": {
    "curl-mcp": {
      "command": "node",
      "args": ["e:\\MCP_servers\\curl-mcp\\index.js"],
      "env": {}
    }
  }
}

Per altri client MCP

Usa la configurazione seguente:

{
  "name": "curl-mcp-server",
  "version": "1.0.0",
  "command": "node",
  "args": ["percorso/assoluto/al/index.js"],
  "transport": "stdio"
}

Esempi di Utilizzo

Richiesta GET semplice

// Attraverso il client MCP
{
  "tool": "http_get",
  "arguments": {
    "url": "https://api.example.com/data"
  }
}

Richiesta POST con autenticazione Bearer

{
  "tool": "http_post",
  "arguments": {
    "url": "https://api.example.com/data",
    "data": "{\"name\": \"test\"}",
    "auth": {
      "type": "bearer",
      "token": "your-jwt-token"
    },
    "headers": {
      "Content-Type": "application/json"
    }
  }
}

Upload di file

{
  "tool": "http_upload",
  "arguments": {
    "url": "https://api.example.com/upload",
    "filePath": "/path/to/file.jpg",
    "fieldName": "image",
    "auth": {
      "type": "api_key",
      "key": "X-API-Key",
      "value": "your-api-key"
    }
  }
}

Comando curl personalizzato

{
  "tool": "curl_custom",
  "arguments": {
    "args": ["-X", "PATCH", "-H", "Content-Type: application/json", "-d", "{\"status\": \"active\"}", "https://api.example.com/users/123"]
  }
}

Risorse Disponibili

Il server fornisce risorse informative accessibili tramite:

  • http://info/tools - Lista degli strumenti disponibili

  • http://info/auth - Tipi di autenticazione supportati

  • http://info/examples - Esempi di utilizzo dell'autenticazione

Avvio del Server

Modalità normale

npm start

Modalità sviluppo (con watch)

npm run dev

Requisiti di Sistema

  • Node.js 18 o superiore

  • curl installato e disponibile nel PATH del sistema

  • Accesso di rete per le richieste HTTP/HTTPS

Sicurezza

  • Tutti i comandi curl sono eseguiti in modo sicuro utilizzando spawn

  • Supporto per SSL/TLS con opzione per connessioni insicure quando necessario

  • Validazione degli input tramite schema Zod

  • Gestione degli errori per prevenire crash del server

Troubleshooting

Errore "curl: command not found"

Assicurati che curl sia installato e disponibile nel PATH:

  • Windows: Installa curl o usa Windows Subsystem for Linux

  • macOS: curl è preinstallato

  • Linux: sudo apt-get install curl (Ubuntu/Debian) o equivalente

Timeout delle richieste

Aumenta il valore del timeout nei parametri degli strumenti se necessario (default: 30 secondi per la maggior parte delle operazioni, 60 per upload, 300 per download).

Problemi SSL/TLS

Usa il parametro insecure: true per bypassare la verifica dei certificati SSL (solo per testing).

Licenza

MIT License - Vedi il file LICENSE per i dettagli.

Available Tools

10 tools
auth_testC

Test different authentication methods with a simple GET request

Inputs: url (required), auth (required), timeout, insecure.

curl_customC

Execute a custom curl command with full control over parameters

Inputs: args (required).

http_deleteC

Perform an HTTP DELETE request using curl

Inputs: url (required), auth, headers, timeout, +2 more.

http_downloadC

Download a file using curl

Inputs: url (required), outputPath (required), auth, headers, +3 more.

http_getB

Perform an HTTP GET request using curl

Inputs: url (required), auth, headers, timeout, +2 more.

http_headC

Perform an HTTP HEAD request using curl

Inputs: url (required), auth, headers, timeout, +2 more.

http_patchC

Perform an HTTP PATCH request using curl

Inputs: url (required), auth, data, headers, +4 more.

http_postC

Perform an HTTP POST request using curl

Inputs: url (required), auth, data, headers, +4 more.

http_putC

Perform an HTTP PUT request using curl

Inputs: url (required), auth, data, headers, +4 more.

http_uploadC

Upload a file using HTTP POST with curl

Inputs: url (required), filePath (required), auth, headers, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 10 tools

    Disambiguation4/5

    The HTTP verb tools (http_get, http_post, http_put, http_delete, http_patch, http_head) are clearly distinct by method. http_upload overlaps somewhat with http_post and http_download with http_get, and curl_custom duplicates the entire surface as a catch-all, but the descriptions clarify intent well enough.

    Naming Consistency4/5

    Most tools follow a clear http_<method> snake_case pattern. http_upload, http_download, auth_test, and curl_custom deviate from that pattern but remain readable and consistently snake_case, so the set is coherent.

    Tool Count5/5

    Ten tools is well-scoped for a curl wrapper: one per HTTP method plus targeted helpers for upload, download, auth testing, and a custom escape hatch.

    Completeness4/5

    The surface covers all common HTTP methods plus file transfer and auth testing, and curl_custom fills any remaining gaps like OPTIONS/TRACE or exotic flags. Minor overlap rather than a true missing capability.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a structured HTTP client tool for making web requests with full HTTP method support, detailed response metadata, and error handling. Enables AI assistants to interact with any web API or endpoint through the curl_request tool.
      5 npm
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables LLMs to make HTTP requests using structured cURL commands with support for multiple authentication methods, custom headers, and comprehensive request/response control.
      2
      8 npm
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides HTTP client capabilities with browser impersonation for Chrome, Firefox, Safari, and Edge across multiple operating systems. It enables tools for making authenticated web requests, handling multipart file uploads, and retrieving responses in various formats.
      MIT