Harnesses

Mastra Code

Mastra's coding agent. LibSQL database for threads, messages and observational memory, hooks and MCP in JSON, reads Claude's files as its own, no headless mode.
IDmastracode09 / 1330 paths · project
Harness

Mastra Code

  • mastracode

LibSQL database for threads and memory. No headless mode yet, so no invoke.

Invoke
no headless mode
Models
no listing
MCP
json · mastracode
Agents file
none stable
Inferred 0 / 30

Access

GetgetHarness("mastracode")
CLIharnesses paths mastracode --json
Trymastracode in the explorer

Mastra Code stores everything it remembers in one LibSQL database under ~/.local/share/mastracode/ on Linux, threads and messages alongside its observational memory. Hooks are a JSON file rather than a directory, at project and user scope, and MCP servers sit in .mastracode/mcp.json and its global twin.

It reads Claude's files as its own: CLAUDE.md, .claude/CLAUDE.md, ~/.claude/CLAUDE.md and both skills directories, beside AGENTS.md and .mastracode/. No non-interactive mode is recorded, so invoke rejects before spawning and the CLI's run refuses it with the same message. MCP servers come from four local files, lowest first: mcpServers in the project's .claude/settings.local.json, ~/.mastracode/mcp.json, the project's .mcp.json and .mastracode/mcp.json, later names winning, with ~/.claude.json and Codex's config.toml joining on opt-in. The registry maps the three that are MCP files, so listMcpServers reads them and syncMcpServers rewrites the user one. Project writes go to .mastracode/mcp.json, and .mcp.json is listed as Claude's to edit. The settings file is Claude's too and stays out. All of them are the plain { command, args, env } and { url, headers } family, and the type field means nothing to Mastra Code: an entry is stdio when it has command, HTTP when it has url, and SSE gets settled at connect time. That's why the registry gives it its own mastracode dialect. A stale type next to a command doesn't turn the listing into SSE, the writer leaves type out, and an enabled flag on the master list is dropped rather than rewritten on every sync, because Mastra Code has no such switch.

Capabilities and invocation

  • mcp: yes
  • vision: yes
  • audio: no
  • video: no
  • tools: yes
  • streaming: yes

No non-interactive invocation is recorded, so invoke() rejects before spawning anything and every invocation mode reports false.

Paths

Templates as the registry stores them. ~, ${HOME}, ${TMPDIR} and %VAR% expand in resolve(); entries tagged with a platform are dropped on the others. Open in the explorer to see them expanded for a home directory of your choice.

PathsgetHarness("mastracode")30 templates · 7 groups

config

  • .mastracode/mcp.jsonprojectofficialall

    Project-scoped MCP server configurations.

  • ~/.mastracode/mcp.jsonuserofficialall

    Global MCP server configurations.

  • .mcp.jsonprojectofficialall

    Claude Code compatible project MCP servers, read below .mastracode/mcp.json.

  • .mastracode/hooks.jsonprojectofficialall

    Project-scoped hooks.

  • ~/.mastracode/hooks.jsonuserofficialall

    Global hooks.

sessions

  • ~/.local/share/mastracode/mastra.dbdataofficiallinux

    LibSQL database with threads, messages, and observational memory.

instructions

  • AGENTS.mdprojectofficialall
  • CLAUDE.mdprojectofficialall

    Supported for Claude Code compatibility.

  • .claude/CLAUDE.mdprojectofficialall

    Claude Code compatible.

  • .mastracode/AGENTS.mdprojectofficialall

    Alternative project-level location.

  • ~/.claude/CLAUDE.mduserofficialall

    Claude Code compatible.

  • ~/.mastracode/AGENTS.mduserofficialall

    Global user-level instructions.

skills

  • .mastracode/skills/projectofficialall
  • ~/.mastracode/skills/userofficialall

    Global user-level skills.

  • .claude/skills/projectofficialall

    Claude Code compatible.

  • ~/.claude/skills/userofficialall

    Claude Code compatible.

commands

  • .mastracode/commands/projectofficialall

    Markdown prompt commands; subdirectories become colon-separated command names.

  • ~/.mastracode/commands/userofficialall

    Global Markdown prompt commands.

  • .claude/commands/projectofficialall

    Claude compatibility.

  • ~/.claude/commands/userofficialall

    Claude compatibility.

  • .opencode/command/projectofficialall

    Mastra's OpenCode compatibility loader uses the singular command directory.

  • ~/.opencode/command/userofficialall

    Mastra's OpenCode compatibility loader uses the singular command directory.

promptTemplates

  • .mastracode/commands/projectofficialall

    Markdown prompt commands; subdirectories become colon-separated command names.

  • ~/.mastracode/commands/userofficialall

    Global Markdown prompt commands.

  • .claude/commands/projectofficialall

    Claude compatibility.

  • ~/.claude/commands/userofficialall

    Claude compatibility.

  • .opencode/command/projectofficialall

    Mastra's OpenCode compatibility loader uses the singular command directory.

  • ~/.opencode/command/userofficialall

    Mastra's OpenCode compatibility loader uses the singular command directory.

hooks

  • .mastracode/hooks.jsonprojectofficialall
  • ~/.mastracode/hooks.jsonuserofficialall

    Global hooks.

Empty

tempThat is not the same as the feature being missing.

MCP servers

FilemcpConfigs3 files
  • ~/.mastracode/mcp.jsonuser · json · mastracode · mcpServers
  • .mastracode/mcp.jsonproject · json · mastracode · mcpServers
  • .mcp.jsonproject · json · mastracode · mcpServers

Detection

CalldetectHarness()project markers only

envVars

None. Detection is by project markers only.

projectMarkers

  • .mastracode

Persistence

  • JSON - MCP and hooks config files. (official)
  • SQLite - LibSQL database for threads, messages, and observational memory. (official)

No stable user-scope instructions file, so syncAgentsFiles skips this harness.