Plain HTTP+JSON with Bearer auth. Anything that can fetch can drive it.
Three calls cover everything
# Health (no auth)
GET https://mcp.vlozi.app/health
# Tool discovery
GET https://mcp.vlozi.app/tools
Authorization: Bearer ls_xxx
# Tool invocation
POST https://mcp.vlozi.app/tools/<namespace>.<name>
Authorization: Bearer ls_xxx
content-type: application/json
x-agent-id: <your-agent> (optional, recommended)
<JSON body matching inputSchema>TypeScript / JavaScript
async function callTool<T = unknown>(name: string, input: Record<string, unknown> = {}): Promise<T> {
const res = await fetch(`https://mcp.vlozi.app/tools/${name}`, {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.VLOZI_API_KEY}`,
"content-type": "application/json",
"x-agent-id": "my-agent",
},
body: JSON.stringify(input),
});
const json = await res.json();
if (!res.ok || json.error) {
throw Object.assign(new Error(json.error?.message ?? res.statusText), {
code: json.error?.code,
status: res.status,
});
}
return json.data as T;
}
const { posts } = await callTool<{ posts: any[] }>("blog.list_posts", { limit: 5 });Python
import os, requests
def call_tool(name, **input):
r = requests.post(
f"https://mcp.vlozi.app/tools/{name}",
headers={
"Authorization": f"Bearer {os.environ['VLOZI_API_KEY']}",
"x-agent-id": "my-py-agent",
},
json=input,
)
r.raise_for_status()
body = r.json()
if body.get("error"):
raise RuntimeError(body["error"]["message"])
return body["data"]
posts = call_tool("blog.list_posts", status="published", limit=5)["posts"]curl
curl -X POST https://mcp.vlozi.app/tools/blog.list_posts \
-H "Authorization: Bearer $VLOZI_API_KEY" \
-H "content-type: application/json" \
-H "x-agent-id: cli-agent" \
-d '{"status": "published", "limit": 5}'Any language with an HTTP library follows the same shape — set the header, POST JSON.
Response envelope
{ "data": { ... } } // success
{ "error": { "code": "...", "message": "..." } } // failureerror.code values:
| Code | HTTP | Meaning |
|---|---|---|
invalid_api_key |
401 | Key missing/wrong/expired/revoked |
permission_denied |
403 | Valid key, missing required scope |
tool_not_found |
404 | Typo or removed tool |
invalid_input |
400 | Input failed validation |
service_error |
400 | Upstream product service errored |
rate_limited |
429 | Slow down (see Retry-After) |
internal_error |
500 | Retry with backoff |