SDK & Integration
Connect to ShackleAI via MCP (recommended) or REST API. Copy-paste ready examples.
MCP Client Configuration
The recommended way to use ShackleAI. Your AI agent connects via MCP and discovers all installed tools automatically. One config, all tools.
# Add ShackleAI Gateway as an MCP server: claude mcp add shackleai \ --transport sse \ https://gateway.shackleai.com/mcp \ --header "Authorization: Bearer sk_shackle_YOUR_KEY" # Verify it's connected: claude mcp list
curl Examples
Quick testing from the terminal. Works with any tool.
curl https://shackleai.com/api/v1/tools \ -H "Authorization: Bearer sk_shackle_YOUR_KEY"
Python
Using the requests library. Install with pip install requests.
import requests
API_KEY = "sk_shackle_YOUR_KEY"
BASE = "https://shackleai.com/api/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}
# List available tools
tools = requests.get(f"{BASE}/tools", headers=headers).json()
print(f"You have {tools['count']} tools available")
# Store a memory
result = requests.post(
f"{BASE}/tools/memory_store/call",
headers=headers,
json={
"content": "Always use snake_case for database columns",
"category": "convention",
"importance": "high",
"tags": ["database", "naming"],
},
).json()
print(f"Stored: {result['data']}")
# Search memories
results = requests.post(
f"{BASE}/tools/memory_search/call",
headers=headers,
json={"query": "database conventions", "limit": 5},
).json()
for memory in results["data"].get("memories", []):
print(f"- {memory['content']}")TypeScript / Node.js
Using the built-in fetch API (Node 18+, Deno, Bun).
const API_KEY = "sk_shackle_YOUR_KEY";
const BASE = "https://shackleai.com/api/v1";
async function callTool(name: string, params: Record<string, unknown>) {
const res = await fetch(`${BASE}/tools/${name}/call`, {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(params),
});
return res.json();
}
// List tools
const { tools, count } = await fetch(`${BASE}/tools`, {
headers: { Authorization: `Bearer ${API_KEY}` },
}).then(r => r.json());
console.log(`${count} tools available`);
// Store a memory
const stored = await callTool("memory_store", {
content: "Always use snake_case for database columns",
category: "convention",
});
console.log("Stored:", stored.data);
// Search memories
const found = await callTool("memory_search", {
query: "database conventions",
limit: 5,
});
console.log("Found:", found.data);