Landlord
An MCP server that orchestrates parallel Claude agent sessions by decomposing natural-language tasks into contract-bound tenants with structured outputs and validation, all running over stdio.
README
Landlord
Parallel Claude agents with contracts, not prompts.
Landlord turns a single natural-language task into a plan of parallel Claude Agent SDK sessions — each bound by a contract (objective, checkpoints, JSON-schema outputs). Tenants that violate their contract get evicted and retried with fresh context. Every checkpoint output is validated against a JSON Schema and a structured LLM judge (via tool-use — no substring matching). Everything runs as an MCP server over stdio, so any MCP client (Claude Code, Cursor, Cline) can drive it.
Why
- No API credits required. Drives
claude_agent_sdk.query(), which honorsCLAUDE_CODE_OAUTH_TOKEN. Your Claude Pro/Max subscription runs decompose, tenants, and the judge. - Contracts, not prompts. Structured output enforced by JSON Schema + LLM judge on every checkpoint. No "I hope the model said PASS."
- Tenants inherit your Claude Code config. Skills,
CLAUDE.md, hooks, user MCP servers — all available inside every tenant viasetting_sources=["user"]andskills="all". - 5-tool MCP surface —
start_orchestration,approve_plan,get_status,get_artifacts,cancel. That's the whole API. - ~1,200 LOC runtime, 52 tests. Readable in an afternoon.
60-second install
pip install -e .
claude setup-token # one-time: get your OAuth token
setx CLAUDE_CODE_OAUTH_TOKEN "<paste>" # Windows. Unix: export CLAUDE_CODE_OAUTH_TOKEN=...
claude mcp add -s user landlord landlord-mcp
Restart Claude Code. The five Landlord tools become discoverable; ask the model to orchestrate something.
Watch it work
Every tenant's SDK chatter streams to a tailable log:
tail -f ./landlord-output/<job_id>/job.json # orchestration state
tail -f ./landlord-output/<job_id>/<tenant_id>/session.log # tenant model activity
ls ./landlord-output/<job_id>/shared/ # dependency artifacts
Auth details
Authenticate against your Claude Pro/Max subscription (no API credits needed):
claude setup-token
Set the resulting token in your environment:
# Windows (persistent)
setx CLAUDE_CODE_OAUTH_TOKEN "<token>"
# bash/zsh
export CLAUDE_CODE_OAUTH_TOKEN=<token>
(Advanced: if you'd rather pay per-token API usage, set ANTHROPIC_API_KEY
instead — the underlying claude-agent-sdk accepts either.)
Run the MCP server
landlord-mcp
This speaks MCP over stdio. Normally you don't run it directly — you point an MCP
client at it. Easiest is the claude CLI:
claude mcp add -s user landlord <path-to-landlord-mcp-executable>
Or add this to ~/.claude.json (user scope) manually:
{
"mcpServers": {
"landlord": {
"command": "landlord-mcp"
}
}
}
Restart Claude Code; the five Landlord tools will be discoverable to the model.
Tenant inheritance
Tenants spawned by the orchestrator run as Claude Agent SDK sessions with
setting_sources=["user"] and skills="all". That means each tenant inherits:
- All user-level skills (invokable via the
Skilltool) - Your user
CLAUDE.md(instructions/preferences) - Your user-level MCP servers and hooks
- User memory
So a tenant can, for example, invoke /superpowers:writing-plans itself if
your orchestrator decomposes "build feature X" into a tenant that needs to
plan before coding. Per-contract skill allowlisting is a v2 feature; today
it's all-or-nothing.
Tool surface
| Tool | Purpose |
|---|---|
start_orchestration(prompt, output_dir?) |
Decompose the prompt into a plan. Returns job_id and the plan awaiting approval. |
approve_plan(job_id, edits?) |
Approve (or replace with edits) the plan. Launches tenants. |
get_status(job_id) |
Poll overall status plus per-tenant state. |
get_artifacts(job_id) |
Retrieve final artifacts and file listings once the job is done/cancelled. |
cancel(job_id) |
Cancel a running or pending job. |
Configuration
| Env var | Default | Purpose |
|---|---|---|
CLAUDE_CODE_OAUTH_TOKEN |
— | Required for Pro/Max users (from claude setup-token). |
ANTHROPIC_API_KEY |
— | Alternative to OAuth token; pay-per-use API billing. |
LANDLORD_LANDLORD_MODEL |
claude-opus-4-7 |
Decomposition + judge model. |
LANDLORD_TENANT_MODEL |
claude-sonnet-4-6 |
Tenant SDK session model. |
LANDLORD_OUTPUT_DIR |
./landlord-output |
Root directory for job outputs. |
LANDLORD_MAX_RETRIES |
3 |
Default max retries per tenant. |
Legacy CLI
The old litellm-based CLI is preserved as landlord:
pip install -e ".[legacy]"
landlord "your task"
See landlord/legacy/ for source.
Development
pip install -e ".[dev]"
pytest
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。