Get Started
This page helps you get started with the MCPStudio JavaScript editor and shows the fastest workflow from first file to test run.
Use the file browser on the left as your main navigation. Create topic-based folders so scripts stay easy to find.
Implement one handler, then test it. This makes debugging much faster than running large changes at once.
The log panel is your most important debugging source. Keep it open while developing.
The central entry function is toolEntry(sid, handlerName, jsonParams).
function toolEntry(sid, handlerName, jsonParams) {
try {
const params = JSON.parse(jsonParams || "{}");
if (handlerName === "ping") {
return JSON.stringify({ ok: true, sid: sid, input: params });
}
return JSON.stringify({ error: "Unknown handler: " + handlerName });
} catch (e) {
return JSON.stringify({ error: e.message });
}
}
Start with a small handler like ping and expand step by step.