Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Vscode Copilot Database

FreeNot checked

VS Code Copilot database MCP — add a free cloud database to GitHub Copilot agent mode via mcp.json

GitHubEmbed

About

VS Code Copilot database MCP — add a free cloud database to GitHub Copilot agent mode via mcp.json

README

VS Code Copilot MySQL Secrets

A committable .vscode/mcp.json that gives Copilot's agent mode a live database, without putting the credential in the file.

60-second setup

  1. Get a database and a token: sign up at freebase.cloud, create a session, pick an engine, then Settings → MCP → New Token and copy the URL.
  2. In VS Code, open the Command Palette and run MCP: Add ServerHTTP → paste the URL → give it a name → choose Workspace to write .vscode/mcp.json, or Global for all projects.
  3. Open the Chat view, switch the mode dropdown to Agent, and click the tools icon to confirm the four database tools are listed and ticked.
  4. Ask it something that requires data: "how many loans are overdue right now?"

That is the whole thing. The rest of this file is about the config format, the input-prompt trick that makes the file safe to commit, and what to do when the server shows as stopped.

The config format

{
  "servers": {
    "lending": {
      "type": "http",
      "url": "https://freebase.cloud/api/mcp/YOUR_TOKEN"
    }
  }
}

Two details differ from every other editor:

  • The top-level key is servers, not mcpServers. VS Code will not read a file that uses the other spelling, and it does not tell you why.
  • "type": "http" is required. Cursor infers the transport and rejects the key entirely; VS Code wants it stated. These two facts are the source of most cross-editor copy-paste failures, in both directions.

Path: .vscode/mcp.json in the workspace, or your user-level mcp.json reachable from MCP: Open User Configuration.

Keeping the token out of the repo

This is the part worth stealing even if you use a different database. VS Code supports an inputs array — the same mechanism launch.json uses — and it substitutes the value into the server definition at startup:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "freebase-token",
      "description": "freebase.cloud MCP token",
      "password": true
    }
  ],
  "servers": {
    "lending": {
      "type": "http",
      "url": "https://freebase.cloud/api/mcp/${input:freebase-token}"
    }
  }
}

The first time the server starts, VS Code shows a masked input box. The value is stored in the editor's secret storage, not in the file. The file itself contains only the placeholder ${input:freebase-token} — so it can be committed, reviewed in a pull request, and shared with the team, and every developer supplies their own token on first run. To change it later, MCP: Reset Cached Tools or clearing the input from the server's context menu re-prompts.

No other MCP client in common use handles this as cleanly. Cursor and Windsurf both require the literal secret in the JSON, which means gitignoring the file and losing the ability to share the configuration at all. Because freebase.cloud carries its token in the URL path rather than an Authorization header, the whole credential fits in one interpolated string — nothing else in the entry needs to change.

The committed file in this repo, .vscode/mcp.json, is exactly this. Open the repository in VS Code and you will be prompted for a token rather than handed a broken config.

Using it in agent mode

Agent mode is the only chat mode that calls tools — Ask and Edit will not, no matter how the server is configured. Once you are in Agent mode, # in the chat box references a specific tool if you want to force one:

#lending_list_tables then summarise what each table is for

The four tools are named after the connection you chose in the token screen:

Tool Purpose
lending_list_tables Enumerate tables (or collections / indices / measurements, by engine)
lending_query Read query in the engine's native language
lending_store Insert or upsert
lending_annotate_table Save a description of a table for the model to read later

Copilot asks for confirmation before each call by default. Reads get tedious quickly, so it is reasonable to allow lending_query for the session and leave lending_store prompting every time.

A worked MySQL example

examples/tool_library.sql sets up a community tool library — the kind where members borrow a hedge trimmer for the weekend. Members, items, loans, and a small reservations queue. It uses MySQL 8 features on purpose: a CTE, a window function for loan history, JSON_TABLE over a maintenance log column, and a generated column for overdue status.

export FREEBASE_MYSQL_DSN="mysql://user:pass@HOST:3306/toollib"
mysql --defaults-extra-file=... < examples/tool_library.sql

After loading it, ask Copilot to "list the five items with the longest average loan duration" and watch the tool calls. The interesting behaviour is that it will look at the real column names first — checked_out_at, due_on, returned_at — rather than guessing at borrow_date / return_date.

What we could not verify

Whether MCP support in Copilot Chat requires a paid plan. Copilot has a free tier with monthly limits, and agent mode with MCP has been generally available in VS Code since the 1.102 release, but we have not been able to confirm from an authoritative source whether the free tier includes tool-calling agent mode at the time of writing, or whether that requires Copilot Pro or a Business seat. If this matters to you, check GitHub's current plan comparison before relying on it. We would rather say we do not know than guess.

Everything else here has been checked against the shipped behaviour: the servers key, the required type, the inputs substitution, and the Command Palette entry points.

Symptom table

What you see Usual cause
Server listed but state is stopped Click it and open the output pane; a 404 there means the token in the URL is wrong
Server missing entirely from the list Top-level key is mcpServers instead of servers, or the JSON has a trailing comma
Server starts, zero tools Token is valid but no connection is attached to it in the dashboard
Tools listed, never called Chat is in Ask or Edit mode, not Agent; or the tools are unticked in the tools picker
Worked yesterday, empty today Stale tool cache — run MCP: Reset Cached Tools
Prompted for the token on every restart The input was dismissed rather than submitted; secret storage never received a value
examples/list-tools.mjs also fails Not a VS Code problem. Regenerate the token, or check for an outbound HTTPS proxy

Engines available on the same config

PostgreSQL 16.2, MySQL 8.0.36, MariaDB 11.3.2, SQLite 3.45.1, CockroachDB 23.2.4, TimescaleDB 2.14.2, MongoDB 7.0.4, Redis 7.2.3, Cassandra 4.1.4, DynamoDB, ClickHouse 24.1.5, Elasticsearch 8.12.0, Neo4j 5.17.0, InfluxDB 2.7.4, Prometheus 2.50.1. Only the language you write inside lending_query changes. Three of them — PostgreSQL, Redis and MongoDB — additionally accept ordinary drivers on their native ports, so your application and the agent can share one database; the rest are reached over HTTP and MCP.

Treat the free tier as a place for local development, throwaway prototypes and modest production traffic — nothing heavier. No SLA is published and there is no managed backup product, so export anything you would be sorry to lose; mysqldump works over the standard protocol.

Files

.vscode/mcp.json              committable config with a promptString input
examples/
  mcp.two-environments.json   dev and staging servers side by side
  list-tools.mjs              Node 18+, handshakes and prints the tool list
  tool_library.sql            MySQL 8 schema, seed data and three queries
  README.md

Links


freebase.cloud is an independent service and is not affiliated with Microsoft, GitHub, Inc., Oracle Corporation, Anthropic, Anysphere (Cursor) or Codeium (Windsurf).

from github.com/freebase-cloud/vscode-copilot-database-mcp

Installing Vscode Copilot Database

This server has no published package — it is built from source. Open the repository and follow its README.

▸ github.com/freebase-cloud/vscode-copilot-database-mcp

FAQ

Is Vscode Copilot Database MCP free?

Yes, Vscode Copilot Database MCP is free — one-click install via Unyly at no cost.

Does Vscode Copilot Database need an API key?

No, Vscode Copilot Database runs without API keys or environment variables.

Is Vscode Copilot Database hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Vscode Copilot Database in Claude Desktop, Claude Code or Cursor?

Open Vscode Copilot Database on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Vscode Copilot Database with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All data MCPs