Skip to content

MCP server and Agent Skill

Let Claude Code, Codex and other AI agents query and change a Base through BaseStudio's MCP server.

BaseStudio includes an MCP server for AI agents. An agent such as Claude Code, Codex or Claude Desktop can list a Base’s views and properties, query a view, and change, create and trash records. The server runs BaseStudio’s own code, so the agent sees the rows that the table shows, and its changes follow the app’s rules.

The server is part of the command line, so install that first: on macOS, select BaseStudio → Install Command Line Tool…; on Linux, select Install Command Line Tool… in the app menu at the bottom of the sidebar (the item shows only until the command is installed). Then add the server to your agent. The bundle option below starts the installed app directly and does not need the command-line link.

Claude Code:

Terminal window
claude mcp add --scope user basestudio -- basestudio mcp

Codex:

Terminal window
codex mcp add basestudio -- basestudio mcp

Other agents: add a local (stdio) server with the command basestudio and the argument mcp.

Open basestudio.mcpb from the agent-kit release. It finds the installed app on macOS (/Applications or your home folder’s Applications directory) and on Linux (~/.local/bin/basestudio or ~/.local/share/BaseStudio/command-line/bin/basestudio). This option does not require ~/.local/bin in PATH.

The BaseStudio skill teaches an agent the order of work, the value syntax and how to recover from a refused change. It uses the MCP tools when they are available, and the command line when they are not. Install it for Claude Code, Codex, Cursor and other agents:

Terminal window
npx skills add gabrielbacha/basestudio-agent-kit

Most tools take base (an absolute .base or .basestudio path), optional vault, and optional table (the main table by default). A view is a name or a position written as text, starting at "0". query uses a first view and 500-row page by default; its maximum page is 5,000 rows. limit and offset are numbers.

The table lists each tool’s other input fields. Optional fields and value syntax are described by the tool’s input schema in your agent. Each tool runs the linked command with the same rules. create_database and import_app take path instead of base, and do not take vault or table.

Tool Command Other inputs Changes files
list_views views — No
get_schema schema — No
query query view, where, search, columns, limit, offset No
get_record get record No
resolve_link resolve link No
list_versions versions record, version No
list_backlinks backlinks record No
count_records counts view, by No
Tool Command Other inputs Changes files
check_base check — No
fix_base check --fix — Yes
copy_view_settings copy-view-settings from, to, parts, dry_run Yes
set_view_filters set-filters view, filter, clear, dry_run Yes
delete_view delete-view view, dry_run Yes
create_view create-view name, kind, view Yes
rename_view rename-view view, name Yes
duplicate_view duplicate-view view, name Yes
move_view move-view view, to Yes
set_view set-view view, sort, group, columns, widths, chart, dry_run Yes
set_base_filters set-base-filters filter, clear, dry_run Yes
Tool Command Other inputs Changes files
add_option add-option property, value, color Yes
rename_options rename-option property, renames, dry_run Yes
set_options set-options property, options, dry_run Yes
set_property_type set-type property, type, view, clear_incompatible, dry_run Yes
rename_property rename-property property, name Yes
delete_properties delete-property properties, dry_run Yes
add_property add-property name, type, options, view Yes
add_link_property add-link-property name, links, reverse Yes
set_formula set-formula name, formula, view, dry_run Yes
duplicate_property duplicate-property property, name Yes
describe_property describe-property property, text Yes
set_property_format set-format property, settings, dry_run Yes
rename_property_key rename-key property, key, dry_run Yes
Tool Command Other inputs Changes files
list_tasks tasks view, owner, mentions, updates, attention, limit No
add_task_activity comment record, text, state, path, dry_run Yes
apply_task_update apply-update record, expect_revision, changes, summary, needs_you, dry_run Yes
setup_tasks tasks-setup replace_views, off, dry_run Yes
complete_task complete-task record, dry_run Yes
Tool Command Other inputs Changes files
set_record set record, changes, body, expect_revision, dry_run Yes
park_records park records, until, until_done, dry_run Yes
unpark_records unpark records, dry_run Yes
list_parked parked — No
bulk_set bulk-set changes, view, where, search, all, dry_run Yes
apply_changes apply records, dry_run Yes
create_record create changes, view, name, folder, body Yes
trash_records trash records, dry_run Yes
list_trash trash --list — No
restore_records restore records Yes
rename_record rename-record record, name, dry_run Yes
duplicate_record duplicate-record record, name Yes
restore_version restore-version record, version, dry_run Yes
Tool Command Other inputs Changes files
history history — No
undo undo steps Yes
redo redo steps Yes
Tool Command Other inputs Changes files
import_to_database import-to-database out, todo, dry_run Yes
list_tables tables — No
create_table create-table name Yes
rename_table rename-table from, name Yes
duplicate_table duplicate-table from, name, no_records Yes
delete_table delete-table from, dry_run Yes
Tool Command Other inputs Changes files
image_settings images compression, download Yes
optimize_images optimize-images compression, download, dry_run Yes
delete_image_originals delete-originals dry_run Yes
Tool Command Other inputs Changes files
export_csv export-csv out, view Yes
import_csv import-csv csv, dry_run Yes
create_database create-database path, template, todo Yes
import_app import-app path, more, app, out, dry_run Yes

Every change is signed with the MCP client’s name (clientInfo). The undo history and task activity show that name. Record and schema edits use undo. Display edits such as set_view and copy_view_settings follow view saving and can be drafts when autosave is off; they do not enter undo history. Exporting CSV creates a new file; it does not change the Base, and it is not an undo action.

Property changes are strings such as status=Done, tags:=["a","b"] and tags+=web. columns, where, changes, records and filter are arrays where the schema asks for them. set_options takes an options array of objects with value and optional color, category, key, label and description. Include every existing option once; use rename_options and add_option to change option values. set_property_format takes a settings object; null removes a setting. See the command reference for supported keys.

apply_changes takes an records array. Each entry names one record and can have changes, values, body and expectRevision. Unlike set_record’s expect_revision, the revision field inside an entry is camelCase:

{
"base": "/Users/me/Vault/Projects.base",
"records": [{ "record": "Launch", "changes": ["status=Done"], "expectRevision": "<revision from get_record>" }],
"dry_run": true
}

list_tasks with updates: true finds tasks with a Message to Agent; attention: true finds tasks that need the person. owner matches Assignee or Agent Assigned, including Any agent for known agents.

Keep the task’s revision returned by list_tasks or get_record. Pass that exact value as expect_revision to apply_task_update, with the task, its field changes, and a summary. A revision mismatch refuses the update before it adds Activity or clears Message to Agent. In one undo action, a successful update adds the message and then the summary to Activity as two entries, clears the message, and sets Agent Status to Awaiting review. The person checks the result and sets Agent Status to Done. If the message is unclear, send needs_you with a question and no changes. This sets Needs you. add_task_activity adds a comment or report without removing earlier entries.

  • Revisions. get_record returns a revision. Pass it to set_record as expect_revision, and the change is refused if the note changed after the agent read it.
  • Dry runs. set_record, bulk_set, apply_changes and trash_records take dry_run, which reports each change without writing it.
  • Undo. Record and schema edits join the Base’s undo history, which the app shares. The app’s Undo reverses an agent’s change, and the undo tool reverses a change made in the app. An action whose notes changed since is refused, not forced.
  • New files. export_csv, import_to_database, import_app and create_database create files only inside the vault or folder of the Base or export they use; create_database needs an Obsidian vault. To allow another folder, start the server with basestudio mcp --allow-write FOLDER (repeat it for more folders), or with --allow-write-anywhere to remove the limit.
  • Errors. A batch can save some records and refuse others. A tool error or isError: true does not mean nothing changed. Read each record’s result and retry only refused records after correcting the cause or reading a new revision.

While the app is open, each call runs in the app, and the app shows the change at once. With the app closed, the call runs on its own with the same rules. The server applies the same free-version limits as the app.