NeoSQL MCP

io.github.unvus由 GitHub 账号 unvus 发布v1.9.0更新于 Nov 4, 2026

Schemas, SQL, ERDs, and codegen for PostgreSQL, MySQL, Oracle, SQLite, and more via NeoSQL Desktop.

概览

AI 生成的概览

本地 stdio MCP 服务器,把 NeoSQL Desktop 的数据库结构、SQL、ERD 与代码生成工具开放给 MCP 主机,支持 PostgreSQL、MySQL、Oracle、SQLite 等。

可以做什么
  • 列出项目以及已启用 MCP 的连接和 schema,并在 Desktop 中确认后创建仅用于设计的新项目
  • 查看表清单与表详情,包括列、键和索引
  • 在不改动数据库的前提下新增或修改 ERD 虚拟表模型
  • 对选定的连接目标执行 SQL,包括 DDL
  • 按项目设置中的模板包为指定表生成并保存源码文件
  • 执行健康检查与诊断,并获取项目与连接定位方式的说明
适用场景
适合希望 AI 编程助手读取真实数据库结构并执行真实查询、而不是猜测表结构的场景,前提是团队已在 NeoSQL Desktop 中管理这些连接。也适用于在 Claude Code、Codex、Gemini CLI、Cursor 等 MCP 主机中进行结构浏览、ERD 草图和模板化代码生成。
运行要求
macOS 或 Windows、Node.js 20 或更高版本,以及在同一台机器上安装并运行的 NeoSQL Desktop。需要一个包含已启用 MCP 的连接和 schema 的 NeoSQL 项目,以及能启动 stdio 服务器的 MCP 主机;该包通过 npx 运行。主机配置中无需数据库凭据。
安装前请注意
execute-query 可执行包括 DDL 在内的 SQL,generate-code 会写入文件,且可能在没有额外确认对话框的情况下覆盖已有文件。结构信息和查询结果会返回给 MCP 主机,主机如何处理这些数据不在本地传输范围内。访问受 Desktop 的 MCP 访问控制设置约束,部分操作需在 Desktop 中确认或登录。已超时的操作可能已经改动了数据或文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 NeoSQL MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

neosql-mcp

English | 한국어

Bring NeoSQL Desktop's database tools into your MCP host (Claude Code, Codex, Gemini CLI, Cursor, …) via npx.

[npm version] [license] [node]

neosql-mcp is a local stdio MCP server that lets MCP hosts use NeoSQL Desktop tools through npx.

It is not a standalone database server, database CLI, or replacement for NeoSQL Desktop. The package runs inside the MCP host process tree, exposes NeoSQL tools over standard MCP stdio, and delegates database/UI work to a running NeoSQL Desktop app through JSON-RPC over HTTP on a macOS Unix Domain Socket or Windows Named Pipe.

text
+-------------------+    +-------------------+    +-------------------+|                   |    |                   |    |                   ||  Claude Code      +--->+                   +--->+  NeoSQL Desktop   ||                   |    |                   |    |                   ||                   |    |                   |    +---------+---------+|  Codex            |    |                   |              ||                   |    |                   |              v|                   |    |                   |    +-------------------+|  Gemini CLI       |    |     neosql-mcp    |    |                   ||                   |    |                   |    |  PostgreSQL       ||                   |    |                   |    |  MySQL            ||  Cursor           |    |                   |    |  MariaDB          ||                   |    |                   |    |  Oracle           ||                   |    |                   |    |  SQL Server       ||  Other MCP hosts  |    |                   |    |  ... and more     ||                   |    |                   |    |                   |+-------------------+    +-------------------+    +-------------------+     MCP hosts             stdio MCP server            Databases

Why neosql-mcp?

  • AI coding assistants write better code when they can read your real schema and run real queries, instead of guessing column names and table shapes. neosql-mcp exposes the database your team already configured in NeoSQL Desktop to any MCP host.
  • One running NeoSQL Desktop, one npx command — Claude Code, Codex, Gemini CLI, Cursor, and any other MCP host can use the connections and schemas already configured in NeoSQL Desktop. Database connections are configured in Desktop rather than separately for each MCP host.

Supported Databases

PostgreSQL, Supabase, MySQL, MariaDB, Oracle, SQL Server, SQLite, H2, and Databricks.

Database connections are made by NeoSQL Desktop, so neosql-mcp works with every DBMS that Desktop supports. See the DBMS connection guide for version requirements and per-DBMS connection details.

Security

Communication between neosql-mcp and NeoSQL Desktop stays on the local machine over a Unix Domain Socket (macOS) or Named Pipe (Windows). This channel opens no TCP ports, and its endpoint cannot be overridden by environment variables or config files. Database access follows Desktop's MCP Access Control settings; MCP host configuration does not require database credentials.

Schema information and query results are returned to your MCP host. The host's handling of that data and Desktop's database connections are outside this local transport boundary. execute-query can execute SQL including DDL, and generate-code can write files; review the requested operations and Desktop access settings before use.

See the NeoSQL MCP Privacy Policy for data processing, storage, retention, and deletion details.

Prerequisites

  • macOS or Windows.
  • Node.js 20 or later.
  • NeoSQL Desktop installed on the same machine.
  • An MCP host that can launch stdio servers, such as Claude Code, Codex, Gemini CLI, or Cursor.
  • A NeoSQL project with MCP-enabled database connections and schemas.

Quick Start

No global install is required. Configure your MCP host to run the package with npx.

bash
npx -y neosql-mcp

The process is a stdio MCP server, so running the command directly in a terminal may look like it is waiting for input. That is expected.

MCP Host Configuration

neosql-mcp has been tested with Claude Code, Codex, Gemini CLI, and Cursor. Any MCP host that can launch a stdio server can use the same command and arguments.

HostConfig file
Claude Code.mcp.json in the project, or ~/.claude.json for the user
Codex.codex/config.toml in the project, or ~/.codex/config.toml
Gemini CLI.gemini/settings.json in the project, or ~/.gemini/settings.json
Cursor.cursor/mcp.json in the project, or ~/.cursor/mcp.json

Claude Code, Gemini CLI, Cursor

These hosts share the same JSON shape under mcpServers:

json
{  "mcpServers": {    "neosql": {      "command": "npx",      "args": ["-y", "neosql-mcp"]    }  }}

Codex

toml
[mcp_servers.neosql]command = "npx"args = [  "-y",  "neosql-mcp",]

Install as a Claude Plugin

Claude Code and Claude Desktop Cowork can also load neosql-mcp as a plugin instead of the manual mcpServers entry above. The plugin runs a version-pinned package, so new versions arrive with plugin updates rather than depending on the local npx cache.

From the Claude directory

In claude.ai or the Claude desktop app, open Customize › Plugins › Discover, search for NeoSQL MCP, and select Add. The plugin is saved to your claude.ai account and loads in Claude Code as neosql-mcp@synced the next time you start a session signed in to that account (Claude Code 2.1.273 or later). Claude Chat does not run this local MCP server.

From the marketplace in this repository

If you use Claude Code without a claude.ai login, or want to install from a terminal or a script, add this repository as a plugin marketplace and install the plugin from it:

bash
claude plugin marketplace add unvus/neosql-mcpclaude plugin install neosql-mcp@neosql

Inside a session, /plugin install neosql-mcp --marketplace unvus/neosql-mcp does both steps. Marketplace plugins do not auto-update by default; run claude plugin update neosql-mcp@neosql, or enable auto-update for the neosql marketplace in /plugin.

Using the plugin with a manual configuration

A manual neosql entry and the plugin are separate servers in Claude Code, so keeping both shows every tool twice. Check /mcp to see which servers are active and disable one of them. To pin a project with --project-id, keep the manual configuration and disable the plugin for that repository in .claude/settings.local.json, using neosql-mcp@synced for a directory install or neosql-mcp@neosql for a marketplace install:

json
{  "enabledPlugins": {    "neosql-mcp@synced": false  }}

CLI Options

OptionDefaultPurpose
--project-id=<id> or --project-id <id>Not setOpen the specified project before an app-dependent tool runs and fail if the active project does not match it.

To target a specific project, add its project ID to the MCP host's arguments:

json
"args": ["-y", "neosql-mcp", "--project-id=<your-project-id>"]

Replace <your-project-id> with the target project's ID, not its display name. Without this option, tools use the projectId passed to the tool, or the project selected in Desktop. With it, an app-dependent tool can switch the Desktop window to the requested project before running; a tool call with a different projectId is rejected, and create-project is unavailable. Connecting the MCP host, listing tools, or calling ping, get-mcp-session-id, get-context-help, list-projects, or create-project does not switch to the configured project.

Save or discard unsaved changes in Desktop if they prevent navigation. Sign-in, project access, and other required confirmations are still handled in Desktop. If the project changes during preparation, or no longer matches when Desktop checks the request, the operation fails instead of silently using another project. Use a Desktop version that supports project targeting.

Desktop Readiness

Before an app-dependent tool runs, neosql-mcp checks the current Desktop and project state. On macOS and Windows, if Desktop is installed but disconnected, it requests app activation once and waits for readiness within a shared 40-second budget. App activation, optional project navigation, and project loading share this preparation budget. Once the project is ready, the original operation runs once in the same tool call. If user action is required, follow the returned guidance in Desktop and call the tool again afterward.

MCP hosts that provide a progress token receive English progress notifications. Without a token, readiness works the same way. Host display and overall timeouts are controlled by the host. Cancelling preparation stops further checks and operation submission while leaving an already launched Desktop app running. Preparation errors return isError: true with JSON text containing status, message, nextAction, and requestSent: false. Operations already submitted keep their existing result format and are never automatically resent.

Context Resolution

Each NeoSQL tool call works on one project: the projectId passed to the tool, else the project set with --project-id, else the project currently open in NeoSQL Desktop. When the target is not open, Desktop opens it first, and the tool runs once the project is fully loaded. Desktop still owns the active project and its Default connection target.

If no project is open and none is configured, call list-projects and pass the chosen projectId. To start a new design, call create-project: after you approve it in Desktop, it creates a local project with one design-only connection set as the Default and opens it. Pass the returned projectId to later tools such as erd-create-tables. If the host sends a cancellation while the creation confirmation is pending, it is forwarded to Desktop to close the dialog. Cancellation does not roll back a project whose creation has already started; check list-projects before retrying.

Database tools accept a connection target in one of two forms:

  1. Omit connectionId, database, and schema together to use the active project's Default selected in NeoSQL MCP Access Control.
  2. Pass all three values together to use an explicit MCP-enabled target returned by list-connections. Use database: null for DBMSs without a database hierarchy.

Passing only one or two of these fields is invalid. An explicit target never falls back to the project Default when it is invalid.

Tools that accept an explicit connection target are marked in Available Tools.

Available Tools

ToolTargetPurpose
pingReturns pong for a lightweight MCP health check.
get-mcp-session-idDiagnostic tool that returns the upstream session id used by this process.
list-projectsLists the projects you can open in Desktop. Works without an open project.
create-projectCreates a local project with one design-only connection for a new design, after you approve it in Desktop.
list-connectionsLists MCP-enabled NeoSQL connections and schemas for the current project.
get-context-helpExplains active-project Default and explicit target usage.
list-tablesYesLists tables.
get-table-detailsYesReturns columns, keys, indexes, and related table metadata.
erd-create-tablesYesAdds virtual tables to an ERD without changing the database.
erd-modify-tablesYesModifies virtual ERD table models without changing the database.
execute-queryYesExecutes SQL, including DDL.
generate-codeYesGenerates and saves source files for specified tables using template packs configured in Project Settings. Requires template packs, required variables, and an output folder (Location). May overwrite existing files without an additional confirmation dialog.

Tools marked Target accept the connectionId, database, and schema fields described in Context Resolution. list-connections and every Target tool also accept an optional projectId.

Transport

neosql-mcp talks to NeoSQL Desktop through a deterministic local endpoint:

  • macOS: neosql-mcp.sock in the per-user temp directory from getconf DARWIN_USER_TEMP_DIR
  • Windows: \\.\pipe\neosql-mcp

Troubleshooting

Desktop installation cannot be found

If Desktop is not installed, install it first. If it is already installed but detection fails, open it manually and call the tool again. On macOS, neosql-mcp currently checks the standard /Applications and ~/Applications locations first. If the app is not found there, it falls back to the app path recorded by NeoSQL Desktop in ~/.neosql/mcp-config.json after the app has been launched at least once. On Windows, it checks the per-user NSIS uninstall registry entry under HKCU.

Desktop does not start automatically

When Desktop is disconnected and its installation is detected, neosql-mcp requests app activation once and waits for readiness. If installation checking or activation fails, open Desktop manually, wait for it to load, and call the tool again.

Desktop does not respond or preparation times out

If preparation returns readiness_timeout, the 40-second preparation limit expired before the operation was sent. Check Desktop for loading errors or pending prompts, then retry once the project is ready. If the app is unresponsive, restart it.

If the operation was already sent and its response times out, it may have changed data or files. Check the actual result before retrying; neosql-mcp does not implicitly undo or automatically retry the operation.

Context-sensitive tools fail

Select a project in Desktop, or pass a projectId from list-projects, and enable MCP access for the connection and schema you intend to use. Either configure a Default in MCP Access Control and omit all three target fields, or run list-connections and pass its connectionId, databaseName, and schemaName together as connectionId, database, and schema. The explicit form does not require a Default. Use database: null when there is no database hierarchy; a partial target is invalid.

If the response asks for sign-in or user action, complete the indicated step in Desktop, such as unlocking the project, resolving a missing driver, or acknowledging a notice. For a project load failure, resolve the error shown in Desktop before retrying.

npx cannot find or run the package

Check that the MCP host can access npx and that Node.js is 20 or later.

The configured project cannot be opened

Check the ID passed to --project-id and your access to that project in Desktop. Save or discard unsaved changes, complete any sign-in or project notices, then retry. If the active project changed during the request, return to the intended project before trying again.

Resources

Development

bash
npm cinpm run buildnpm test

To test a local build from an MCP host, link the binary and unlink it when you are done:

bash
npm run buildnpm link# ... test from your MCP host ...npm unlink -g neosql-mcp

来源:README.md,提交 c3481f9

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

3
  1. v1.9.0最新Nov 4, 2026
  2. v1.8.11Oct 7, 2026
  3. v1.8.9Oct 1, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分