Project Planning with Linear MCP
Connect contenox to Linear and let it read your actual codebase, then create grounded tickets — no generic checklists, no copy-paste. Every issue references the real files it found.
What this recipe does: reads next.config.ts and the CI workflow, understands the current deployment setup, lists your Linear teams, then creates one ticket per actionable task — each one pointing at the exact file and line that needs changing.
Setup (one time)
# Register Linear's MCP server (HTTP transport + OAuth)
contenox mcp add linear https://mcp.linear.app/mcp --auth-type oauth
# Authenticate — opens your browser for Linear OAuth
contenox mcp auth linear
Note
Contenox handles the entire OAuth 2.1 flow — dynamic client registration, browser redirect, token exchange, and refresh. After this one step, the token lives in SQLite and rotates automatically forever.
The Chain
MCP tools need to be explicitly allowed in the chain's hooks list alongside local_shell:
cat .contenox/chain-linear-planner.json
{
"id": "chain-linear-planner",
"tasks": [{
"id": "plan",
"handler": "chat_completion",
"system_instruction": "You have shell access and Linear via MCP. Read files first, then create grounded issues. Never create generic issues — every issue must reference specific files you actually read.",
"execute_config": {
"model": "{{var:model}}",
"provider": "{{var:provider}}",
"hooks": ["local_shell", "local_fs", "linear"]
},
"transition": {
"branches": [
{"operator": "equals", "when": "tool-call", "goto": "run_tools"},
{"operator": "default", "when": "", "goto": "end"}
]
}
}, {
"id": "run_tools",
"handler": "execute_tool_calls",
"input_var": "plan",
"transition": {
"branches": [{"operator": "default", "when": "", "goto": "plan"}]
}
}],
"token_limit": 65536
}
Recipe: Plan a GCP Cloud Run Deployment
Run this from the root of your repo:
contenox run --chain .contenox/chain-linear-planner.json --shell \
"Read enterprise/site/next.config.ts and .github/workflows/dockerpublish.yml.
List your Linear teams. Then create one Linear issue per task needed to
deploy the enterprise site to GCP Cloud Run. Reference specific files and
line numbers in each issue description."
What the agent actually did:
cat enterprise/site/next.config.ts→ foundoutput: "export"andtrailingSlash: true(GitHub Pages config)cat .github/workflows/dockerpublish.yml→ found the Docker build/push steps and thegh-pagesdeploy actionls enterprise/site/Dockerfile→ not found (missing)- Listed Linear teams → found
Development - Created three tickets:
| Ticket | Title | Grounded in |
|---|---|---|
| DEV-116 | Configure Next.js output for Cloud Run deployment | next.config.ts lines 3-6: output: "export" |
| DEV-117 | Adapt Dockerfile for Cloud Run deployment | dockerpublish.yml lines 58-62: runtime-api Docker build step |
| DEV-118 | Create Cloud Run service for enterprise site | dockerpublish.yml lines 58-65: GHCR image name |
Why It Works
contenox run with --shell gives the model real file access. The Linear MCP gives it real write access to your project tracker. Together, the model doesn't guess — it reads your files and creates issues that a human engineer would write.
The persistent MCP connection means the model's Linear session stays open across all tool calls. If it needed to fetch an issue, update it, and create a child — that's one unbroken conversation with Linear's API, not three separate auth flows.
Adapting This Recipe
Change the prompt to match your team's workflow:
# Plan a database migration
contenox run --chain .contenox/chain-linear-planner.json --shell \
"Read the schema files in db/migrations/ and create Linear issues for
migrating from Postgres 14 to 16. One issue per breaking change found."
# Triage a failing test suite
go test ./... 2>&1 | contenox run --chain .contenox/chain-linear-planner.json \
"Create a Linear bug ticket for each failing test. Include the test name
and the exact error message in the description."
# Break down a feature from a spec file
cat SPEC.md | contenox run --chain .contenox/chain-linear-planner.json \
"Read this spec and create Linear issues for each implementation task.
Use the spec section headers as issue titles."