Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Vscode Copilot Database

БесплатноНе проверен

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

GitHubEmbed

Описание

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

Установка Vscode Copilot Database

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

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

FAQ

Vscode Copilot Database MCP бесплатный?

Да, Vscode Copilot Database MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Vscode Copilot Database?

Нет, Vscode Copilot Database работает без API-ключей и переменных окружения.

Vscode Copilot Database — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Vscode Copilot Database в Claude Desktop, Claude Code или Cursor?

Открой Vscode Copilot Database на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

wenb1n-dev/SmartDB_MCP

A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim

wenb1n-devавтор: wenb1n-dev

Postgres Server

This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools

madhurprashавтор: madhurprash

Postgres

Query your database in natural language

Anthropicавтор: Anthropic

PostgreSQL

Read-only database access with schema inspection.

modelcontextprotocolавтор: modelcontextprotocol

Redis

Interact with Redis key-value stores.

modelcontextprotocolавтор: modelcontextprotocol

SQLite

Database interaction and business intelligence capabilities.

modelcontextprotocolавтор: modelcontextprotocol

mxcp

Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.

raw-labsавтор: raw-labs

tadas-github/a2asearch-mcp

MCP server to search 4,800+ MCP servers, AI agents, CLI tools and agent skills. Install: npx -y a2asearch-mcp. Ask Claude: "Find MCP servers for database access

tadas-githubавтор: tadas-github

julien040/anyquery

Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by desi

julien040автор: julien040

drakonkat/wizzy-mcp-tmdb

A MCP server for The Movie Database API that enables AI assistants to search and retrieve movie, TV show, and person information.

drakonkatавтор: drakonkat

Compare Vscode Copilot Database with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории data