Skip to main content
Glama
ibkortex

kortex-mcp

Official
by ibkortex

kortex-mcp

MCP server that exposes the Kortex data plane to Claude Desktop. Wraps the two data plane endpoints so Claude can discover and search enterprise datasets without leaving the conversation.

Prerequisites

  • Python 3.11+

  • uv (recommended) or pip

  • A running Kortex backend (kortex/src/back)

  • An active Kortex API key with at least one collection in scope

Related MCP server: Data X-Ray MCP Server

Installation

cd kortex/src/kortex_mcp
uv sync          # creates .venv and installs mcp + httpx

Or with pip:

pip install -e .

Configuration

The server reads two environment variables:

Variable

Required

Default

Description

KORTEX_API_KEY

yes

API key in kx_live_<id>_<secret> format

KORTEX_API_URL

no

http://localhost:8000

Base URL of the Kortex backend

Claude Desktop setup

Edit ~/.config/Claude/claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json).

Choose one of the two options below, then restart Claude Desktop. The Kortex tools will appear in the tool picker (hammer icon).

Option A — Local clone

Use this if you have cloned the repo and want to run your working copy.

{
  "mcpServers": {
    "kortex": {
      "command": "uv",
      "args": [
        "run",
        "--project", "/absolute/path/to/kortex/src/kortex_mcp",
        "python", "-m", "mcps.kortex_mcp.server"
      ],
      "env": {
        "KORTEX_API_URL": "http://localhost:8000",
        "KORTEX_API_KEY": "kx_live_<id>_<secret>"
      }
    }
  }
}

Replace /absolute/path/to/kortex/src/kortex_mcp with the actual path on your machine.

Option B — Directly from GitHub (no clone needed)

Use this to always run the latest tagged release without maintaining a local clone. uvx downloads, caches, and runs the package in one step.

{
  "mcpServers": {
    "kortex": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/ibkortex/kortex_mcp@v0.0.1",
        "kortex-mcp"
      ],
      "env": {
        "KORTEX_API_URL": "http://localhost:8000",
        "KORTEX_API_KEY": "kx_live_<id>_<secret>"
      }
    }
  }
}

Tools

list_collections

Lists all collections the API key has access to.

Returns each collection with:

  • id — use this in retrieve

  • nombre / descripcion — human-readable name and description

  • availableVersions — logical version labels you can query (e.g. ["v1", "v2"])

Call this first to understand what data is available before issuing a search.


retrieve(query, ...)

Semantic search against Amazon Bedrock Knowledge Bases.

Parameter

Type

Default

Description

query

string

Natural-language question or search phrase

collections

string[]

all accessible

Collections to search. Each entry is "collection_id" or "collection_id:version_label". Omit to search all accessible collections at their default version.

number_of_results

integer

10

Maximum passages to return

Each result includes collectionId, versionLabel, content, score, and sourceUri.

Requesting a collection outside the API key's scope returns a 403 — Claude cannot query collections it has not been granted access to.

Example conversation

User: What collections do I have access to?

Claude calls list_collections and summarises the response.

User: Search for documents about credit risk models in the regulatory collection.

Claude calls retrieve with the appropriate collection_id and surfaces the most relevant passages.

User: Show me the v1 version only.

Claude calls retrieve again with collections: ["<id>:v1"].

Testing with MCP Inspector

MCP Inspector wraps the server process and opens a local web UI where you can call tools interactively — no Claude Desktop needed.

Local clone:

KORTEX_API_KEY=kx_live_... KORTEX_API_URL=http://localhost:8000 \
  npx @modelcontextprotocol/inspector \
  uv run --project /absolute/path/to/kortex/src/kortex_mcp \
  python -m mcps.kortex_mcp.server

From GitHub:

KORTEX_API_KEY=kx_live_... KORTEX_API_URL=http://localhost:8000 \
  npx @modelcontextprotocol/inspector \
  uvx --from git+https://github.com/ibkortex/kortex_mcp@v0.0.1 kortex-mcp

Open http://localhost:5173 in your browser. Use the Tools tab to call list_collections and retrieve and inspect the raw responses.

Available Tools

2 tools
list_collectionsA

List all collections accessible to this API key.

Returns a list of collections, each containing:

  • id: unique collection identifier (use this in retrieve)

  • nombre / descripcion: human-readable name and description — read these to understand what a collection contains before deciding whether to query it

  • availableVersions: logical version labels you can query (e.g. ["v1", "v2"])

Call this before retrieve to know which collection IDs and version labels are available.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the API key scope ('accessible to this API key'), describes the return structure in detail (id, nombre/descripcion, availableVersions), and implies a read-only operation via 'List.' The mention of availableVersions as queryable labels adds behavioral context beyond a simple list.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action, uses a bulleted list for return fields, and adds a clear usage directive at the end. Every sentence serves a purpose, with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with no parameters and no output schema, this description is complete: it states what is returned, the meaning of each field, and how to use the results as a precursor to retrieval. No additional context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. The description still adds meaning by explaining how the output fields relate to subsequent retrieval, even though no parameter details are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'List all collections accessible to this API key.' It clearly distinguishes from the sibling tool retrieve by stating the id is 'use this in retrieve' and recommending calling this before retrieve.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit usage guidance is provided: 'Call this before retrieve to know which collection IDs and version labels are available.' It also advises reading nombre/descripcion to understand what a collection contains before querying it, which helps agents decide when to proceed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

retrieveA

Semantic search across accessible collections using Amazon Bedrock Knowledge Bases.

Args: query: Natural-language question or search phrase. collections: Which collections (and optionally which version) to search. Each entry is either: - "collection_id" → search that collection at its default version - "collection_id:label" → search that collection at the given version label Omit (or pass null) to search across all collections accessible to the API key, each at its default version. Use list_collections to discover IDs and labels. number_of_results: Maximum number of passages to return (default 10).

Returns a list of results, each with:

  • collectionId / versionLabel: which collection and version the passage came from

  • content: the retrieved text passage

  • score: relevance score (higher is more relevant)

  • sourceUri: original document URI when available

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
collectionsNo
number_of_resultsNo

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses read-only search behavior, 'accessible to the API key', default version handling, default result count, and the exact return structure. It stops short of mentioning potential error conditions or rate limits, but the provided behavioral detail is substantial and honest.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear one-line purpose, an Args section for parameters, and a Returns section. Every sentence adds value and no space is wasted on repetition or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 params, no output schema, no annotations), the description is complete. It covers all parameter semantics, default behaviors, return fields, and even cross-references the sibling tool. An agent has enough information to select and invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema description coverage is 0%, the description fully compensates by explaining each parameter: query (natural-language question), collections (including the 'collection_id:label' version syntax and null behavior), and number_of_results (default 10). This adds significant meaning beyond the bare schema types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource combination: 'Semantic search across accessible collections using Amazon Bedrock Knowledge Bases.' It clearly distinguishes this search tool from the sibling list_collections by explaining that list_collections is for discovering IDs/labels while this tool performs retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool: when you need semantic search over collections, optionally scoped to specific collections/versions. It explicitly directs users to list_collections for discovery, which is an alternative tool reference, though it doesn't enumerate exclusions for when not to use retrieve.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.0
    • First observedlist_collections
    • First observedretrieve

TDQS

A4.5/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: list_collections is for discovery of available collections, while retrieve performs semantic search. There is no overlap or ambiguity between them.

Naming Consistency4/5

list_collections follows a verb_noun pattern, but retrieve is a single verb without an explicit object. Both are imperative and readable, though not perfectly uniform.

Tool Count3/5

With only two tools, the server feels minimal but just barely adequate for its narrow scope of collection discovery and search. It sits on the lower boundary of acceptable tool count.

Completeness4/5

The server covers the essential workflow: listing collections to discover IDs and versions, then retrieving search results. There are no obvious dead ends, though a more detailed collection metadata endpoint could be considered a minor gap.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables Claude to search, query, and interact with an Enterprise Knowledge Management System (EKMS). Supports semantic search, knowledge recommendations, relationship graphs, and feedback recording for enterprise knowledge bases.
    7
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables Claude to search, retrieve, and analyze indexed files with sensitivity classifications and automatic redaction of sensitive information.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables document ingestion and typed knowledge graph queries through Claude MCP tools, allowing agents to extract, store, and retrieve typed entities and relations from documents.
    2
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables semantic code search over local repositories, providing tools like semantic_search and list_indexed_repos to Claude Code, so users can find relevant code sections via natural language instead of grep.
    -