curl --request POST \
--url https://www.getprescience.com/api/partner/v1/mcp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "fit_check",
"arguments": {
"state": "CA",
"employees": 24,
"quotingMetals": [
"platinum"
]
}
}
}
'import requests
url = "https://www.getprescience.com/api/partner/v1/mcp"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "fit_check",
"arguments": {
"state": "CA",
"employees": 24,
"quotingMetals": ["platinum"]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'tools/call',
params: {
name: 'fit_check',
arguments: {state: 'CA', employees: 24, quotingMetals: ['platinum']}
}
})
};
fetch('https://www.getprescience.com/api/partner/v1/mcp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.getprescience.com/api/partner/v1/mcp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'tools/call',
'params' => [
'name' => 'fit_check',
'arguments' => [
'state' => 'CA',
'employees' => 24,
'quotingMetals' => [
'platinum'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.getprescience.com/api/partner/v1/mcp"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"fit_check\",\n \"arguments\": {\n \"state\": \"CA\",\n \"employees\": 24,\n \"quotingMetals\": [\n \"platinum\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.getprescience.com/api/partner/v1/mcp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"fit_check\",\n \"arguments\": {\n \"state\": \"CA\",\n \"employees\": 24,\n \"quotingMetals\": [\n \"platinum\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getprescience.com/api/partner/v1/mcp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"fit_check\",\n \"arguments\": {\n \"state\": \"CA\",\n \"employees\": 24,\n \"quotingMetals\": [\n \"platinum\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{\"fit\":\"strong\"}"
}
],
"structuredContent": {
"fit": "strong",
"reasons": [
"The client is looking at gold or platinum, where Prescience's lower out-of-pocket maxes and HSA eligibility compare best.",
"CA is a strong state for Prescience.",
"24 employees is in the best range (5 to 50)."
]
}
}
}{
"error": "invalid_request",
"message": "<string>",
"details": [
{
"field": "zip",
"message": "zip must be a 5-digit ZIP code",
"index": 7
}
]
}{
"error": "unauthorized",
"message": "Provide a valid partner API key as `Authorization: Bearer psk_...`."
}{
"error": "live_mode_disabled",
"message": "Live mode is not enabled for this account yet. Complete the go-live checklist to enable live keys."
}{
"error": "rate_limited",
"message": "Too many requests. Please retry later."
}{
"error": "server_error",
"message": "Internal error. The request was not applied."
}MCP server
The broker MCP server: Model Context Protocol over Streamable HTTP, in stateless mode. Each request is one JSON-RPC 2.0 message (batches are not supported); GET returns 405. Supported methods: initialize, ping, tools/list, tools/call, resources/list and resources/read. Authenticate with the same partner Bearer key as the REST API. The tools are fit_check, quote_group, price_on_plan, get_quote, list_groups, get_group, get_plan_details and submit_elections; a key can call a tool only when it holds the tool’s capability. The agent README is the resource prescience://broker/readme. See the MCP server guide for each tool’s input and output. A JSON-RPC notification (no id) returns 202 with no body.
curl --request POST \
--url https://www.getprescience.com/api/partner/v1/mcp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "fit_check",
"arguments": {
"state": "CA",
"employees": 24,
"quotingMetals": [
"platinum"
]
}
}
}
'import requests
url = "https://www.getprescience.com/api/partner/v1/mcp"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "fit_check",
"arguments": {
"state": "CA",
"employees": 24,
"quotingMetals": ["platinum"]
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'tools/call',
params: {
name: 'fit_check',
arguments: {state: 'CA', employees: 24, quotingMetals: ['platinum']}
}
})
};
fetch('https://www.getprescience.com/api/partner/v1/mcp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.getprescience.com/api/partner/v1/mcp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'tools/call',
'params' => [
'name' => 'fit_check',
'arguments' => [
'state' => 'CA',
'employees' => 24,
'quotingMetals' => [
'platinum'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.getprescience.com/api/partner/v1/mcp"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"fit_check\",\n \"arguments\": {\n \"state\": \"CA\",\n \"employees\": 24,\n \"quotingMetals\": [\n \"platinum\"\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.getprescience.com/api/partner/v1/mcp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"fit_check\",\n \"arguments\": {\n \"state\": \"CA\",\n \"employees\": 24,\n \"quotingMetals\": [\n \"platinum\"\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getprescience.com/api/partner/v1/mcp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"fit_check\",\n \"arguments\": {\n \"state\": \"CA\",\n \"employees\": 24,\n \"quotingMetals\": [\n \"platinum\"\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{\"fit\":\"strong\"}"
}
],
"structuredContent": {
"fit": "strong",
"reasons": [
"The client is looking at gold or platinum, where Prescience's lower out-of-pocket maxes and HSA eligibility compare best.",
"CA is a strong state for Prescience.",
"24 employees is in the best range (5 to 50)."
]
}
}
}{
"error": "invalid_request",
"message": "<string>",
"details": [
{
"field": "zip",
"message": "zip must be a 5-digit ZIP code",
"index": 7
}
]
}{
"error": "unauthorized",
"message": "Provide a valid partner API key as `Authorization: Bearer psk_...`."
}{
"error": "live_mode_disabled",
"message": "Live mode is not enabled for this account yet. Complete the go-live checklist to enable live keys."
}{
"error": "rate_limited",
"message": "Too many requests. Please retry later."
}{
"error": "server_error",
"message": "Internal error. The request was not applied."
}Authorizations
Partner API key. psk_test_<32 hex> for test mode, psk_live_<32 hex> for live mode. Store them in your secrets manager on issue. Live keys are shown once; the scoped partner portal can show an active sandbox key again.