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
14 changes: 14 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"mcpServers": {
"oddkit": {
"command": "npx",
"args": [
"--yes",
"--package",
"github:klappy/oddkit",
"oddkit-mcp"
],
"env": {}
}
}
}
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.10.0] - 2026-02-02

### Added

- **Cloudflare Workers deployment** — Remote MCP server for Claude.ai on iOS/iPad/web:
- New `workers/` directory with Cloudflare Worker implementation
- Streamable HTTP transport for MCP communication
- Fetches baseline from GitHub raw content API (no git clone required)
- Full MCP capabilities: tools, resources, and prompts
- CORS enabled for cross-origin requests
- Deploy with `cd workers && npm run deploy`

- **Three deployment methods** — oddkit now runs everywhere:
- **CLI** — `npx oddkit <command>` for terminal usage
- **MCP (local)** — `npx oddkit-mcp` for Cursor/Claude Code
- **MCP (remote)** — Cloudflare Worker for Claude.ai mobile/web

- **MCP resources in Worker** — Same resources as CLI version:
- `oddkit://instructions` — Decision gate
- `oddkit://quickstart` — Agent quick start
- `oddkit://examples` — Usage patterns

- **MCP prompts in Worker** — Fetched live from baseline registry:
- Agent prompts like odd-epistemic-guide, odd-scribe
- Loaded from `klappy.dev/canon/instructions/REGISTRY.json`

### Changed

- **Updated documentation** — All docs now cover CLI, npx, and HTTP deployment methods

## [0.9.1] - 2026-02-02

### Fixed
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ Agent-first CLI for ODD-governed repos. Portable Librarian + Validation with bas
>
> OddKit is epistemic terrain rendering (map), not epistemic authority (compass).

## Deployment Methods

oddkit runs in three ways:

| Method | Use Case | Setup |
|--------|----------|-------|
| **CLI** | Terminal usage | `npx oddkit <command>` |
| **MCP (local)** | Cursor, Claude Code | `npx oddkit init --claude` |
| **MCP (remote)** | Claude.ai iOS/iPad/web | Deploy `workers/` to Cloudflare |

See [workers/README.md](workers/README.md) for Cloudflare deployment.

## Documentation

| Doc | What It Covers |
Expand Down
16 changes: 16 additions & 0 deletions docs/CLAUDE-CODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ npx oddkit init --claude --project

This creates `.mcp.json` in your repository for project-specific configuration.

### Option 4: Claude.ai Mobile/Web (Remote MCP)

For Claude.ai on iOS, iPad, or web browsers, deploy oddkit as a Cloudflare Worker:

```bash
cd workers
npm install
npm run deploy
```

Then add the remote MCP server in Claude.ai:
1. Go to Settings → Integrations → MCP
2. Add server URL: `https://oddkit-mcp.<your-subdomain>.workers.dev/mcp`

See [workers/README.md](../workers/README.md) for full deployment instructions.

## Verify Setup

After init, restart Claude Code. You should see `oddkit_orchestrate` available as a tool.
Expand Down
9 changes: 9 additions & 0 deletions docs/MCP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

oddkit exposes an MCP (Model Context Protocol) server that allows Cursor, Claude Code, and other MCP-compatible hosts to use oddkit as a tool.

## Deployment Options

| Method | Transport | Use Case |
|--------|-----------|----------|
| **Local MCP** | stdio | Cursor, Claude Code (desktop) |
| **Remote MCP** | HTTP | Claude.ai (iOS, iPad, web) |

For remote deployment, see [workers/README.md](../workers/README.md).

## Zero-config Behavior (recommended)

Once oddkit MCP is installed (globally or project-local), agents automatically receive always-on guidance via MCP GetInstructions. This means:
Expand Down
15 changes: 8 additions & 7 deletions docs/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ Get running in 60 seconds.

## What's in the Box

oddkit has three layers:

| Layer | What It Is | Setup |
| ---------- | --------------------------------------------------------- | --------------------------- |
| **CLI** | Command-line tools (`oddkit librarian`, `validate`, etc.) | `npx oddkit <command>` |
| **MCP** | Model Context Protocol server for IDE integration | `npx oddkit init` |
| **Agents** | Subagent prompts (Epistemic Guide, Scribe) | Copy to `~/.cursor/agents/` |
oddkit has four layers:

| Layer | What It Is | Setup |
| ---------------- | --------------------------------------------------------- | ------------------------------ |
| **CLI** | Command-line tools (`oddkit librarian`, `validate`, etc.) | `npx oddkit <command>` |
| **MCP (local)** | Model Context Protocol server for IDE integration | `npx oddkit init` |
| **MCP (remote)** | Cloudflare Worker for Claude.ai iOS/iPad/web | Deploy `workers/` to Cloudflare |
| **Agents** | Subagent prompts (Epistemic Guide, Scribe) | Copy to `~/.cursor/agents/` |

**New to ODD?** Start with [ODD Agents](getting-started/agents.md) to understand the system.

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oddkit",
"version": "0.9.1",
"version": "0.10.0",
"description": "Agent-first CLI for ODD-governed repos. Epistemic terrain rendering with portable baseline.",
"type": "module",
"bin": {
Expand Down
3 changes: 3 additions & 0 deletions workers/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
.wrangler/
.dev.vars
93 changes: 93 additions & 0 deletions workers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# oddkit MCP Worker

Remote MCP server for oddkit, deployable to Cloudflare Workers. Enables oddkit in Claude.ai on iOS, iPad, and web.

## Features

- **oddkit_orchestrate** — Routes messages to librarian/validate/preflight/catalog
- **oddkit_librarian** — Policy Q&A with citations
- **oddkit_validate** — Completion claim validation

## Setup

1. **Install dependencies:**
```bash
cd workers
npm install
```

2. **Configure Cloudflare:**
- Update `wrangler.toml` with your account details
- Optionally add KV namespace for caching

3. **Deploy:**
```bash
npm run deploy
```

## Endpoints

| Path | Method | Description |
|------|--------|-------------|
| `/` | GET | Health check |
| `/health` | GET | Health check |
| `/mcp` | POST | MCP JSON-RPC endpoint |

## Connecting to Claude.ai

1. Go to Claude.ai Settings → Integrations → MCP
2. Add new MCP server:
- URL: `https://oddkit-mcp.<your-subdomain>.workers.dev/mcp`
- Name: `oddkit`

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `BASELINE_URL` | GitHub raw content URL for baseline | `https://raw.githubusercontent.com/klappy/klappy.dev/main` |
| `ODDKIT_VERSION` | Version string | `0.9.1` |

## Optional: KV Caching

To enable baseline index caching:

1. Create a KV namespace:
```bash
npx wrangler kv:namespace create BASELINE_CACHE
```

2. Update `wrangler.toml`:
```toml
[[kv_namespaces]]
binding = "BASELINE_CACHE"
id = "your-namespace-id"
```

## Local Development

```bash
npm run dev
```

Then test with:
```bash
curl -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

## Architecture

```
Claude.ai (iOS/iPad/Web)
↓ HTTPS
Cloudflare Worker (/mcp)
↓ JSON-RPC
runOrchestrate()
↓ fetch()
GitHub Raw Content API
klappy.dev baseline docs
```

The worker fetches the baseline index and documents directly from GitHub, eliminating the need for git clone in the serverless environment.
Loading