Skip to main content

vector-mcp

Action-routed MCP and agent interfaces for governed vector collection management and retrieval. The native default is epistemic-graph. Secure opt-in providers cover PostgreSQL/pgvector, Qdrant, and MongoDB Atlas.

Version: 3.3.0

Governed capability

  • MCP tools: vector_collection_management and vector_search
  • Skill provider: the consolidated vector-mcp-operations workflow
  • Ontology provider: the packaged vector retrieval ontology
  • Source connector provider: a read-only vector collection inventory preset
  • Runtime configuration: AgentConfig, environment variables, and secret references
  • Privacy posture: no checked-in endpoints, credentials, personal identity, or host paths

Install

Use the smallest extra set required by the deployment:

uvx --from 'vector-mcp[mcp]' vector-mcp

The runtime requires agent-connector-sdk>=0.2.0 and its self-contained full epistemic-graph engine contract. A bare numeric-only or partial engine profile is not a supported deployment.

For a selected storage provider:

uv add 'vector-mcp[postgres]'
uv add 'vector-mcp[qdrant]'
uv add 'vector-mcp[mongodb]'

The all extra enables every supported optional provider plus the agent, Langfuse, and Logfire runtimes. Production images should install only the providers they operate.

MCP configuration

The package includes a neutral agent-start configuration containing only the command, condensed tool mode, and tool toggles. Runtime values are inherited from AgentConfig or injected by the operator. Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in docs/index.md.


MCP

This server use dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.

Available MCP Tools

Auto-generated from the live MCP server — do not edit by hand.

Condensed action-routed tools (MCP_TOOL_MODE=condensed)

MCP Tool Toggle Env Var Description
vector_collection_management COLLECTION_MANAGEMENTTOOL Manage collection management operations.
vector_search SEARCHTOOL Manage search operations.

2 action-routed tool(s) · 0 verbose 1:1 tool(s). Each is enabled unless its <DOMAIN>TOOL toggle is set false; MCP_TOOL_MODE selects the surface (intent default — the six verb-tools, granular set loaded on demand · condensed action-routed · verbose 1:1 · both). Auto-generated — do not edit.

Detailed tool schemas, parameter shapes, and validation constraints are preserved in the usage guide.

Dynamic Tool Selection & Visibility

This MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows the operator to restrict the set of exposed tools to prevent blowing up the LLM's context window.

The operator can configure tool filtering via multiple input channels:

  • CLI Arguments: Pass --tools or --toolsets (or their disabled counterparts --disabled-tools and --disabled-toolsets) during startup.
  • Environment Variables: Define standard environment variables:
    • MCP_ENABLED_TOOLS / MCP_DISABLED_TOOLS
    • MCP_ENABLED_TAGS / MCP_DISABLED_TAGS
  • HTTP SSE Request Headers: Pass custom headers during transport initialization:
    • x-mcp-enabled-tools / x-mcp-disabled-tools
    • x-mcp-enabled-tags / x-mcp-disabled-tags
  • HTTP SSE Request Query Parameters: Append query parameters directly to the operator's transport connection URL:
    • ?tools=tool1,tool2
    • ?tags=tag1

When query strings or parameters are provided, an LLM-free Knowledge Graph resolution layer (using DynamicToolOrchestrator) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.


MCP Configuration Examples

Install the connector-focused [mcp] extra. Examples use vector-mcp[mcp] to add FastMCP / FastAPI through agent-connector-sdk[mcp].

stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)

{
  "mcpServers": {
    "vector-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "vector-mcp[mcp]",
        "vector-mcp"
      ],
      "env": {
        "MCP_TOOL_MODE": "intent",
        "COLLECTION_MANAGEMENTTOOL": "True",
        "DATABASE_TYPE": "epistemic_graph",
        "DB_PASSWORD_REF": "secret://runtime/db-password",
        "DB_PORT": "5432",
        "DB_USERNAME_REF": "secret://runtime/db-username",
        "MONGODB_MAX_POOL_SIZE": "20",
        "MONGODB_REQUEST_TIMEOUT_MS": "30000",
        "MONGODB_URI_REF": "secret://runtime/mongodb-uri",
        "POSTGRES_MAX_POOL_SIZE": "20",
        "POSTGRES_REQUEST_TIMEOUT": "30",
        "QDRANT_API_KEY_REF": "secret://runtime/qdrant-api-key",
        "QDRANT_REQUEST_TIMEOUT": "30",
        "SEARCHTOOL": "True",
        "VECTOR_DB_TYPE": "epistemic_graph"
      }
    }
  }
}

Runtime references require an alias-aware launcher such as Arbora. Other launchers must omit those entries and inject the resolved values through their own runtime secret boundary.

Streamable-HTTP Transport (networked / production)

{
  "mcpServers": {
    "vector-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "vector-mcp[mcp]",
        "vector-mcp",
        "--transport",
        "streamable-http",
        "--port",
        "8000"
      ],
      "env": {
        "TRANSPORT": "streamable-http",
        "HOST": "127.0.0.1",
        "PORT": "8000",
        "MCP_TOOL_MODE": "intent",
        "COLLECTION_MANAGEMENTTOOL": "True",
        "DATABASE_TYPE": "epistemic_graph",
        "DB_PASSWORD_REF": "secret://runtime/db-password",
        "DB_PORT": "5432",
        "DB_USERNAME_REF": "secret://runtime/db-username",
        "MONGODB_MAX_POOL_SIZE": "20",
        "MONGODB_REQUEST_TIMEOUT_MS": "30000",
        "MONGODB_URI_REF": "secret://runtime/mongodb-uri",
        "POSTGRES_MAX_POOL_SIZE": "20",
        "POSTGRES_REQUEST_TIMEOUT": "30",
        "QDRANT_API_KEY_REF": "secret://runtime/qdrant-api-key",
        "QDRANT_REQUEST_TIMEOUT": "30",
        "SEARCHTOOL": "True",
        "VECTOR_DB_TYPE": "epistemic_graph"
      }
    }
  }
}

Alternatively, connect to a pre-deployed Streamable-HTTP instance by url:

{
  "mcpServers": {
    "vector-mcp": {
      "url": "http://localhost:8000/vector-mcp/mcp"
    }
  }
}

Run a reviewed container image as a least-privilege stdio child (no listener or published port):

docker run -i --rm \
  --read-only \
  --cap-drop=ALL \
  --security-opt=no-new-privileges \
  --pids-limit=256 \
  --tmpfs /tmp:rw,noexec,nosuid,nodev,size=64m \
  -e TRANSPORT=stdio \
  -e MCP_TOOL_MODE=intent \
  -e COLLECTION_MANAGEMENTTOOL=True \
  -e DATABASE_TYPE=epistemic_graph \
  -e DB_PASSWORD_REF \
  -e DB_PORT=5432 \
  -e DB_USERNAME_REF \
  -e MONGODB_MAX_POOL_SIZE=20 \
  -e MONGODB_REQUEST_TIMEOUT_MS=30000 \
  -e MONGODB_URI_REF \
  -e POSTGRES_MAX_POOL_SIZE=20 \
  -e POSTGRES_REQUEST_TIMEOUT=30 \
  -e QDRANT_API_KEY_REF \
  -e QDRANT_REQUEST_TIMEOUT=30 \
  -e SEARCHTOOL=True \
  -e VECTOR_DB_TYPE=epistemic_graph \
  registry.example.invalid/vector-mcp@sha256:<digest> vector-mcp

For containerized network HTTP, supply an authenticated TLS ingress (or direct server TLS), exact MCP_ALLOWED_HOSTS, and an exact trusted-proxy CIDR policy through the operator-owned deployment profile. The generator does not emit an unauthenticated non-loopback listener.

Auto-generated from the code-read env surface (MCP_TOOL_MODE + package vars) — do not edit.

Additional Deployment Options

vector-mcp can also run as a local container (Docker / Podman / uv) or be consumed from a remote deployment. The Deployment guide has full, copy-paste mcp_config.json for all four transports — stdio, streamable-http, local container / uv, and remote URL:

  • Local container / uv — launch the server from mcp_config.json via uvx, docker run, or podman run, or point at a local streamable-http container by url.
  • Remote URL — connect to a server deployed behind Caddy at https://vector-mcp.example.invalid/mcp using the "url" key.

Environment Variables

Package environment variables

Variable Example Description
HOST 127.0.0.1
PORT 8000
TRANSPORT stdio options: stdio, streamable-http, sse
ENABLE_OTEL —
EMBEDDING_TLS_PROFILE_REF secret://runtime/embedding-tls-profile Configure AgentConfig EMBEDDING_MODELS and its referenced runtime credentials.
DOCUMENT_DIRECTORY — Required only for filesystem ingestion. Supply the operator-owned root at runtime.
DATABASE_TYPE epistemic_graph Backend used when db_type is unspecified. Default is the native epistemic-graph engine (local, zero-infra, durable). Options: epistemic_graph, postgres, mongodb, qdrant. DATABASE_TYPE is the canonical variable; VECTOR_DB_TYPE is accepted as an alias for backward compatibility.
VECTOR_DB_TYPE epistemic_graph
DB_HOST — postgres/qdrant host
DBNAME — postgres/mongodb database name
DB_PORT 5432
DB_USERNAME_REF secret://runtime/db-username
DB_PASSWORD_REF secret://runtime/db-password
MONGODB_URI_REF secret://runtime/mongodb-uri
QDRANT_API_KEY_REF secret://runtime/qdrant-api-key
QDRANT_HTTP_ALLOWED_PRIVATE_HOSTS — comma-separated SSRF allowlist for a private Qdrant host
POSTGRES_REQUEST_TIMEOUT 30 seconds, 1-300
POSTGRES_MAX_POOL_SIZE 20 connections, 1-100
MONGODB_REQUEST_TIMEOUT_MS 30000 milliseconds, 1-300000
MONGODB_MAX_POOL_SIZE 20 connections, 1-100
QDRANT_REQUEST_TIMEOUT 30 seconds, 1-300
COLLECTION_MANAGEMENTTOOL True
SEARCHTOOL True
VECTOR_MCP_MCP_IMAGE — e.g. registry.example.invalid/vector-mcp@sha256:
VECTOR_MCP_AGENT_IMAGE — e.g. registry.example.invalid/vector-mcp@sha256:

Inherited agent-utilities variables (apply to every connector)

Variable Example Description
MCP_TOOL_MODE intent Tool surface: intent | condensed | verbose | both
MCP_ENABLED_TOOLS — Comma-separated tool allow-list
MCP_DISABLED_TOOLS — Comma-separated tool deny-list
MCP_ENABLED_TAGS — Comma-separated tag allow-list
MCP_DISABLED_TAGS — Comma-separated tag deny-list
EUNOMIA_TYPE none Authorization mode: none | embedded | remote
EUNOMIA_POLICY_FILE mcp_policies.json Embedded Eunomia policy file
EUNOMIA_REMOTE_URL — Remote Eunomia authorization server URL
OTEL_EXPORTER_OTLP_ENDPOINT — OTLP collector endpoint
MCP_CLIENT_AUTH — Outbound MCP child auth: oidc-client-credentials | basic | none
OIDC_CLIENT_ID — OIDC client id (service-account auth)
OIDC_CLIENT_SECRET_REF secret://identity/oidc-client-secret Runtime secret reference for the OIDC service account
MCP_BASIC_AUTH_USERNAME — HTTP Basic username (MCP_CLIENT_AUTH=basic)
MCP_BASIC_AUTH_PASSWORD_REF secret://identity/mcp-basic-password Runtime secret reference for HTTP Basic auth (MCP_CLIENT_AUTH=basic)
DEBUG False Verbose logging
PYTHONUNBUFFERED 1 Unbuffered stdout (recommended in containers)
MCP_URL http://localhost:8000/mcp URL of the MCP server the agent connects to
PROVIDER — Operator-configured LLM provider for the agent
MODEL_ID — Operator-configured model id for the agent
ENABLE_WEB_UI True Serve the AG-UI web interface

25 package + 20 inherited variable(s). Auto-generated from .env.example + the shared agent-utilities set — do not edit.

Every variable the server reads, grouped by purpose. See .env.example for the canonical, copy-paste list — including the DATABASE_TYPE / GRAPH_SERVICE_SOCKET / GRAPH_SERVICE_AUTH_SECRET connection settings for the native epistemic-graph backend. Backend endpoints, database locations, and credentials for opt-in providers (Postgres/Qdrant/Mongo/ Chroma/Couchbase) are never README-documented literal values or MCP tool arguments — they resolve through AgentConfig and secret:///env:///vault:// references at runtime.

MCP server / transport

Variable Description Default
TRANSPORT stdio, streamable-http, or sse stdio
HOST Bind host (HTTP transports) 0.0.0.0
PORT Bind port (HTTP transports) 8000
MCP_TOOL_MODE Tool surface: condensed, verbose, or both condensed
MCP_ENABLED_TOOLS / MCP_DISABLED_TOOLS Comma-separated tool allow/deny list —
MCP_ENABLED_TAGS / MCP_DISABLED_TAGS Comma-separated tag allow/deny list —
PYTHONUNBUFFERED Unbuffered stdout (recommended in containers) 1

Tool toggles

Each action-routed tool can be disabled individually via its toggle env var (set to false). The full list is in the Available MCP Tools table above.

Variable Description Default
COLLECTION_MANAGEMENTTOOL Enable the collection-management tool True
SEARCHTOOL Enable the search tool True

Telemetry & governance

Variable Description Default
ENABLE_OTEL Enable OpenTelemetry export True
OTEL_EXPORTER_OTLP_ENDPOINT OTLP collector endpoint —
OTEL_EXPORTER_OTLP_PUBLIC_KEY / OTEL_EXPORTER_OTLP_SECRET_KEY OTLP auth keys —
OTEL_EXPORTER_OTLP_PROTOCOL OTLP protocol (e.g. http/protobuf) —
EUNOMIA_TYPE Authorization mode: none, embedded, remote none
EUNOMIA_POLICY_FILE Embedded policy file mcp_policies.json
EUNOMIA_REMOTE_URL Remote Eunomia server URL —

See .env.example for a copy-paste starting point.

Provider and ontology integration

The package contributes its skills, prompts, ontology, and source connector through Python entry points. The collection-inventory connector is intentionally read-only and registers collection metadata, not document or embedding payloads.

Generated connector signatures must be recreated only after the installed MCP schema is observed and a release signing key is provided at runtime. A signature from an older tool schema or ontology must never be copied forward.

Development checks

Low-cost checks that do not start providers:

python scripts/security_sanitizer.py
python scripts/security_contract.py --contract .security/security-contract.json validate
python -m compileall -q vector_mcp

Provider tests use mocked SDK boundaries and make no network calls. Live qualification is a separate deployment gate and must use operator-provided AgentConfig and secrets.

Documentation

The slim :mcp streamable-http container (docker/mcp.compose.yml) publishes :8000 with a /health check; see Deployment for the full compose service definition.

License

See LICENSE.

Deploy with agent-utilities-deployment

Provision this package with the consolidated agent-utilities-deployment workflow. It selects an installed-package, editable-source, or immutable-container path; records only runtime secret and TLS-profile references in AgentConfig; and runs doctor, registration, policy, observability, and rollback gates. Ask your agent to "deploy vector-mcp with agent-utilities-deployment".

Install mode Command
Installed package uv tool install "vector-mcp[mcp]", then run vector-mcp
Editable source uv pip install -e ".[mcp]", then run vector-mcp
Immutable container deploy registry.example.invalid/vector-mcp@sha256:<digest> through the operator-selected orchestrator

The repository embeds no deployment profile, credential value, certificate path, or environment-specific endpoint. Supply those at runtime through AgentConfig and the configured secret provider.


Installation

Pick the extra that matches what the operator want to run:

Extra Installs Use when
vector-mcp[mcp] Slim MCP server only (agent-connector-sdk[mcp] — FastMCP/FastAPI) The operator only run the MCP server (smallest install / image)
vector-mcp[all] Everything (mcp + all vector backends) Development / both surfaces
# MCP server only (recommended for tool hosting — slim deps)
uv pip install "vector-mcp[mcp]"

# Full agent runtime (Pydantic AI + epistemic-graph engine)
uv pip install "vector-mcp[mcp]"

# Everything (development)
uv pip install "vector-mcp[all]"      # or: python -m pip install "vector-mcp[all]"

Container image

docker/Dockerfile builds one slim image (vector-mcp[mcp], entrypoint vector-mcp):

docker build -t knucklessg1/vector-mcp:mcp docker/

docker/mcp.compose.yml runs it.

Knowledge-graph database (epistemic-graph)

Graph storage, vector search and queries are served by epistemic-graph, run as its own database container. Deployment recipes (single-node + Raft HA), connection config, and the database architecture are in the epistemic-graph deployment guide.

Repository Owners

GitHub followers GitHub User's stars


Contribute

Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:

  • Format code using ruff format .
  • Lint code using ruff check .
  • Validate type-safety with mypy .
  • Run test suites using pytest

Metadata

Release files for vector-mcp 3.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for vector-mcp 3.3.0
File Interpreter ABI Platform
vector_mcp-3.3.0-py3-none-any.whl Python 3 none any Details

Release files / vector_mcp-3.3.0-py3-none-any.whl

Download URL vector_mcp-3.3.0-py3-none-any.whl
Size 131.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
140c64b8e4ed6c0060d3ab1c8c429d33387d785c3c965f07c4448f6c19ebbbb2
BLAKE2b-256 checksum
How to use checksums
97855e3efd788663aedf9a51dd0f29a100f8804f1ef65861a7c12bf5635ebc76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

3.3.0 This release

1 release file

3.2.1

1 release file

3.2.0

1 release file

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

1.41.0

2 release files

1.32.0

2 release files

1.28.0

2 release files

1.24.0

2 release files

1.14.0

2 release files

1.11.1

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.2.0

2 release files

1.1.59

2 release files

1.1.58

2 release files

1.1.52

2 release files

1.1.50

2 release files

1.1.49

2 release files

1.1.46

2 release files

1.1.45

2 release files

1.1.44

2 release files

1.1.26

2 release files

1.1.25

2 release files

1.1.24

2 release files

1.1.23

2 release files

1.1.22

2 release files

1.1.21

2 release files

1.1.20

2 release files

1.1.19

2 release files

1.1.18

2 release files

1.1.17

2 release files

1.1.16

2 release files

1.1.15

2 release files

1.1.14

2 release files

1.1.13

2 release files

1.1.11

2 release files

1.1.10

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.11

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page