This is a web application for sharing SQL queries and data analysis results from Bdash.
Bdash Server is powered by Blitz.js using Next.js and Prisma.
Related blog post: https://techlife.cookpad.com/entry/2021/06/11/120000
- Share SQL queries, query results, and charts from the Bdash client as a web page
- Add descriptions to your queries
- Search queries across all users
/api/mcp
is an endpoint that provides MCP server (Streamable HTTP Transport).
It provides a tool called search_bdash_queries
that allows keyword searching of queries.
Set the Authorization
header with either:
Bearer <user_access_token>
- User's access token from the web interfaceBearer <service_key>
- Service key created with the batch script
Create a service key using the batch script:
# Generate random key
$ DATABASE_URL=mysql://... npm run task task/create_service_key.ts -- --name "my-app"
# Use specific key with expiration
$ DATABASE_URL=mysql://... npm run task task/create_service_key.ts -- --name "my-app" --key "your-key" --expires "2025-12-31"
Delete a service key by name:
# Delete service key
$ DATABASE_URL=mysql://... npm run task task/delete_service_key.ts -- --name "my-app"
Below is an example of Cursor's mcp.json
configuration. You can also add this configuration using the "Add to Cursor" button in the settings screen.
Create a local environment file by copying the example:
$ cp .env.local.example .env.local
Add your GOOGLE_CLIENT_ID
and GOOGLE_CLIENT_SECRET
for authentication.
You can generate OAuth web client credentials by following these steps: https://support.google.com/workspacemigrate/answer/9222992
Configure your OAuth settings:
- Set
http://localhost:3000
as Authorized JavaScript origins - Set
http://localhost:3000/api/auth/google/callback
as Authorized redirect URIs
Start the Docker containers:
$ docker compose -f docker-compose-dev.yml up
Create databases using Prisma:
$ yarn db:push
Start the Docker containers:
$ docker compose -f docker-compose-dev.yml up
Start the development server:
$ yarn dev
MIT