MCP
stdio MCP server, dashboard API key, host JSON config.
Overview
Apender exposes a stdio MCP server that forwards tool calls to the API. The repo stays on disk; intent, answers, and optional project metadata are sent over HTTPS. Host-specific file locations: Integration guides.
Environment variables
Set these in the MCP host config (Cursor, Claude Code, etc.):
APD_API_URL- API base URL from Dashboard → API keys. This is where the MCP server sends requests — not your app’s URL.
APD_API_KEY- The apd_live_… key from the same page. Env or secret store only — not git.
APD_WORKSPACE_ROOT- Absolute path to the git repo root. Used for project context sent with sessions.
Example MCP server block (replace placeholders):
{
"mcpServers": {
"apender": {
"command": "node",
"args": ["/absolute/path/to/apender-mcp-server"],
"env": {
"APD_API_URL": "<API base URL from Dashboard → API keys>",
"APD_API_KEY": "apd_live_your_key",
"APD_WORKSPACE_ROOT": "/absolute/path/to/git/repo"
}
}
}
}Tools the agent can call
runtime_startSession- Start engineering or simple session from intent
runtime_message- Gateway message / follow-up
runtime_answerQuestion- Submit user answers when halted
runtime_getSession- Poll session state
runtime_getSpecification- Fetch compiled specification
runtime_getSimpleTaskBrief- Simple-path brief
runtime_syncProjectIntelligence- Refresh PIG for workspace
runtime_detectProjectIdentity- Detect git remote / workspace identity
runtime_discoverRepository- Discovery-only pass
runtime_getProjectGraph- PIG snapshot for session
Typical workflow
- Agent calls
runtime_startSessionwith the intent string. - If the response asks for input, the agent surfaces questions in chat, then calls
runtime_answerQuestion. - When complete, the agent fetches the plan and edits the repo with normal file tools.
Cursor rules (recommended)
MCP exposes tools; it does not force the agent to use them on every task. Add a project rule so Cursor routes implementation work through Apender before editing code. Copy the snippet into .cursor/rules/apender.mdc at your repo root (create the folder if needed).
Set alwaysApply: true in the frontmatter for every chat, or use alwaysApply: false with globs (e.g. **/*) if you only want the rule when certain files are in context.
---
description: Route implementation work through Apender MCP before editing code
alwaysApply: true
---
# Apender engineering runtime (MCP)
You are the **Builder** in the IDE. **Apender** is the engineering runtime. Use Apender MCP tools for implementation work before changing application code.
## When to use Apender
Call the runtime when the user asks you to **build, change, or fix product behavior** (features, refactors, integrations, non-trivial bugs). Skip Apender only when the user explicitly says to skip it, or for **read-only** tasks (explain code, review, search) and **mechanical** edits (typo, format-only) with no behavior change.
## Required workflow
1. Call `runtime_startSession` with a clear intent string (or `runtime_message` to continue an existing session).
2. If `status === "waiting_user"` or `builderDirective.halt === true`:
- **Stop** all coding and file edits immediately.
- Ask the user **every** question in `builderDirective.questionsToAsk` / `pendingQuestions` (use the question text verbatim).
- After the user answers, call `runtime_answerQuestion` with `{ sessionId, answers: { [key]: reply } }` (`single_choice`: string; `multi_choice`: string[]; `free_text`: string).
- Do **not** invent answers, skip questions, or call `runtime_getSpecification` while halted.
3. Poll with `runtime_getSession` until `status === "completed"` (or handle `failed` with the user).
4. Call `runtime_getSpecification`, then implement from that specification using normal file tools.
## Scope changes
If requirements change materially after a spec exists, send `runtime_message` or start a new session — do not silently drift from the approved plan.
## Prerequisites
Apender MCP must be configured (`APD_API_KEY`, `APD_API_URL`, `APD_WORKSPACE_ROOT`). See project docs or Dashboard → API keys.Cursor-specific MCP file location: Cursor integration.