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.
Install
Section titled “Install”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:
claude mcp add --scope user basestudio -- basestudio mcpCodex:
codex mcp add basestudio -- basestudio mcpOther agents: add a local (stdio) server with the command basestudio and the argument mcp.
Claude Desktop bundle
Section titled “Claude Desktop bundle”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 Agent Skill
Section titled “The Agent Skill”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:
npx skills add gabrielbacha/basestudio-agent-kitMost 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 |
Fields
Section titled “Fields”| 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 |
Records
Section titled “Records”| 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 |
Databases
Section titled “Databases”| 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 |
Images (databases)
Section titled “Images (databases)”| 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 |
Import and export
Section titled “Import and export”| 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.
Values and batches
Section titled “Values and batches”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}Task messages and review
Section titled “Task messages and review”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.
Safe changes
Section titled “Safe changes”- Revisions.
get_recordreturns a revision. Pass it toset_recordasexpect_revision, and the change is refused if the note changed after the agent read it. - Dry runs.
set_record,bulk_set,apply_changesandtrash_recordstakedry_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
undotool 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_appandcreate_databasecreate files only inside the vault or folder of the Base or export they use;create_databaseneeds an Obsidian vault. To allow another folder, start the server withbasestudio mcp --allow-write FOLDER(repeat it for more folders), or with--allow-write-anywhereto remove the limit. - Errors. A batch can save some records and refuse others. A tool error or
isError: truedoes 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.