Skip to content

Agent Architecture

Cursor

Cursor is a source-light desktop IDE host: the public GitHub repository is an issue tracker rather than full product source, while the product surface exposes agent workflows, rules, commands, extension-like behavior, and MCP-style tool integration through the IDE.

Source reviewed #4Checked 2026-07-06
Run type
Desktop
Adapter
json-stdio
Source
Closed / product homepage
Stars
Frontier

Archive Context

This page is one host entry inside the full architecture archive and keeps multi-surface products visible instead of collapsing them into a single run type.

42 host archive
Host page
cursor
Run cohort
Desktop: 9
Archive route
/agents

Host Surface Perspectives

The host is the primary architecture boundary. Each runnable surface below separates what the host owns from what agent-connector can safely install for Cursor.

1 surface entry

Desktop

desktop
Host entry
A desktop app or standalone editor owns window state, sign-in, project indexing, embedded terminal behavior, and local product storage.
Host owns
The desktop host owns orchestration UI, model routing, approval UX, background jobs, and any cloud or app-store managed extension points.
Connector role
agent-connector can write documented workspace/global config and content files, but it does not replace the desktop runtime or UI shell. Current wired connector surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
Implementation consequence
Desktop surfaces need source-review separation because product pages often document capabilities while runtime state lives in app-managed storage. No visible host-native gap is currently tracked for this surface.

Verified Architecture

Source-checked on 2026-07-06. These notes are intentionally separate from the generated surface matrix below.

Sequence #4

Source pass

Current source review findings are kept as the first architecture section so readers can separate external evidence from the generated local coverage model.

  • The public repository is a product tracker with download and feature links rather than full product source, so the page classifies Cursor as closed/product-homepage evidence.
  • Cursor is a desktop IDE/editor surface, not a terminal CLI row, which is why its entry-point diagram starts from Desktop.
  • Architecture claims should stay conservative: local file surfaces are represented through agent-connector adapter and platform research, while proprietary runtime internals are not inferred.

Runtime boundary

The adapter target is the desktop IDE host, not a transparent open-source CLI. Cursor owns the editor shell, chat/agent UI, indexing, model selection, extension runtime, and workspace trust boundaries, while agent-connector can only document verified writable surfaces.

  • The GitHub repository functions as a public issue tracker and download pointer rather than complete runtime source.
  • Claims about internals should therefore be source-light and evidence-labeled.
  • The row belongs in the desktop band because the product is an IDE-style host.

MCP registration

Cursor registers MCP servers in JSON files the adapter writes directly: user scope ~/.cursor/mcp.json and project scope <project>/.cursor/mcp.json, both under the mcpServers root key. Cursor supports its own ${env:VAR} interpolation, so environment, header, and URL values are rewritten to that token instead of being baked into the file.

  • The paths come from the adapter (adapters/cursor), not from Visual Studio Code ancestry.
  • Project-scope MCP is workspace-visible and can be committed alongside rules and commands.

Hook bridge

Cursor is a json-stdio hook host. The adapter writes <configDir>/hooks.json with the shape { version, hooks: { <cursorEvent>: [ { command, matcher? } ] } }; each entry is a flat command object rather than Claude's { matcher, hooks: [...] } wrapper. Replies are one JSON object on stdout with exit 0.

  • deny and ask carry permission plus user_message; modify carries updated_input.
  • Context injection uses agent_message on PreToolUse and additional_context on PostToolUse and SessionStart.
  • IDE commands and agent modes remain host UI affordances outside the hook contract.

Content surfaces

Cursor's useful content surfaces are rules, agent instructions, commands, project context, and editor-indexed knowledge. These should be represented as IDE content and memory surfaces rather than copied into CLI dot-directory assumptions.

  • Rules and project context are central to the host learning experience.
  • Workspace indexing and codebase search are host-owned capabilities outside agent-connector's file writer.

Marketplace and host-only affordances

Cursor's host-only value is the integrated IDE experience: agent UI, codebase index, model routing, editor actions, and extension ecosystem compatibility. The archive should mark it as source-light so students know which claims come from product surface evidence rather than source inspection.

  • Source-light does not mean unsupported; it means internal architecture claims need stricter wording.
  • Feature parity with VS Code extensions should not be assumed for connector writes.

Host-specific shape

Cursor is a desktop IDE surface backed by local MCP, hooks, rules, commands, skills, and subagent-style configuration; the adapter targets the byte-addressable desktop/editor files rather than a terminal CLI process.

  • Form factor: Desktop.
  • Native surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
  • Wired surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
  • Visible gaps: none.

Hooks

Hooks enter through a host-launched command that exchanges event JSON over stdio.

MCP

The adapter writes this host's native MCP registration dialect, including its root key, scope, transport fields, and environment syntax.

Memory

Managed memory text is written into the rules or memory file this host actually reads, with ownership markers for reversible uninstall.

Marketplace and affordances

Current install is a direct native-file write path; any package artifact is manual unless a driver is added.

  • Runtime handlers: none.
  • User-visible affordances: Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary..

Known Limits

  • Cursor internals are not fully visible through the public tracker repository; file contracts above come from the adapter and Cursor's hooks and MCP documentation.
  • Statusline and actions are not host surfaces here, so those coverage chips stay off by design.
  • Avoid deriving further file paths from VS Code without current Cursor-specific documentation.

Architecture Diagram

Host-specific flow for the Desktop surface.

json-stdio
Host-owned architecture flowHost surfaceDesktopRuntimejson-stdioNative artifactsMCP + hooks + content + memoryConnector boundarystdio eventsUser surfacecmds + skills + agents + memoryagent-connector writes only documented host artifacts; the host owns the agent loop.
  1. 1
    Entry point: Desktop

    Desktop or standalone editor app reads global/product storage plus workspace files before handing control to its embedded agent runtime.

  2. 2
    Connector package

    defineConnector package declares server, hooks, content, memory, and actions.

  3. 3
    Adapter module: cursor

    json-stdio renderer at src/adapters/cursor/index.ts.

  4. 4
    Native host artifacts

    Adapter writes MCP config + hook config + content files + memory/rules through this host's native file, package, or marketplace surface.

  5. 5
    Runtime boundary

    host launches JSON-stdio hook command

  6. 6
    User-visible surface

    Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary.

  7. 7
    Coverage ceiling

    6/6 native surfaces wired. No visible host-native gap in the current coverage matrix.

Component Diagram

Static parts of the Cursor integration and which side owns each one.

Components and ownershipCursor hosthostagent-connector packageconnectorcursor adapterjson-stdioNative artifactsartifactsRuntime bridgeruntimeUser-visible surfaceuser
  • Cursor host

    Desktop surface owns the model loop, UI shell, config discovery, and native lifecycle for this integration.

  • agent-connector package

    Normalizes connector declarations into MCP, hook, memory, content, and action payloads before delegating to a host adapter.

  • cursor adapter

    Implements the json-stdio translation layer in src/adapters/cursor/index.ts.

  • Native artifacts

    Adapter writes MCP config + hook config + content files + memory/rules through this host's native file, package, or marketplace surface.

  • Runtime bridge

    host launches JSON-stdio hook command

  • User-visible surface

    Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary.

Runtime Sequence Flow

Message order from install to runtime for the Desktop surface.

User / projectagent-connectorcursor adapterCursorAgent runtimeCoverage matrix1. Choose host adapter2. Resolve connector declaration3. Render host-native shape4. Host loads artifacts5. Run through host boundary6. Expose remaining ceiling
  1. 1 · User / project
    Choose host adapter

    Install or update starts against Cursor; the selected surface is Desktop.

  2. 2 · agent-connector
    Resolve connector declaration

    The package reads connector metadata and routes it to the cursor adapter instead of exposing a generic host contract.

  3. 3 · cursor adapter
    Render host-native shape

    Adapter writes MCP config + hook config + content files + memory/rules through this host's native file, package, or marketplace surface.

  4. 4 · Cursor
    Host loads artifacts

    host launches JSON-stdio hook command

  5. 5 · Agent runtime
    Run through host boundary

    Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary.

  6. 6 · Coverage matrix
    Expose remaining ceiling

    6/6 native surfaces wired. No visible host-native gap in the current coverage matrix.

Architecture Archive

The same five study axes are rendered for every host: runtime shape, hooks, MCP, memory, and host-only affordances.

Host-specific shape

Cursor is a desktop IDE surface backed by local MCP, hooks, rules, commands, skills, and subagent-style configuration; the adapter targets the byte-addressable desktop/editor files rather than a terminal CLI process.

  • Form factor: Desktop.
  • Native surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
  • Wired surfaces: MCP server, Hooks, Commands, Skills, Subagents, Memory.
  • Visible gaps: none.

Hooks

Hooks enter through a host-launched command that exchanges event JSON over stdio.

MCP

The adapter writes this host's native MCP registration dialect, including its root key, scope, transport fields, and environment syntax.

Memory

Managed memory text is written into the rules or memory file this host actually reads, with ownership markers for reversible uninstall.

Marketplace and affordances

Current install is a direct native-file write path; any package artifact is manual unless a driver is added.

  • Runtime handlers: none.
  • User-visible affordances: Users see managed commands + skills + subagents + memory surfaces after install; runtime-only surfaces stay behind the host boundary..

Special Feature Inventory

Host-specific capabilities separated from the generic surface matrix: lifecycle hooks, MCP registration, memory/rules, marketplace delivery, and UI or content affordances owned by the host.

Lifecycle hooks

Wired

Hooks enter through a host-launched command that exchanges event JSON over stdio.

MCP registration

Wired

The adapter writes this host's native MCP registration dialect, including its root key, scope, transport fields, and environment syntax.

Memory and rules

Wired

Managed memory text is written into the rules or memory file this host actually reads, with ownership markers for reversible uninstall.

Marketplace delivery

Direct files

Current install is a direct native-file write path; any package artifact is manual unless a driver is added.

Host-only affordances

3/3 wired

Wired host affordances: Commands, Skills, Subagents. Host-native gaps: none. Not confirmed: Statusline handler, Action affordances.

Source Review Notes

Latest source pass for host-specific architecture details. This is separate from generated adapter coverage and local drift guards.

Checked 2026-07-06Open review source
cursor/cursor public tracker
  • The public repository is a product tracker with download and feature links rather than full product source, so the page classifies Cursor as closed/product-homepage evidence.
  • Cursor is a desktop IDE/editor surface, not a terminal CLI row, which is why its entry-point diagram starts from Desktop.
  • Architecture claims should stay conservative: local file surfaces are represented through agent-connector adapter and platform research, while proprietary runtime internals are not inferred.

Evidence Map

Each host page ties public source evidence to the local adapter and drift guards that keep the rendered archive aligned with code.

Product source

Official product homepage or public tracker used when no open product repository is confirmed.

external
Open source

Local adapter implementation

Defines the install/uninstall behavior, native config rendering, capability flags, and any runtime parse/format bridge for this host.

local
src/adapters/cursor/index.ts

Platform metadata and host-native matrix

Records the form factor, public source target, ranking source, native host surfaces, and current agent-connector coverage cells.

local
site/src/platform-data.ts

Architecture drift guard

Asserts that every registered host has a page, diagram, host-specific brief, source link, form-factor band, and adapter-aligned surface data.

local
tests/docs/platform-drift.test.ts

Runtime Shape

Hooks are dispatched through a host-launched command. The adapter parses host JSON, calls the connector handler, and formats the reply back to the host contract.

MCP registration
Wired through this adapter
Hook bridge
Wired

Connector Surfaces

Static content

MCP server, Hooks, Commands, Skills, Subagents, Memory

Runtime handlers

No runtime handler surfaces wired

Surface Matrix

Wired means agent-connector installs it now. Host native marks support we know about but have not wired yet.

SurfaceStatus
MCP server
Static content
agent-connector installs this surface today.
Wired
Hooks
Static content
agent-connector installs this surface today.
Wired
Commands
Static content
agent-connector installs this surface today.
Wired
Skills
Static content
agent-connector installs this surface today.
Wired
Subagents
Static content
agent-connector installs this surface today.
Wired
Memory
Static content
agent-connector installs this surface today.
Wired
Statusline handler
Runtime handler
No confirmed host-native surface.
N/A
Action affordances
Runtime handler
No confirmed host-native surface.
N/A