basalt_mcp 0.1.0
basalt_mcp: ^0.1.0 copied to clipboard
MCP server that lets AI agents inspect live Basalt database connections in a running debug app — schema, table data, and SQL via VM service extensions.
basalt_mcp example #
basalt_mcp is an MCP server executable, so its "example" is a host
configuration plus a running debug app — not a Dart snippet.
1. Instrument the app #
Register every connection you want to inspect (debug/profile mode only):
import 'package:basalt/devtools.dart';
final db = SqliteConnection.open('app.db');
BasaltDevTools.register(db, name: 'main');
Run the app and note the VM service URI it prints
(ws://127.0.0.1:.../ws).
2. Register the server with an MCP host #
Cursor / Claude Code / any stdio MCP host:
{
"mcpServers": {
"basalt": {
"command": "dart",
"args": ["pub", "global", "run", "basalt_mcp"]
}
}
}
(after dart pub global activate basalt_mcp).
3. Inspect from the agent #
A typical session an agent drives:
connect— attach to the app's VM service URI.list_instances— registered Basalt connections.get_schema— tables, columns, and foreign keys.get_table_data— page through rows, with filters and ordering.run_sql/update_row— ad-hoc queries and edits.disconnect— detach when done.
See doc/getting_started.md for the full tool reference.