Part 1: JSON-RPC Framework Parameters
Standard JSON-RPC 2.0 protocol parameters for the MCP endpoint
Overview
The MCP endpoint uses the JSON-RPC 2.0 protocol, which provides a standardized structure for making remote procedure calls. This section covers the framework parameters that are required for every request.
Required Parameters
1. jsonrpc
- Type:
string
- Required: Yes
- Value: Must always be
"2.0"
- Description: Identifies the JSON-RPC protocol version
2. id
- Type:
integer
- Required: Yes
- Example:
1
,2
,3
, etc. - Description: Request identifier that will be echoed back in the response. This helps match requests with their corresponding responses, especially when making multiple concurrent requests.
3. method
- Type:
string
- Required: Yes
- Value: Must be
"tools/call"
- Description: Specifies the RPC method to invoke. For the MCP endpoint, this is always
"tools/call"
.
4. params
- Type:
object
- Required: Yes
- Description: Container object that holds the tool-specific parameters. The structure of this object depends on which tool you’re calling.
Complete Structure
Here’s the complete JSON-RPC framework structure:
Important Notes
-
Fixed Values: The
jsonrpc
andmethod
parameters have fixed values that never change. -
Request Tracking: The
id
parameter is crucial for tracking requests. You should increment it for each new request to distinguish between different calls. -
Params Container: The
params
object is where the actual tool configuration goes. This is covered in Part 2: Tool-Specific Parameters.
Example Request
Response Format
The response will maintain the same JSON-RPC structure:
Or in case of an error:
Next Steps
Once you understand the JSON-RPC framework parameters, proceed to Part 2: Tool-Specific Parameters to learn about the different tools you can call and their specific parameter requirements.