Execute MCP request (API Key)
curl --request POST \
--url https://mcp.runalloy.com/mcp/{serverId} \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'x-alloy-userid: <x-alloy-userid>' \
--data '
{
"jsonrpc": "2.0",
"id": "<string>",
"params": {}
}
'import requests
url = "https://mcp.runalloy.com/mcp/{serverId}"
payload = {
"jsonrpc": "2.0",
"id": "<string>",
"params": {}
}
headers = {
"Content-Type": "<content-type>",
"Accept": "<accept>",
"x-alloy-userid": "<x-alloy-userid>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Content-Type': '<content-type>',
Accept: '<accept>',
'x-alloy-userid': '<x-alloy-userid>',
Authorization: 'Bearer <token>'
},
body: JSON.stringify({jsonrpc: '2.0', id: '<string>', params: {}})
};
fetch('https://mcp.runalloy.com/mcp/{serverId}', 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://mcp.runalloy.com/mcp/{serverId}",
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' => '<string>',
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"x-alloy-userid: <x-alloy-userid>"
],
]);
$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://mcp.runalloy.com/mcp/{serverId}"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"<string>\",\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("x-alloy-userid", "<x-alloy-userid>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mcp.runalloy.com/mcp/{serverId}")
.header("Content-Type", "<content-type>")
.header("Accept", "<accept>")
.header("x-alloy-userid", "<x-alloy-userid>")
.header("Authorization", "Bearer <token>")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"<string>\",\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mcp.runalloy.com/mcp/{serverId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Accept"] = '<accept>'
request["x-alloy-userid"] = '<x-alloy-userid>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": \"<string>\",\n \"params\": {}\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {},
"error": {
"code": 123,
"message": "<string>"
},
"id": "<string>"
}MCP Protocol
Execute MCP request (API Key)
Execute MCP protocol operations using API key authentication. Requires authentication headers.
POST
/
mcp
/
{serverId}
Execute MCP request (API Key)
curl --request POST \
--url https://mcp.runalloy.com/mcp/{serverId} \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'x-alloy-userid: <x-alloy-userid>' \
--data '
{
"jsonrpc": "2.0",
"id": "<string>",
"params": {}
}
'import requests
url = "https://mcp.runalloy.com/mcp/{serverId}"
payload = {
"jsonrpc": "2.0",
"id": "<string>",
"params": {}
}
headers = {
"Content-Type": "<content-type>",
"Accept": "<accept>",
"x-alloy-userid": "<x-alloy-userid>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Content-Type': '<content-type>',
Accept: '<accept>',
'x-alloy-userid': '<x-alloy-userid>',
Authorization: 'Bearer <token>'
},
body: JSON.stringify({jsonrpc: '2.0', id: '<string>', params: {}})
};
fetch('https://mcp.runalloy.com/mcp/{serverId}', 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://mcp.runalloy.com/mcp/{serverId}",
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' => '<string>',
'params' => [
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"x-alloy-userid: <x-alloy-userid>"
],
]);
$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://mcp.runalloy.com/mcp/{serverId}"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"<string>\",\n \"params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("x-alloy-userid", "<x-alloy-userid>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mcp.runalloy.com/mcp/{serverId}")
.header("Content-Type", "<content-type>")
.header("Accept", "<accept>")
.header("x-alloy-userid", "<x-alloy-userid>")
.header("Authorization", "Bearer <token>")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"<string>\",\n \"params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mcp.runalloy.com/mcp/{serverId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Accept"] = '<accept>'
request["x-alloy-userid"] = '<x-alloy-userid>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": \"<string>\",\n \"params\": {}\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"result": {},
"error": {
"code": 123,
"message": "<string>"
},
"id": "<string>"
}Authorizations
Use either an Alloy API key or JWT token
Headers
Request content type
Response format - must include text/event-stream for MCP
User ID
JWT token for user isolation (optional)
Specific credential to use (optional)
OAuth redirect URI for credential creation (optional)
Path Parameters
Server ID
Body
application/json
⌘I

