This is a Model Context Protocol (MCP) server for Amazon Redshift implemented in TypeScript. It follows Anthropic’s implementation pattern and provides Cursor IDE and other MCP-compatible clients with rich contextual information about your Redshift data warehouse. This server enables LLMs to inspect database schemas and execute read-only queries.
Create a .cursor/mcp.json
file in your project directory:
{
"mcpServers": {
"redshift-mcp": {
"command": "node",
"args": ["path/to/dist/index.js"],
"env": {
"DATABASE_URL": "redshift://username:password@hostname:port/database?ssl=true"
}
}
}
}
For using across all projects, create ~/.cursor/mcp.json
in your home directory with the same configuration.
mcp.json
Configure the server using stdio transport:
{
"servers": [
{
"name": "redshift-mcp",
"transport": {
"kind": "stdio",
"command": ["node", "path/to/dist/index.js"]
}
}
]
}
npm install
npm run build
The server requires a Redshift connection URL via the DATABASE_URL
environment variable:
export DATABASE_URL="redshift://username:password@hostname:port/database?ssl=true"
npm start
Or you can run directly:
DATABASE_URL="redshift://username:password@hostname:port/database?ssl=true" node dist/index.js
For development, you can use:
DATABASE_URL="redshift://username:password@hostname:port/database?ssl=true" npm run dev
redshift://username:password@hostname:port/database?ssl=true
Additional connection parameters:
ssl=true
: Required for secure connections (recommended)timeout=10
: Connection timeout in secondskeepalives=1
: Enable TCP keepalivekeepalives_idle=130
: TCP keepalive idle timesrc/index.ts
: Main TypeScript implementationdist/
: Compiled JavaScript outputpackage.json
: Project dependencies and scriptstsconfig.json
: TypeScript configurationquery
describe_table
find_column
The server provides schema information that Cursor can use:
Schema Listings (redshift://<host>/schema/<schema_name>
)
Table Schemas (redshift://<host>/<schema>/<table>/schema
)
Sample Data (redshift://<host>/<schema>/<table>/sample
)
Statistics (redshift://<host>/<schema>/<table>/statistics
)
This server:
Here are some example questions you can ask Cursor once connected:
You can extend this server by:
ListResourcesRequestSchema
and ReadResourceRequestSchema
handlersListToolsRequestSchema
and CallToolRequestSchema
handlersFor development, you can use the npm run dev
command, which uses ts-node to run the TypeScript code directly without pre-compilation.
MIT
MCP server providing a knowledge graph implementation with semantic search capabilities powered by Qdrant vector database
A Model Context Protocol server for retrieving and analyzing issues from Sentry.io
MCP server for generating human face images with various shapes and sizes
A Model Context Protocol (MCP) server that provides onchain tools for LLMs, allowing them to interact with the Base network and Coinbase API.