Integrations

MCP Server

Kognita exposes a Model Context Protocol (MCP) endpoint so AI clients (Claude Desktop, Cursor, or any MCP-compatible host) can search and manage your knowledge bases as native tools, without writing any glue code.

MCP endpoint

POST https://api.kognita.ai/api/mcp/v1

Uses the Streamable HTTP transport (MCP spec 2025-03-26). Authenticate with the standard x-kognita-api-key and x-kognita-organization-id headers.

Connect an AI client

Add Kognita to your AI client config. Replace the placeholder values with your real credentials.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent path on your OS.

claude_desktop_config.json
{
  "mcpServers": {
    "kognita": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/client-http", "https://api.kognita.ai/api/mcp/v1"],
      "env": {
        "MCP_HEADER_X_KOGNITA_API_KEY": "YOUR_API_KEY",
        "MCP_HEADER_X_KOGNITA_ORGANIZATION_ID": "YOUR_ORG_ID"
      }
    }
  }
}

Cursor

Add to your project or global Cursor MCP config.

.cursor/mcp.json
{
  "mcp": {
    "servers": {
      "kognita": {
        "url": "https://api.kognita.ai/api/mcp/v1",
        "headers": {
          "x-kognita-api-key": "YOUR_API_KEY",
          "x-kognita-organization-id": "YOUR_ORG_ID"
        }
      }
    }
  }
}

Programmatic usage

Use the official MCP SDKs to connect from your own application.

python
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

url = "https://api.kognita.ai/api/mcp/v1"
headers = {
    "x-kognita-api-key": "YOUR_API_KEY",
    "x-kognita-organization-id": "YOUR_ORG_ID",
}

async with streamablehttp_client(url, headers=headers) as (read, write, _):
    async with ClientSession(read, write) as session:
        await session.initialize()

        # List knowledge bases
        result = await session.call_tool("list_knowledge_bases", {})

        # Search
        result = await session.call_tool("search", {
            "knowledge_base_id": "kb_abc123",
            "query": "what is kognita",
            "mode": "hybrid",
            "limit": 5,
        })

Available tools

All tools require authenticated headers. The session inherits the permissions of the supplied API key.

list_knowledge_bases

List all knowledge bases in the organization.

Returns JSON array of knowledge base objects.

search

Search a knowledge base. Supports full_text, semantic, and hybrid modes.

Parameters

knowledge_base_idstringrequiredID of the knowledge base to search.
querystringrequiredThe search query string.
modestringfull_text, semantic, or hybrid (default: hybrid).
limitnumberMax results, 1–100 (default: 10).
semantic_weightnumberHybrid blend weight 0–1 (default: 0.5).

Returns JSON array of {id, contentChunk, score} objects.

ingest_content

Add text to a knowledge base. Kognita automatically chunks and embeds it.

Parameters

knowledge_base_idstringrequiredID of the knowledge base.
textstringrequiredThe text content to ingest.

Returns JSON object with the new content {id}.

list_contents

List content items stored in a knowledge base.

Parameters

knowledge_base_idstringrequiredID of the knowledge base.
pagenumberPage number (default: 1).
limitnumberItems per page, 1–100 (default: 20).

Returns JSON object with {items, total}.