Routing traffic

Connectors

Connectors are how application or agent traffic reaches Pelorus. They let you route queries through enabled datasets so Pelorus can return chunks, Query Extracts, or Cluster Extracts while observing demand.

Looking for the other direction? This page is about traffic coming into Pelorus — you are the caller. If you have a retrieval system and you want Pelorus to read it, that is the RAG Connector contract.

Python client

Use the Python client when application code should send runtime queries to a local or remote Pelorus engine. The default client surface is intentionally small: connect, query, look up an Extract, inspect read-only state, and close the connection.

from pelorus import PelorusClient

pq = PelorusClient.connect("http://127.0.0.1:9090")
result = pq.query("Which warranty terms apply?", dataset="support")

for document in result.documents:
    print(document.metadata.get("type"), document.content[:160])

Dataset setup, diagnostics, and development controls live on client.dev(). Keeping them separate makes it clear which calls belong in application request paths and which calls are for setup, tests, or operations.

from pelorus import Pelorus

with Pelorus.local(config="config.yaml") as pq:
    dev = pq.dev()
    dataset = dev.create_managed_dataset(
        name="support-docs", source_folder="/data/support-docs"
    )

    # A new dataset lands disconnected. Connect binds it to a datasource group
    # and creates its vectors; enable is a pure gate that turns serving on.
    dev.connect_dataset_group(dataset["id"], group_id, vector_policy="reuse_valid")
    dev.enable_dataset(dataset=dataset["id"])

    answer = pq.query("How do returns work?", dataset=dataset["id"])

group_id is the id of a datasource group, which you create in the admin console. Every dataset in a group shares one immutable embedding configuration, so its vectors are all in the same embedding space. If that configuration later changes, the dataset reads Re-embed Required and is held back from serving until you reconnect it with vector_policy="revectorize_all".

Read-only notebook and reporting workflows use client.analysis() to pull Query Maps, clusters, vectors, coverage, and similarity data without mutating the dataset.

See Client API for the current Python client and MCP-facing method signatures.

Download the example notebook: Pelorus Demand Coverage Audit.

MCP

Use the MCP connector when an MCP-capable agent should query Pelorus, inspect runtime state, or ask Pelorus to answer a question. MCP lets an agent workflow use the same dataset and retrieval surface without embedding Pelorus directly into the agent process.

pelorus-mcp --url http://127.0.0.1:9090 --transport stdio

The MCP tools are intentionally a thin facade over the Python client. Agents can query, poll Extract state, inspect dataset state, and submit or list extraction demand. MCP is a client API: it never hands extraction work to the agent. In the developer release, this is a trusted-local workflow: the connector does not implement authentication, so run it on localhost, a private machine, or behind your own access boundary.

Configure Claude Code

Start the Pelorus management API first, then let Claude Code launch pelorus-mcp as a local stdio MCP server.

python -m pelorus.serve --config config.yaml --host 127.0.0.1 --port 9090
claude mcp add pelorus -- pelorus-mcp --url http://127.0.0.1:9090 --transport stdio

For a shared project configuration, put this in .mcp.json at the project root. Claude Code will ask you to approve the server the first time the project opens it; use /mcp inside Claude Code to confirm that pelorus is connected.

{
  "mcpServers": {
    "pelorus": {
      "type": "stdio",
      "command": "pelorus-mcp",
      "args": ["--url", "http://127.0.0.1:9090", "--transport", "stdio"]
    }
  }
}

Use MCP as a client

An agent can call pelorus_query, choose raw chunks with chunks_only, poll queued Extract state with pelorus_get_extract, and inspect the selected dataset with pelorus_introspect. This is the right fit for agent applications that need source-grounded context from Pelorus but should not own the engine lifecycle.

Ask for an Extract

An agent can ask Pelorus to answer a question with pelorus_submit_extraction_demand, then watch the queue with pelorus_list_extraction_backlog and pelorus_get_extraction_backlog_counts. Similar requests are merged into one backlog item. Pelorus authors the Extract itself; the agent only asks.

Current split. MCP is the agent-facing surface for retrieval and extraction demand. Cluster creation and curation stay in the Admin UI, management API, and Python analysis/admin surfaces for this release. Adding MCP cluster tools is a later extension, not part of the developer-preview contract.

Who authors Extracts

Pelorus authors every Query Extract and Cluster Extract itself, with its configured extract LLM. Extract Processing is the one place Pelorus calls an LLM, and by default it does so with an API key you configure. MCP does not change that: an agent connected over MCP can request Extracts, but never writes them.

Subscription connections are optional and your own choice. API keys are the default. Through modelpass, Pelorus can instead use a Claude or ChatGPT plan you are signed in to on this machine, where your vendor's current terms allow it for your use. Use it only for your own work and never expose it to other people: anyone who can reach the engine or the MCP server can queue work for it, so keep both on a loopback address. See modelpass's Boundary and compliance section. Not legal advice.
Cluster curation still belongs to the admin/API surface. MCP query calls can ask Pelorus to include cluster matching, and the Python analysis surface can read cluster maps, coverage, vectors, and membership. MCP is intentionally not the cluster curation surface yet: it does not currently expose tools to create clusters, edit cluster extracts, regenerate labels, tune thresholds, or manage membership. Those operations are available through the Admin UI and management API today, and routing a small cluster-curation toolset to MCP is a natural follow-up once the developer workflow needs it.