Invoke MCP JSON-RPC endpoint
Main MCP JSON-RPC endpoint.
Supports:
- Single JSON-RPC request objects
- Batch JSON-RPC request arrays
- Server-Sent Events when
Accept: text/event-streamis sent
Authentication rules:
- No authentication required for
initialize,tools/list, andping - Authentication required for
tools/call - Bearer tokens may be API keys with the
nf_prefix or OAuth access tokens with themcp_at_prefix
curl -X POST "https://api.example.com/mcp-server/" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (API key or OAuth access token)" \
-d '{
"jsonrpc": "2.0",
"id": "req_1",
"method": "tools/list",
"params": {}
}'
import requests
import json
url = "https://api.example.com/mcp-server/"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (API key or OAuth access token)"
}
data = {
"jsonrpc": "2.0",
"id": "req_1",
"method": "tools/list",
"params": {}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.example.com/mcp-server/", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (API key or OAuth access token)"
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": "req_1",
"method": "tools/list",
"params": {}
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"jsonrpc": "2.0",
"id": "req_1",
"method": "tools/list",
"params": {}
}`)
req, err := http.NewRequest("POST", "https://api.example.com/mcp-server/", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (API key or OAuth access token)")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.example.com/mcp-server/')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (API key or OAuth access token)'
request.body = '{
"jsonrpc": "2.0",
"id": "req_1",
"method": "tools/list",
"params": {}
}'
response = http.request(request)
puts response.body
{
"jsonrpc": "2.0",
"id": "req_1",
"result": {
"content": [
{
"type": "text",
"text": "Tool completed successfully."
}
],
"structuredContent": {
"filingId": "filing_123",
"status": "completed"
}
}
}
{
"jsonrpc": "2.0",
"id": "req_1",
"result": {
"isError": true,
"content": [
{
"type": "text",
"text": "Missing required filing identifier."
}
]
}
}
{}
{
"jsonrpc": "2.0",
"id": null,
"error": {
"code": -32700,
"message": "Parse error"
}
}
{
"jsonrpc": "2.0",
"id": "req_1",
"error": {
"code": -32001,
"message": "Unauthorized"
}
}
{
"jsonrpc": "2.0",
"id": "req_1",
"error": {
"code": -32601,
"message": "Method not found"
}
}
POST
/
POST
Base URLstring
Target server for requests. Edit to use your own host.
Bearer Token (API key or OAuth access token)
Bearer Tokenstring
RequiredBearer authentication using Nomadfiling API keys with the nf_ prefix or OAuth access tokens with the mcp_at_ prefix.
Bearer authentication using Nomadfiling API keys with the
nf_ prefix or OAuth access tokens with the mcp_at_ prefix.Content-Typestring
RequiredThe media type of the request body
Options: application/json
No request body parameters defined
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token (API key or OAuth access token). Bearer authentication using Nomadfiling API keys with the nf_ prefix or OAuth access tokens with the mcp_at_ prefix.
Body
application/json
datastring
RequiredRaw application/json data
Responses
jsonrpcstring
RequiredAllowed values:
2.0idstring
RequiredRequest identifier copied from the request.
resultobject
RequiredWas this page helpful?