Integration
Aartiq Integration
How to bring RTQ into an Aartiq-style federated MCP application.
Architecture
Aartiq App → MCP Bridge → RTQ Runtime
↓
Capability Registry
→ Risk Engine
→ Policy Rules
→ Sandbox (OS-native)
→ Audit Log
↓
Capability Registry
→ Risk Engine
→ Policy Rules
→ Sandbox (OS-native)
→ Audit Log
Integration Steps
1
Install RTQ packages
npm install @rtq/security @rtq/core @rtq/risk @rtq/policy @rtq/approval @rtq/sandbox @rtq/audit
2
Initialize RTQ runtime
const rtq = createRTQ({ signingKey, sandbox: 'auto' });
3
Register MCP tool capabilities
For each MCP tool, register an RTQ capability with appropriate risk level and input schema.
4
Wrap MCP bridge calls
Before executing any MCP tool call, route through RTQ's pipeline: capability → risk → policy → approval → execute.
5
Configure approval for high-risk tools
Tools that access filesystem, network, or system resources should require human approval via QR/mobile.
6
Enable audit logging
All RTQ pipeline events are emitted as structured audit events with redacted secrets.
Example: Wrapping an MCP Tool
// Register the MCP file-read tool as an RTQ capability
rtq.registerCapability({
name: "mcp.files.read",
version: 1,
inputSchema: { /* MCP tool input schema */ },
risk: { base: "low" },
execute: async (ctx, input) => {
// Call the actual MCP tool
return await mcpClient.callTool("read_file", input);
},
});
// Now every call goes through RTQ pipeline
const result = await rtq.execute("mcp.files.read", { path: "./config.json" });
rtq.registerCapability({
name: "mcp.files.read",
version: 1,
inputSchema: { /* MCP tool input schema */ },
risk: { base: "low" },
execute: async (ctx, input) => {
// Call the actual MCP tool
return await mcpClient.callTool("read_file", input);
},
});
// Now every call goes through RTQ pipeline
const result = await rtq.execute("mcp.files.read", { path: "./config.json" });