Skip to content

Installation

Get started quickly using Elasticsearch (the default) or OpenSearch.

Requirements

  • Python 3.10+
  • Elasticsearch 8.x (default) or OpenSearch, for tool indexing and user storage — see Search backend to choose

Install

pip install model-context-catalog

Or with uv:

uv add model-context-catalog

Elasticsearch (default)

MCC requires a running Elasticsearch instance. The quickest way to get one locally:

curl -fsSL https://elastic.co/start-local | sh

Running OpenSearch instead?

MCC also supports OpenSearch as the search backend — install mcc[opensearch], set search_backend: opensearch, and see Search backend for the full setup. docker-compose.opensearch.yaml in the repo stands up a local instance.

Configuration

Create a settings.local.yaml in your working directory:

default:
  elasticsearch_url: "https://elastic:password@localhost:9200?verify_certs=false"

See Search backend for OpenSearch's equivalent, and Auth Backends for authentication configuration.

Create the indices

On a fresh cluster, create the users and keys indices (plus the audit indices if audit_tool_index / audit_search_index are set) before adding users:

mcc init

It is safe to re-run. The tool index is built separately by mcc tool reindex, below.

Populate the tool catalog

The tool index is never created or populated automatically — not on server startup, not by any other mcc command. Run this once, against a freshly-configured Elasticsearch or OpenSearch cluster (and again any time your tool YAML files change):

mcc tool reindex

Until this has run, the catalog is empty and search()/execute() have nothing to find.