Add mcp server#308
Merged
morishin merged 7 commits intobdash-app:masterfrom Feb 20, 2026
Merged
Conversation
99c3a7f to
79ed1a2
Compare
Collaborator
|
便利な機能追加ありがとうございます! ポーリングですが、mcp サーバーを使っているかどうかに関わらず Bdash.app を起動している間はずっと SQLite DB に差分があるか毎秒チェックし続けていますよね。 |
morishin
requested changes
Feb 19, 2026
Contributor
Author
フォーカスがあたったら更新する、というほううが良さそうなのでそのようにしたいと思います! |
e6af75c to
1a27e54
Compare
morishin
approved these changes
Feb 20, 2026
Collaborator
morishin
left a comment
There was a problem hiding this comment.
動作確認できました!ちょっと僕の方で修正したものがあるのですが、それはこれのマージ後に PR にします。
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When writing SQL queries for data analysis, we often need to look up schema information and column details manually, then pass that context to AI assistants like Claude. By integrating MCP, Bdash can directly provide schema, table, and query information to AI tools — enabling faster, more efficient analysis workflows.
This change focuses on MCP-based interaction only (reading schema, writing queries). Query execution remains a human action and is intentionally out of scope.
Summary
Details
MCP Server (
src/mcp/)A standalone Node.js MCP server that reads Bdash's SQLite database and connects to configured data sources. Provides the following tools:
list_datasourceslist_queriesget_querywrite_querycreate_querylist_tablesget_table_schemaBundled into the packaged app via
electron-builder'sextraResources.Query polling
Since MCP server writes directly to the SQLite database, the renderer process needs to detect those changes. Added 1-second polling that checks
getCountandgetUpdatedAtto refresh the query list and editor content when external changes are detected.Settings page
Added an MCP Server section at the bottom of Settings that displays a JSON configuration snippet with the correct server path. Users can copy it to their MCP client config with one click.
You can test this locally
Then add the MCP server configuration to your Claude Code settings (
.claude.json). You can get the JSON snippet from Settings > MCP Server section in the app and copy it with one click.Note: In the development environment, the MCP server path will point to the Electron binary inside
node_modules(e.g..../node_modules/electron/dist/Electron.app/Contents/Resources/mcp/server.js). In a production build, it will point to the installed application path (e.g./Applications/Bdash.app/Contents/Resources/mcp/server.js).Once configured, try asking Claude Code to list your data sources or write a query — changes should appear in the Bdash UI within a few seconds.