Nile Database▌

by niledatabase
Integrate Nile Database for seamless TypeScript-based server operations, supporting stdio and HTTP for AI workflow datab
Integrates with Nile Database services to enable database operations through TypeScript-based server implementation supporting both stdio and HTTP communication modes for seamless database functionality in AI workflows.
best for
- / AI applications needing database operations
- / LLM workflows requiring data persistence
- / Automated database management tasks
capabilities
- / Create and delete Nile databases
- / Execute SQL queries on databases
- / Manage database credentials
- / List available regions
- / Get database details and status
what it does
Connects AI applications to Nile Database services through the Model Context Protocol, enabling database operations and management directly from LLM workflows.
about
Nile Database is an official MCP server published by niledatabase that provides AI assistants with tools and capabilities via the Model Context Protocol. Integrate Nile Database for seamless TypeScript-based server operations, supporting stdio and HTTP for AI workflow datab It is categorized under databases.
how to install
You can install Nile Database in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
MIT
Nile Database is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
Nile MCP Server
[](https://smithery.ai/server/@niledatabase/nile-mcp-server)
A Model Context Protocol (MCP) server implementation for Nile database platform. This server allows LLM applications to interact with Nile platform through a standardized interface.
## Features
- **Database Management**: Create, list, get details, and delete databases
- **Credential Management**: Create and list database credentials
- **Region Management**: List available regions for database creation
- **SQL Query Support**: Execute SQL queries directly on Nile databases
- **MCP Protocol Support**: Full implementation of the Model Context Protocol
- **Type Safety**: Written in TypeScript with full type checking
- **Error Handling**: Comprehensive error handling and user-friendly error messages
- **Test Coverage**: Comprehensive test suite using Jest
- **Environment Management**: Automatic loading of environment variables from .env file
- **Input Validation**: Schema-based input validation using Zod
## Installation
Install the stable version:
```bash
npm install @niledatabase/nile-mcp-server
```
For the latest alpha/preview version:
```bash
npm install @niledatabase/nile-mcp-server@alpha
```
This will install @niledatabase/nile-mcp-server in your node_modules folder. For example: node_modules/@niledatabase/nile-mcp-server/dist/
### Manual Installation
```bash
# Clone the repository
git clone https://github.com/yourusername/nile-mcp-server.git
cd nile-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
```
### Other mcp package managers
1. npx @michaellatman/mcp-get@latest install @niledatabase/nile-mcp-server
## Starting the Server
There are several ways to start the server:
1. **Direct Node Execution**:
```bash
node dist/index.js
```
2. **Development Mode** (with auto-rebuild):
```bash
npm run dev
```
The server will start and listen for MCP protocol messages. You should see startup logs indicating:
- Environment variables loaded
- Server instance created
- Tools initialized
- Transport connection established
To stop the server, press `Ctrl+C`.
### Verifying the Server is Running
When the server starts successfully, you should see logs similar to:
```
[info] Starting Nile MCP Server...
[info] Loading environment variables...
[info] Environment variables loaded successfully
[info] Creating server instance...
[info] Tools initialized successfully
[info] Setting up stdio transport...
[info] Server started successfully
```
If you see these logs, the server is ready to accept commands from Claude Desktop.
## Configuration
Create a `.env` file in the root directory with your Nile credentials:
```env
NILE_API_KEY=your_api_key_here
NILE_WORKSPACE_SLUG=your_workspace_slug
```
To create a Nile API key, log in to your [Nile account](console.thenile.dev), click Workspaces in the top-left, select your workspace, and navigate to the Security section in the left menu.
## Using with Claude Desktop
### Setup
1. Install [Claude Desktop](https://claude.ai/desktop) if you haven't already
2. Build the project:
```bash
npm run build
```
3. Open Claude Desktop
4. Go to Settings > MCP Servers
5. Click "Add Server"
6. Add the following configuration:
```json
{
"mcpServers": {
"nile-database": {
"command": "node",
"args": [
"/path/to/your/nile-mcp-server/dist/index.js"
],
"env": {
"NILE_API_KEY": "your_api_key_here",
"NILE_WORKSPACE_SLUG": "your_workspace_slug"
}
}
}
}
```
Replace:
- `/path/to/your/nile-mcp-server` with the absolute path to your project directory
- `your_api_key_here` with your Nile API key
- `your_workspace_slug` with your Nile workspace slug
## Using with Cursor
### Setup
1. Install [Cursor](https://cursor.sh) if you haven't already
2. Build the project:
```bash
npm run build
```
3. Open Cursor
4. Go to Settings (⌘,) > Features > MCP Servers
5. Click "Add New MCP Server"
6. Configure the server:
- Name: `nile-database` (or any name you prefer)
- Command:
```bash
env NILE_API_KEY=your_key NILE_WORKSPACE_SLUG=your_workspace node /absolute/path/to/nile-mcp-server/dist/index.js
```
Replace:
- `your_key` with your Nile API key
- `your_workspace` with your Nile workspace slug
- `/absolute/path/to` with the actual path to your project
7. Click "Save"
8. You should see a green indicator showing that the MCP server is connected
9. Restart Cursor for the changes to take effect
### Server Modes
The server supports two operational modes:
#### STDIO Mode (Default)
The default mode 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.
To enable SSE mode:
1. Set `MCP_SERVER_MODE=sse` in your `.env` file
2. The server will start an HTTP server (default port 3000)
3. Connect to the SSE endpoint: `http://localhost:3000/sse`
4. Send commands to: `http://localhost:3000/messages`
Example SSE usage with curl:
```bash
# In terminal 1 - Listen for events
curl -N http://localhost:3000/sse
# In terminal 2 - Send commands
curl -X POST http://localhost:3000/messages \
-H "Content-Type: application/json" \
-d '{
"type": "function",
"name": "list-databases",
"parameters": {}
}'
```
### Example Prompts
After setting up the MCP server in Cursor, you can use natural language to interact with Nile databases. Here are some example prompts:
#### Database Management
```
Create a new database named "my_app" in AWS_US_WEST_2 region
List all my databases
Get details for database "my_app"
Delete database "test_db"
```
#### Creating Tables
```
Create a users table in my_app database with columns:
- tenant_id (UUID, references tenants)
- id (INTEGER)
- email (VARCHAR, unique per tenant)
- name (VARCHAR)
- created_at (TIMESTAMP)
Create a products table in my_app database with columns:
- tenant_id (UUID, references tenants)
- id (INTEGER)
- name (VARCHAR)
- price (DECIMAL)
- description (TEXT)
- created_at (TIMESTAMP)
```
#### Querying Data
```
Execute this query on my_app database:
SELECT * FROM users WHERE tenant_id = 'your-tenant-id' LIMIT 5
Run this query on my_app:
INSERT INTO users (tenant_id, id, email, name)
VALUES ('tenant-id', 1, 'user@example.com', 'John Doe')
Show me all products in my_app database with price > 100
```
#### Schema Management
```
Show me the schema for the users table in my_app database
Add a new column 'status' to the users table in my_app database
Create an index on the email column of the users table in my_app
```
### Available Tools
The server provides the following tools for interacting with Nile databases:
#### Database Management
1. **create-database**
- Creates a new Nile database
- Parameters:
- `name` (string): Name of the database
- `region` (string): Either `AWS_US_WEST_2` (Oregon) or `AWS_EU_CENTRAL_1` (Frankfurt)
- Returns: Database details including ID, name, region, and status
- Example: "Create a database named 'my-app' in AWS_US_WEST_2"
2. **list-databases**
- Lists all databases in your workspace
- No parameters required
- Returns: List of databases with their IDs, names, regions, and status
- Example: "List all my databases"
3. **get-database**
- Gets detailed information about a specific database
- Parameters:
- `name` (string): Name of the database
- Returns: Detailed database information including API host and DB host
- Example: "Get details for database 'my-app'"
4. **delete-database**
- Deletes a database
- Parameters:
- `name` (string): Name of the database to delete
- Returns: Confirmation message
- Example: "Delete database 'my-app'"
#### Credential Management
1. **list-credentials**
- Lists all credentials for a database
- Parameters:
- `databaseName` (string): Name of the database
- Returns: List of credentials with IDs, usernames, and creation dates
- Example: "List credentials for database 'my-app'"
2. **create-credential**
- Creates new credentials for a database
- Parameters:
- `databaseName` (string): Name of the database
- Returns: New credential details including username and one-time password
- Example: "Create new credentials for database 'my-app'"
- Note: Save the password when it's displayed, as it won't be shown again
#### Region Management
1. **list-regions**
- Lists all available regions for creating databases
- No parameters required
- Returns: List of available AWS regions
- Example: "What regions are available for creating databases?"
#### SQL Query Execution
1. **execute-sql**
- Executes SQL queries on a Nile database
- Parameters:
- `databaseName` (string): Name of the database to query
- `query` (string): SQL query to execute
- `connectionString` (string, optional): Pre-existing connection string to use for the query
- Returns: Query results formatted as a markdown table with column headers and row count
- Features:
- Automatic credential management (creates new if not specified)
- Secure SSL connection to database
- Results formatted as markdown tables
- Detailed error messages with hints
- Support for usi
---FAQ
- What is the Nile Database MCP server?
- Nile Database is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Nile Database?
- This profile displays 28 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
Ratings
4.5★★★★★28 reviews- ★★★★★Li Patel· Dec 28, 2024
We wired Nile Database into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Diya Thompson· Dec 16, 2024
Nile Database reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Chaitanya Patil· Dec 4, 2024
Useful MCP listing: Nile Database is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Piyush G· Nov 23, 2024
Nile Database reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Sophia Bhatia· Nov 19, 2024
Strong directory entry: Nile Database surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Mei Choi· Nov 7, 2024
Useful MCP listing: Nile Database is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Sophia Sethi· Oct 26, 2024
We evaluated Nile Database against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Shikha Mishra· Oct 14, 2024
I recommend Nile Database for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
- ★★★★★Sophia Reddy· Oct 10, 2024
Nile Database has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Rahul Santra· Sep 25, 2024
Nile Database is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
showing 1-10 of 28
