Curl MCP server

Make HTTP requests to any URL using curl-like interface.
Back to servers
Provider
MCP Get
Release date
Dec 04, 2024
Language
TypeScript
Stats
41 stars

This MCP server allows Large Language Models to make HTTP requests to any URL using a curl-like interface. It provides an intuitive way for LLMs to interact with web services and APIs through a standardized HTTP client.

Installation

To install the curl server for MCP, run the following command:

npx @michaellatman/mcp-get@latest install @mcp-get-community/server-curl

Configuration

Add the server to your MCP configuration file:

{
  "mcpServers": {
    "@mcp-get-community/server-curl": {
      "runtime": "node",
      "command": "npx",
      "args": [
        "-y",
        "@mcp-get-community/server-curl"
      ]
    }
  }
}

Using the Curl Tool

The server provides a single tool called curl that enables HTTP communication with external services.

Parameters

The curl tool accepts the following parameters:

  • url (required): The URL to make the request to
  • method (optional): HTTP method to use (default: 'GET')
  • headers (optional): Object containing HTTP headers
  • body (optional): Request body for POST/PUT/PATCH requests
  • timeout (optional): Request timeout in milliseconds (default: 30000, max: 300000)

Example Request

Here's how to make a POST request with JSON data and custom headers:

{
  "url": "https://api.example.com/data",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer token123"
  },
  "body": "{\"key\": \"value\"}",
  "timeout": 5000
}

Response Format

The tool returns a structured response with the following fields:

{
  "status": 200,
  "statusText": "OK",
  "headers": {
    "content-type": "application/json",
    "server": "nginx"
  },
  "body": "{\"result\": \"success\"}"
}

Supported Features

  • All common HTTP methods (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
  • Custom request headers
  • Request body for applicable methods
  • Configurable timeout settings
  • Complete response information including status codes, headers, and body content

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later