MCP Hub
Back to servers

NexusDB

A comprehensive NexusDB MCP server for Delphi that enables complete database management including schema operations, transactional SQL execution, and advanced table maintenance.

Stars
1
Tools
26
Updated
Jan 2, 2026
Validated
Jan 11, 2026

nxmcp - NexusDB MCP Server

An MCP (Model Context Protocol) server that enables AI assistants to interact with NexusDB databases. Built with Delphi, this server exposes NexusDB operations as MCP tools and resources.

Features

  • Query Execution - Run SELECT queries and retrieve results as JSON
  • Data Manipulation - Insert, update, and delete records
  • Schema Management - Create tables, add columns, manage indexes
  • Discovery - List tables, view schemas, get table structures, list indexes
  • Utility - Count records, show query execution plan

Requirements

Configuration

Edit Source/nxconfig.ini and put it next to the executable before running:

[Connection]
ServerHost=localhost
ServerPort=16000

[Database]
AliasName=YourDatabaseAlias
TablePassword=optional_table_password

[Authentication]
Username=your_username
Password=your_password

[Options]
AutoConnect=1
Timeout=30000

Edit Source/settings.ini and put it next to the executable before running:

; for a detailed example check https://github.com/GDKsoftware/Delphi-MCP-Server
[Server]
Port=3000
Host=localhost
Name=nxmcp
Version=1.0.0
Endpoint=/mcp
; Server configuration=
[CORS]
Enabled=1
AllowedOrigins=http://localhost,http://127.0.0.1,https://localhost,https://127.0.0.1
; Comma-separated list of allowed origins=
; Cross-Origin Resource Sharing configuration=
[SSL]
Enabled=0
CertFile=
KeyFile=
RootCertFile=

Building

  1. Open Source/nxmcp.dpr in Delphi
  2. Ensure NexusDB components and the MCP library are in your search path
  3. Build the project (Ctrl+F9)

Running

nxmcp.exe

The server starts on http://localhost:3000/mcp by default.

Available Tools

Query & Discovery

ToolDescriptionParameters
execute_queryRun SELECT queriessql
get_table_schemaGet table structuretableName

Data Manipulation

ToolDescriptionParameters
get_table_dataRead table data with paginationtableName, maxRows?, offset?, orderBy?
insert_recordInsert a new recordtableName, data (JSON string)
update_recordsUpdate matching recordstableName, data (JSON string), whereClause
delete_recordsDelete matching recordstableName, whereClause
execute_sqlRun INSERT/UPDATE/DELETEsql

Schema Management

ToolDescriptionParameters
create_tableCreate a new tabletableName, columns (JSON array)
drop_tableDelete a tabletableName
copy_tableClone a tablesourceTable, targetTable, copyData?
rename_tableRename a tableoldName, newName
add_columnAdd a columntableName, columnName, columnType, size?, defaultValueType?
drop_columnRemove a columntableName, columnName
modify_columnModify a columntableName, columnName, newType?, newSize?, newName?
create_indexCreate an indextableName, indexName, columns, unique?
drop_indexRemove an indextableName, indexName

Table Maintenance

ToolDescriptionParameters
empty_tableDelete all records (keeps structure)tableName
pack_tableCompact table, reclaim deleted spacetableName
reindex_tableRebuild an indextableName, indexName
recover_tableRecover records from broken tabletableName
change_passwordChange table passwordtableName, oldPassword, newPassword
get_autoinc_valueGet next auto-increment valuetableName

Transactions

ToolDescriptionParameters
batch_executeExecute multiple SQL in one transactionstatements (JSON array), snapshot?

Utility

ToolDescriptionParameters
count_recordsFast record count via metadatatableName
list_indexesList all indexes on a tabletableName
explain_queryShow query execution plansql

Available Resources

URIDescription
nexusdb://serverConnection status and server info
nexusdb://tablesList of all tables
nexusdb://schemaSchema overview with record counts

Column Types

For create_table and add_column:

  • AutoInc - Auto-incrementing integer
  • ShortString - ANSI string (specify size)
  • WideString - Unicode string (specify size)
  • Integer - 32-bit integer
  • Int64 - 64-bit integer
  • Word - 16-bit unsigned
  • Byte - 8-bit unsigned
  • Boolean - True/False
  • Float - Double precision
  • Currency - Currency type
  • DateTime - Date and time
  • Date - Date only
  • Time - Time only
  • Blob - Binary data
  • Memo - Large text

Default Value Types

For add_column:

  • CurrentDateTime - Auto-populate with current timestamp
  • CurrentUser - Auto-populate with current user

Statement Switches

Prefix SQL statements with switches to control execution:

SwitchSyntaxPurpose
#T#T 5000Timeout in milliseconds
#I#I-Disable index optimization
#S#S-Disable query simplification
#L#L+Enable query logging (used by explain\_query)
#B#B+Force BLOB copying

Example: #T 10000 SELECT * FROM LargeTable WHERE Status = 'Active'

Example Usage

Create a table

{
  "name": "create_table",
  "arguments": {
    "tableName": "Customers",
    "columns": "[{"name":"ID","type":"AutoInc"},{"name":"Name","type":"ShortString","size":100},{"name":"Email","type":"ShortString","size":255}]"
  }
}

Insert a record

{
  "name": "insert_record",
  "arguments": {
    "tableName": "Customers",
    "data": "{"Name":"John Doe","Email":"john@example.com"}"
  }
}

Query data

{
  "name": "execute_query",
  "arguments": {
    "sql": "SELECT * FROM Customers WHERE Name LIKE 'J%'"
  }
}

Integration with Claude Code

Simply run

 claude mcp add --transport http nxmcp http://localhost:3000/mcp

Integration with Claude Desktop

Claude Desktop (currently?) does not support localhost URLs. You can try a proxy like node mcp-remote.

License

The MIT License (MIT)

Copyright (c) 2025 Dr. Pfau Fernwirktechnik GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Reviews

No reviews yet

Sign in to write a review