Content
# harmonix
> Orchestrate your MCP servers. Connect any endpoint, browse every tool, schedule prompt-driven automations on a calendar.
**harmonix** is a multi-tenant web app that connects to Model Context Protocol (MCP) servers, imports their tool catalogs, and lets you compose **prompt-driven, agentic automations** that fire on a cron schedule.
## Highlights
- **Any MCP endpoint** — Streamable HTTP, legacy HTTP+SSE, custom HTTP. Point at any MCP server you have or build.
- **All tools, imported** — `tools/list` is called on connect; the full catalog (name, description, JSON input schema) is persisted so the automation builder can use it.
- **Agentic flows** — automations run as a multi-step decision tree: the LLM calls a tool, sees the result, decides the next call, branching across servers. Or constrain it to a single tool.
- **AI picks the tool** — leave tools unconstrained and the model picks from your catalog at run time.
- **Auth your way** — header, bearer, basic, query string, OAuth2 client credentials. Secrets encrypted at rest with AES-256-GCM, AAD-bound to the owner tenant.
- **Cron with a calendar** — 5/15/60 min, daily, weekly, monthly (with day picker), or raw cron. Every upcoming run plotted on the calendar.
- **Multi-tenant** — every row is owned by a user; the data layer rejects cross-tenant reads.
- **Cloudflare-ready** — designed to deploy to Cloudflare Pages + Workers + D1 + Cron Triggers (production path documented below).
## Quick start (local)
```bash
pnpm install
pnpm dev
# open http://localhost:3000
```
Then in the UI:
1. Sign in with any email (a tenant is created automatically).
2. **MCP Servers → Add server**: paste your endpoint URL + auth.
3. Tools are imported automatically; browse them under **Tools**.
4. **Automations → New automation**: write a prompt, choose tools (or "AI picks"), pick a cadence.
5. Watch the run on **Calendar** or **Runs**.
Set `ANTHROPIC_API_KEY` to enable the agentic LLM loop. Without it, automations fall back to a dry-run that calls the first allowed tool.
See `.env.example` for the full list of environment variables.
## Architecture
```
Browser ──► Next.js (App Router, Node runtime)
│
├── /login — email-based signed-cookie session
├── /app — dashboard / servers / tools / automations / calendar / runs
└── server/
├── store.ts — tenant-scoped store (local: JSON file; prod: D1)
├── session.ts — HMAC-signed session cookie
├── crypto.ts — AES-256-GCM seal/open, owner-bound AAD
├── mcp/ — JSON-RPC client over Streamable HTTP / SSE / HTTP
├── cron.ts — friendly schedule → cron, next/upcoming runs
├── agent.ts — Anthropic tool-use loop driving MCP calls
└── scheduler.ts — in-process tick; production: Cloudflare Cron Trigger
```
### Production: Cloudflare
The Cloudflare deploy path is wired in `wrangler.toml` and `drizzle/0000_init.sql`:
- **Cloudflare Pages** for Next.js (via `@opennextjs/cloudflare`)
- **D1** for the schema in `drizzle/` (same domain model as the local file store)
- **Cron Triggers** firing the scheduler every 5 minutes
- **KV** for short-lived state if needed
To enable the Cloudflare path, swap `src/server/store.ts` with the D1-backed repo (`src/server/repo.ts` provides the same surface area) and bind D1/KV in `wrangler.toml`.
## Multi-tenant guarantees
- Every row in every domain table has a `userId`.
- Every store function requires `userId` as the first argument — there are no global read paths.
- Encrypted credentials use the owner's `userId` as AES-GCM **additional authenticated data**; ciphertext from one tenant won't decrypt under another.
- The scheduler dispatches each automation with `automation.userId`, and the agent loader only sees tools belonging to that user.
## License
Proprietary — Copyright (c) 2026 hybriden. All rights reserved.
This source code is published for transparency, not for reuse. No license
to use, copy, modify, or distribute the Software is granted unless you
have an explicit written agreement with hybriden. See [`LICENSE`](LICENSE)
for the full terms. To request a license, contact `hans.christian.thjomoe@gmail.com`.
Connection Info
You Might Also Like
Train-in-Silence
The first Task-Aware MCP server and automated VRAM calculator for LLM...
stacklit
108,000 lines of code. 4,000 tokens of index. One command makes any repo...
AppClaw
AI-powered mobile automation agent — describe what you want in plain...
pdf-mcp
Production-ready MCP server for PDF processing with intelligent caching....
kotadb
Local-only code intelligence API for AI developer workflows (Bun +...
gemini-api-docs-mcp
A remote HTTP MCP server for searching Google Gemini API documentation.