A first application is about fifteen lines
Point a fetch at your own host and read the tool catalog back:
const res = await fetch("https://<your-host>/mcp", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "tools/list",
}),
});
const { result } = await res.json();
console.log(result.tools.map((t) => t.name));
Swap tools/list for tools/call with {"name": "aida_list_projects", "arguments": {}} and you have your matters.