Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.igrisecurity.com/llms.txt

Use this file to discover all available pages before exploring further.

Installation

Install

# bun
bun add @igris-security/sdk

# npm
npm install @igris-security/sdk

# pnpm
pnpm add @igris-security/sdk

Initialize

import { Igris } from "@igris-security/sdk";

const igris = new Igris({
  apiKey: "ig_...",  // Your Igris API key
});
For self-hosted deployments, pass your gateway URL:
const igris = new Igris({
  apiKey: "ig_...",
  baseUrl: "https://gateway.your-company.com",
});

Generate Your First MCP Config

const config = igris.connectHttp("github-prod");

console.log(config);
// {
//   baseUrl: "https://api.igrisecurity.com/v1/mcp/github-prod",
//   apiKey: "ig_...",
//   headers: {
//     "X-Igris-Trace-Id": "ig_trace_a7f3b2c1..."
//   }
// }
That’s it. Pass config.baseUrl and config.headers to any MCP client, and add the Authorization: Bearer ${config.apiKey} header yourself when making the request:
const response = await fetch(config.baseUrl, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${config.apiKey}`,
    "Content-Type": "application/json",
    ...config.headers,
  },
  body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list", params: {} }),
});
If you’d rather call MCP tools directly without wiring up your own JSON-RPC client, use the igris.mcp resource — see Tool Calls.

Get Your API Key

  1. Log in to the Igris Dashboard
  2. Go to Settings → API Keys
  3. Click Generate API Key
  4. Copy the key — it’s shown only once
Never commit your API key to source control. Use environment variables:
const igris = new Igris({
  apiKey: process.env.IGRIS_API_KEY!,
});