Skip to content

Installation

Requirements

  • Python 3.10 or later
  • pip or uv package manager

Basic Installation

Install the core library:

pip install ifcraftcorpus

Or with uv:

uv add ifcraftcorpus

Optional Features

MCP Server

For integration with Claude Code, Cursor, or other MCP clients:

pip install ifcraftcorpus[mcp]

There are two options for semantic search:

Lightweight (API-based)

Use Ollama or OpenAI for embeddings. Smaller install, no torch required:

pip install ifcraftcorpus[embeddings-api]

Requires either:

  • Ollama: Running Ollama server (configure with OLLAMA_HOST env var)
  • OpenAI: Set OPENAI_API_KEY environment variable

Heavyweight (Local)

Use sentence-transformers for fully local embeddings. Larger install (includes PyTorch):

pip install ifcraftcorpus[embeddings]

All Features

For Docker or production deployments (MCP + lightweight embeddings):

pip install ifcraftcorpus[all]

For full local development with sentence-transformers:

pip install ifcraftcorpus[all-local]

Development Installation

For contributing to the project:

git clone https://github.com/pvliesdonk/if-craft-corpus.git
cd if-craft-corpus
pip install -e ".[dev]"

Verify Installation

from ifcraftcorpus import Corpus

corpus = Corpus()
print(f"Loaded {corpus.document_count()} documents")
print(f"Clusters: {corpus.list_clusters()}")