Back to MCP Catalog

Nile Database MCP Server

DatabasesTypeScript
Manage and query Nile databases, tenants, users, and authentication using LLMs
Available Tools

listDatabases

List all databases in your Nile workspace

createDatabase

Create a new database in your Nile workspace

getDatabase

Get details about a specific database

deleteDatabase

Delete a database from your Nile workspace

listRegions

List available regions for database creation

createCredentials

Create new database credentials

listCredentials

List all database credentials

executeSQL

Execute SQL queries directly on Nile databases

Nile Database MCP Server provides a seamless interface for LLM applications to interact with the Nile database platform. It enables AI assistants to create and manage databases, handle credentials, execute SQL queries, and manage multi-tenant applications directly through natural language. With this integration, developers can leverage the power of LLMs to streamline database operations, reducing the need to switch between interfaces when working with Nile's serverless Postgres platform. The server implements the full Model Context Protocol specification, ensuring compatibility with various LLM clients.

Overview

The Nile Database MCP Server allows AI assistants to interact with Nile's serverless Postgres platform. This integration enables you to manage databases, execute SQL queries, handle credentials, and work with multi-tenant applications through natural language conversations.

Installation

You can install the Nile Database MCP Server using npm:

# Install stable version
npm install @niledatabase/nile-mcp-server

# For latest alpha/preview version
npm install @niledatabase/nile-mcp-server@alpha

Alternatively, you can use other MCP package managers:

npx @michaellatman/mcp-get@latest install @niledatabase/nile-mcp-server

For manual installation:

# Clone the repository
git clone https://github.com/niledatabase/nile-mcp-server.git
cd nile-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

Configuration

Before using the server, you need to set up your Nile credentials. Create a .env file in the root directory with:

NILE_API_KEY=your_api_key_here
NILE_WORKSPACE_SLUG=your_workspace_slug

To create a Nile API key:

  1. Log in to your Nile account at console.thenile.dev
  2. Click Workspaces in the top-left
  3. Select your workspace
  4. Navigate to the Security section in the left menu
  5. Generate a new API key

Using with Claude Desktop

  1. Build the project with npm run build
  2. Open Claude Desktop
  3. Go to Settings > MCP Servers
  4. Click "Add Server"
  5. Add the configuration as shown in the installation section below

Using with Cursor

  1. Build the project with npm run build
  2. Open Cursor
  3. Go to Settings (⌘,) > Features > MCP Servers
  4. Click "Add New MCP Server"
  5. Name it "nile-database" (or any name you prefer)
  6. Set the command to:
    env NILE_API_KEY=your_key NILE_WORKSPACE_SLUG=your_workspace node /absolute/path/to/nile-mcp-server/dist/index.js
    
  7. Click "Save"
  8. Restart Cursor for the changes to take effect

Server Modes

The server supports two operational modes:

STDIO Mode (Default)

Uses standard input/output for communication, making it compatible with Claude Desktop and Cursor integrations.

SSE Mode

Server-Sent Events (SSE) mode enables real-time, event-driven communication over HTTP.

Troubleshooting

If you encounter issues:

  1. Verify your API key and workspace slug are correct
  2. Check that the server is running (you should see startup logs)
  3. Ensure the path to the server in your configuration is correct
  4. Restart your LLM client after making configuration changes

For more information, visit the Nile documentation or join the Discord community.

Related MCPs

Milvus Vector Database
DatabasesPython

Connect to Milvus vector database for semantic search and vector operations

MotherDuck DuckDB
DatabasesPython

SQL analytics with DuckDB and MotherDuck for AI assistants

Alibaba Cloud Tablestore
DatabasesJava, Python

Connect to Alibaba Cloud Tablestore for vector search and RAG applications

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.