Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 24 additions & 45 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Repository Overview

Openbread is an open-source toolkit for Mixedbread's vector store platform. This is a monorepo containing two main packages:
Openbread is an open-source toolkit for Mixedbread's vector store platform. This monorepo contains:
- `@mixedbread/cli` - Command-line interface for managing vector stores
- `@mixedbread/mcp` - Model Context Protocol server for Claude Desktop integration

## Development Commands

### Common Commands
### Setup and Build
```bash
# Install dependencies (required before anything else)
pnpm install
Expand All @@ -24,7 +23,7 @@ pnpm dev
# Run tests
pnpm test

# Run a single test file
# Run a single test file (from package directory)
pnpm test path/to/test.spec.ts

# Lint and auto-fix code
Expand All @@ -37,15 +36,6 @@ pnpm format
pnpm check-types
```

### Package-Specific Commands
```bash
# Work on a specific package
cd packages/cli # or packages/mcp
pnpm build
pnpm test
pnpm dev
```

### Release Process
```bash
# Create a changeset for your changes
Expand All @@ -61,30 +51,31 @@ pnpm release
## Architecture

### Monorepo Structure
- Uses pnpm workspaces and Turbo for task orchestration
- Packages are in `packages/*` directory
- Shared TypeScript configurations and dependencies
- Node.js 20+ required, pnpm 9.0.0 strictly enforced
- Uses pnpm workspaces (v9.0.0 strictly enforced) and Turbo for task orchestration
- Packages in `packages/*` directory
- Node.js 20+ required
- TypeScript 5.8+ with CommonJS module system for CLI package
- Build outputs to `dist/` directories

### Key Dependencies
- `@mixedbread/sdk` - Official SDK for API interactions
- `commander` - CLI framework for the CLI package
- `@modelcontextprotocol/sdk` - MCP implementation
- `commander` - CLI framework
- `zod` - Runtime validation and type safety
- `biome` - Linting and formatting (replaces ESLint/Prettier)

### Build System
- Turbo manages build dependencies between packages
- TypeScript compilation with multiple tsconfig files
- Build outputs go to `dist/` directories
- Environment variables from `.env*` files affect builds
- `jest` with `ts-jest` - Testing framework

### Code Standards
- TypeScript 5.8+ for all code
- File naming: kebab-case (e.g., `vector-store.ts`)
- Formatting: 2 spaces, 80 char lines, double quotes, trailing commas
- No barrel files (index.ts that just re-exports)
- No unused imports (will show as warnings)
- Biome configuration enforces these standards

### Testing
- Jest for unit and integration tests
- Tests in `tests/` directories within each package
- Mocks for external dependencies (chalk, ora, inquirer, glob, p-limit)
- Run `pnpm test` from root or package directory

## Environment Setup

Expand All @@ -96,32 +87,20 @@ export MXBAI_API_KEY="your-api-key"

### Development Tips
- Use `.env` files for local development
- The CLI binary is available as `mxbai` after building
- The MCP binary is available as `mcp` after building
- Both packages use ESM modules

## Testing Strategy
- Jest for unit and integration tests
- Tests are in `tests/` directories within each package
- Mock external dependencies (SDK calls, file system)
- Run tests before submitting changes
- CLI binary available as `mxbai` after building
- Custom build script in `packages/cli/build` handles TypeScript compilation and packaging

## Common Tasks

### Adding a New CLI Command
1. Create command file in `packages/cli/src/commands/`
2. Follow existing command structure (see `create.ts` or `search.ts`)
2. Follow existing command patterns (see `create.ts` or `search.ts`)
3. Add tests in `packages/cli/tests/commands/`
4. Update CLI exports if needed

### Adding a New MCP Tool
1. Create tool file in `packages/mcp/src/tools/`
2. Follow existing tool patterns (input/output schemas with Zod)
3. Add to tool registry in `packages/mcp/src/index.ts`
4. Add tests in `packages/mcp/tests/`
4. Register command in appropriate index file

### Working with Vector Stores
- CLI provides full CRUD operations for vector stores
- Support for file uploads with different processing strategies
- File upload with processing strategies (high_quality, fast, auto)
- Git-based and hash-based sync capabilities
- Manifest-based bulk uploads via YAML configuration
- Manifest-based bulk uploads via YAML configuration
- Support for aliases and configuration management
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [2025] [Mixedbread AI]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
46 changes: 7 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Openbread

[![npm version](https://badge.fury.io/js/@mixedbread%2Fcli.svg)](https://www.npmjs.com/package/@mixedbread/cli)
[![npm version](https://badge.fury.io/js/@mixedbread%2Fmcp.svg)](https://www.npmjs.com/package/@mixedbread/mcp)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Openbread is an open-source toolkit that provides powerful interfaces for interacting with [Mixedbread](https://www.mixedbread.com/)'s vector store platform. It consists of two main packages that enable seamless vector store management, file processing, and intelligent search capabilities.
Openbread is an open-source monorepo containing tools for interacting with [Mixedbread](https://www.mixedbread.com/)'s vector store platform. Currently, it houses the command-line interface (CLI) that enables seamless vector store management, file processing, and intelligent search capabilities.

## Packages

Expand Down Expand Up @@ -40,36 +39,6 @@ mxbai vs upload "My Documents" "**/*.md" --strategy high_quality --contextualiza
mxbai vs search "My Documents" "how to get started"
```

### 🔌 [@mixedbread/mcp](./packages/mcp)

A Model Context Protocol (MCP) server that enables integration with Claude Desktop and other MCP-compatible clients.

**Key Features:**
- Seamless Claude Desktop integration
- Vector store operations through MCP tools
- File management and search capabilities
- Real-time vector store interactions

**Installation:**
```bash
npm install -g @mixedbread/mcp
```

**Claude Desktop Integration:**
```json
{
"mcpServers": {
"mixedbread": {
"command": "npx",
"args": ["-y", "@mixedbread/mcp"],
"env": {
"MXBAI_API_KEY": "your_api_key_here"
}
}
}
}
```

## Prerequisites

- **Node.js**: Version 20 or higher
Expand All @@ -80,9 +49,10 @@ npm install -g @mixedbread/mcp

1. **Get your API key** from [Mixedbread](https://www.platform.mixedbread.com/platform?next=/api-keys)

2. **Choose your interface:**
- **Command Line**: Install `@mixedbread/cli` for terminal-based operations
- **Claude Desktop**: Install `@mixedbread/mcp` for AI assistant integration
2. **Install the CLI:**
```bash
npm install -g @mixedbread/cli
```

3. **Set up authentication:**
```bash
Expand All @@ -96,7 +66,7 @@ npm install -g @mixedbread/mcp

## Development

This is a monorepo managed with [pnpm](https://pnpm.io/) and [Turbo](https://turbo.build/).
Openbread is a monorepo managed with [pnpm](https://pnpm.io/) and [Turbo](https://turbo.build/), designed to host multiple tools for the Mixedbread ecosystem.

### Setup

Expand Down Expand Up @@ -134,8 +104,7 @@ pnpm check-types
```
openbread/
├── packages/
│ ├── cli/ # Command-line interface
│ └── mcp/ # Model Context Protocol server
│ └── cli/ # Command-line interface
├── package.json # Root package configuration
├── turbo.json # Turbo build configuration
└── pnpm-workspace.yaml # pnpm workspace configuration
Expand Down Expand Up @@ -168,7 +137,6 @@ This project uses [Changesets](https://github.com/changesets/changesets) for ver
## Documentation

- **CLI Documentation**: [mixedbread.com/cli](https://www.mixedbread.com/cli)
- **MCP Documentation**: [mixedbread.com/mcp](https://www.mixedbread.com/mcp)
- **Release Process**: [RELEASE.md](./RELEASE.md)
- **Mixedbread Platform**: [platform.mixedbread.com](https://www.platform.mixedbread.com)

Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Process

This document describes the release process for all packages in the monorepo (`@mixedbread/cli`, `@mixedbread/mcp`).
This document describes the release process for the `@mixedbread/cli` package.

## Prerequisites

Expand Down
39 changes: 0 additions & 39 deletions packages/mcp/.gitignore

This file was deleted.

Loading