postmanmodel-context-protocol

How to sending BODY content to MCP Server?


I have been send a URL to an MCP server and I am just testing using POSTMAN's MCP Client testing ability.

When I've connected to the server, I get the "TOOLS" list, and once I select the one I need, a sample request is generated with a property called arguments.

{
  "method": "tools/call",
  "params": {
    "name": "initiateSearchAndReturnResults",
    "arguments": {
    }
  }
}

The underlying API of the MCP Server is a POST endpoint and requires BODY content for its request.

How can I supply BODY content, either in the arguments section, or whatever mechanism is expected.


Solution

  • Whatever parameter is expected by the tool, You pass it within the arguments section.

    The below is a basic create_workflow tool call for N8N

    {
      "jsonrpc": "2.0",
      "id": 4,
      "method": "tools/call",
      "params": {
        "name": "n8n_create_workflow",
        "arguments": {
          "name": "Test MCP Workflow",
          "nodes": [
            {
              "id": "start-node",
              "name": "Start",
              "type": "n8n-nodes-base.start",
              "typeVersion": 1,
              "position": [
                240,
                300
              ],
              "parameters": {}
            },
            {
              "id": "set-node",
              "name": "Set Values",
              "type": "n8n-nodes-base.set",
              "typeVersion": 1,
              "position": [
                440,
                300
              ],
              "parameters": {
                "values": {
                  "string": [
                    {
                      "name": "message",
                      "value": "Hello from MCP!"
                    }
                  ]
                }
              }
            }
          ],
          "connections": {
            "Start": {
              "main": [
                [
                  {
                    "node": "Set Values",
                    "type": "main",
                    "index": 0
                  }
                ]
              ]
            }
          }
        }
      }
    }
    

    To provide more details, more details about the tool would be required.

    As long as the tool you are trying to call expects its parameters inside the arguments, you just need to structure your payload accordingly.

    If you're unsure what arguments are required, you can try calling tools/get_tool or tools/list, you can generally find metadata or examples for the available tools.