EXAMPLES
Runnable Examples
Two practical examples: inspect a public server, then trigger and observe a kill.
Example 1: Inspect a Public MCP Server
Register a public MCP server through DigitalPipe and watch calls appear in your dashboard.
1. Register the server via API
curl -X POST https://app.digitalpipe.net/api/servers \
-H "Authorization: Bearer dp_live_your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "example-docs-server",
"url": "https://example.com/mcp",
"inspection_mode": "sampled"
}'2. Get your proxy endpoint
{
"id": "srv_xxxxx",
"name": "example-docs-server",
"proxy_url": "https://your-account.proxy.digitalpipe.net?server=https://example.com/mcp"
}3. Configure your MCP client
{
"mcpServers": {
"example-docs": {
"url": "https://your-account.proxy.digitalpipe.net?server=https://example.com/mcp"
}
}
}4. Watch in Dashboard
Open your dashboard at app.digitalpipe.net. The first call appears instantly — request payload, response, latency, and tool names all visible in the call log.
Example 2: Trigger and Observe a Kill
Fire calls at a server, kill the connection from the dashboard, then observe the blocked response.
1. Set up a test script
import { Client } from "@modelcontextprotocol/sdk/client";
const client = new Client({ name: "kill-test", version: "1.0.0" }, {
baseUrl: "https://your-account.proxy.digitalpipe.net?server=https://example.com/mcp",
headers: { "Authorization": "Bearer dp_live_your-api-key" }
});
async function fireCalls() {
await client.connect();
for (let i = 0; i < 5; i++) {
const result = await client.callTool({ name: "test-tool", arguments: {} });
console.log("Call", i + 1, "result:", result);
await new Promise(r => setTimeout(r, 1000));
}
}
fireCalls().catch(console.error);2. Start the script
node test-script.js
# Call 1 result: { content: [...] }
# Call 2 result: { content: [...] }Script is running, calls going through...
3. Kill from Dashboard
While the script is running, go to app.digitalpipe.net → your server → click KILL on the active connection. The connection terminates immediately.
4. Observe blocked response
node test-script.js
# Call 1 result: { content: [...] }
# Call 2 result: { content: [...] }
# Call 3 result: Error: connection killed
# Call 4 result: Error: connection killed
# Call 5 result: Error: connection killedAfter the kill, subsequent calls immediately return an error. The audit log records each kill event with timestamp and reason.
Cleanup: Remember to remove test servers from your registry when done. Active servers appear in your dashboard until deleted.
