Skip to content
Back to search

mcp-database-server

MCP Database Server is a new MCP Server which helps connect with Sqlite, SqlServer and Posgresql Databases

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/executeautomation--mcp-database-server/badge.svg)](/listings/executeautomation--mcp-database-server)

HTML

<a href="/listings/executeautomation--mcp-database-server"><img src="/api/listings/executeautomation--mcp-database-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Clone the repository:

git clone https://github.com/executeautomation/mcp-database-server.git
cd mcp-database-server

2. Install dependencies:

npm install

3. Build the project:

npm run build

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

readme.md · README · 328 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/executeautomation-mcp-database-server-badge.png)](https://mseep.ai/app/executeautomation-mcp-database-server)
  2. # MCP Database Server
  3. This MCP (Model Context Protocol) server provides database access capabilities to Claude, supporting SQLite, SQL Server, PostgreSQL, and MySQL databases.
  4. ## Installation
  5. 1. Clone the repository:
  6. ```
  7. git clone https://github.com/executeautomation/mcp-database-server.git
  8. cd mcp-database-server
  9. ```
  10. 2. Install dependencies:
  11. ```
  12. npm install
  13. ```
  14. 3. Build the project:
  15. ```
  16. npm run build
  17. ```
  18. ## Usage Options
  19. There are two ways to use this MCP server with Claude:
  20. 1. **Direct usage**: Install the package globally and use it directly
  21. 2. **Local development**: Run from your local development environment
  22. ### Direct Usage with NPM Package
  23. The easiest way to use this MCP server is by installing it globally:
  24. ```bash
  25. npm install -g @executeautomation/database-server
  26. ```
  27. This allows you to use the server directly without building it locally.
  28. ### Local Development Setup
  29. If you want to modify the code or run from your local environment:
  30. 1. Clone and build the repository as shown in the Installation section
  31. 2. Run the server using the commands in the Usage section below
  32. ## Usage
  33. ### SQLite Database
  34. To use with an SQLite database:
  35. ```
  36. node dist/src/index.js /path/to/your/database.db
  37. ```
  38. ### SQL Server Database
  39. To use with a SQL Server database:
  40. ```
  41. node dist/src/index.js --sqlserver --server <server-name> --database <database-name> [--user <username> --password <password>]
  42. ```
  43. Required parameters:
  44. - `--server`: SQL Server host name or IP address
  45. - `--database`: Name of the database
  46. Optional parameters:
  47. - `--user`: Username for SQL Server authentication (if not provided, Windows Authentication will be used)
  48. - `--password`: Password for SQL Server authentication
  49. - `--port`: Port number (default: 1433)
  50. ### PostgreSQL Database
  51. To use with a PostgreSQL database:
  52. ```
  53. node dist/src/index.js --postgresql --host <host-name> --database <database-name> [--user <username> --password <password>]
  54. ```
  55. Required parameters:
  56. - `--host`: PostgreSQL host name or IP address
  57. - `--database`: Name of the database
  58. Optional parameters:
  59. - `--user`: Username for PostgreSQL authentication
  60. - `--password`: Password for PostgreSQL authentication
  61. - `--port`: Port number (default: 5432)
  62. - `--ssl`: Enable SSL connection (true/false)
  63. - `--connection-timeout`: Connection timeout in milliseconds (default: 30000)
  64. ### MySQL Database
  65. #### Standard Authentication
  66. To use with a MySQL database:
  67. ```
  68. node dist/src/index.js --mysql --host <host-name> --database <database-name> --port <port> [--user <username> --password <password>]
  69. ```
  70. Required parameters:
  71. - `--host`: MySQL host name or IP address
  72. - `--database`: Name of the database
  73. - `--port`: Port number (default: 3306)
  74. Optional parameters:
  75. - `--user`: Username for MySQL authentication
  76. - `--password`: Password for MySQL authentication
  77. - `--ssl`: Enable SSL connection (true/false or object)
  78. - `--connection-timeout`: Connection timeout in milliseconds (default: 30000)
  79. #### AWS IAM Authentication
  80. For Amazon RDS MySQL instances with IAM database authentication:
  81. **Prerequisites:**
  82. - AWS credentials must be configured (the RDS Signer uses the default credential provider chain)
  83. - Configure using one of these methods:
  84. - `aws configure` (uses default profile)
  85. - `AWS_PROFILE=myprofile` environment variable
  86. - `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
  87. - IAM roles (if running on EC2)
  88. ```
  89. node dist/src/index.js --mysql --aws-iam-auth --host <rds-endpoint> --database <database-name> --user <aws-username> --aws-region <region>
  90. ```
  91. Required parameters:
  92. - `--host`: RDS endpoint hostname
  93. - `--database`: Name of the database
  94. - `--aws-iam-auth`: Enable AWS IAM authentication
  95. - `--user`: AWS IAM username (also the database user)
  96. - `--aws-region`: AWS region where RDS instance is located
  97. Note: SSL is automatically enabled for AWS IAM authentication
  98. ## Configuring Claude Desktop
  99. ### Direct Usage Configuration
  100. If you installed the package globally, configure Claude Desktop with:
  101. ```json
  102. {
  103. "mcpServers": {
  104. "sqlite": {
  105. "command": "npx",
  106. "args": [
  107. "-y",
  108. "@executeautomation/database-server",
  109. "/path/to/your/database.db"
  110. ]
  111. },
  112. "sqlserver": {
  113. "command": "npx",
  114. "args": [
  115. "-y",
  116. "@executeautomation/database-server",
  117. "--sqlserver",
  118. "--server", "your-server-name",
  119. "--database", "your-database-name",
  120. "--user", "your-username",
  121. "--password", "your-password"
  122. ]
  123. },
  124. "postgresql": {
  125. "command": "npx",
  126. "args": [
  127. "-y",
  128. "@executeautomation/database-server",
  129. "--postgresql",
  130. "--host", "your-host-name",
  131. "--database", "your-database-name",
  132. "--user", "your-username",
  133. "--password", "your-password"
  134. ]
  135. },
  136. "mysql": {
  137. "command": "npx",
  138. "args": [
  139. "-y",
  140. "@executeautomation/database-server",
  141. "--mysql",
  142. "--host", "your-host-name",
  143. "--database", "your-database-name",
  144. "--port", "3306",
  145. "--user", "your-username",
  146. "--password", "your-password"
  147. ]
  148. },
  149. "mysql-aws": {
  150. "command": "npx",
  151. "args": [
  152. "-y",
  153. "@executeautomation/database-server",
  154. "--mysql",
  155. "--aws-iam-auth",
  156. "--host", "your-rds-endpoint.region.rds.amazonaws.com",
  157. "--database", "your-database-name",
  158. "--user", "your-aws-username",
  159. "--aws-region", "us-east-1"
  160. ]
  161. }
  162. }
  163. }
  164. ```
  165. ### Local Development Configuration
  166. For local development, configure Claude Desktop to use your locally built version:
  167. ```json
  168. {
  169. "mcpServers": {
  170. "sqlite": {
  171. "command": "node",
  172. "args": [
  173. "/absolute/path/to/mcp-database-server/dist/src/index.js",
  174. "/path/to/your/database.db"
  175. ]
  176. },
  177. "sqlserver": {
  178. "command": "node",
  179. "args": [
  180. "/absolute/path/to/mcp-database-server/dist/src/index.js",
  181. "--sqlserver",
  182. "--server", "your-server-name",
  183. "--database", "your-database-name",
  184. "--user", "your-username",
  185. "--password", "your-password"
  186. ]
  187. },
  188. "postgresql": {
  189. "command": "node",
  190. "args": [
  191. "/absolute/path/to/mcp-database-server/dist/src/index.js",
  192. "--postgresql",
  193. "--host", "your-host-name",
  194. "--database", "your-database-name",
  195. "--user", "your-username",
  196. "--password", "your-password"
  197. ]
  198. },
  199. "mysql": {
  200. "command": "node",
  201. "args": [
  202. "/absolute/path/to/mcp-database-server/dist/src/index.js",
  203. "--mysql",
  204. "--host", "your-host-name",
  205. "--database", "your-database-name",
  206. "--port", "3306",
  207. "--user", "your-username",
  208. "--password", "your-password"
  209. ]
  210. },
  211. "mysql-aws": {
  212. "command": "node",
  213. "args": [
  214. "/absolute/path/to/mcp-database-server/dist/src/index.js",
  215. "--mysql",
  216. "--aws-iam-auth",
  217. "--host", "your-rds-endpoint.region.rds.amazonaws.com",
  218. "--database", "your-database-name",
  219. "--user", "your-aws-username",
  220. "--aws-region", "us-east-1"
  221. ]
  222. }
  223. }
  224. }
  225. ```
  226. The Claude Desktop configuration file is typically located at:
  227. - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
  228. - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
  229. - Linux: `~/.config/Claude/claude_desktop_config.json`
  230. ## Available Database Tools
  231. The MCP Database Server provides the following tools that Claude can use:
  232. | Tool | Description | Required Parameters |
  233. |------|-------------|---------------------|
  234. | `read_query` | Execute SELECT queries to read data | `query`: SQL SELECT statement |
  235. | `write_query` | Execute INSERT, UPDATE, or DELETE queries | `query`: SQL modification statement |
  236. | `create_table` | Create new tables in the database | `query`: CREATE TABLE statement |
  237. | `alter_table` | Modify existing table schema | `query`: ALTER TABLE statement |
  238. | `drop_table` | Remove a table from the database | `table_name`: Name of table<br>`confirm`: Safety flag (must be true) |
  239. | `list_tables` | Get a list of all tables | None |
  240. | `describe_table` | View schema information for a table | `table_name`: Name of table |
  241. | `export_query` | Export query results as CSV/JSON | `query`: SQL SELECT statement<br>`format`: "csv" or "json" |
  242. | `append_insight` | Add a business insight to memo | `insight`: Text of insight |
  243. | `list_insights` | List all business insights | None |
  244. For practical examples of how to use these tools with Claude, see [Usage Examples](docs/usage-examples.md).
  245. ## Additional Documentation
  246. - [SQL Server Setup Guide](docs/sql-server-setup.md): Details on connecting to SQL Server databases
  247. - [PostgreSQL Setup Guide](docs/postgresql-setup.md): Details on connecting to PostgreSQL databases
  248. - [Usage Examples](docs/usage-examples.md): Example queries and commands to use with Claude
  249. ## Development
  250. To run the server in development mode:
  251. ```
  252. npm run dev
  253. ```
  254. To watch for changes during development:
  255. ```
  256. npm run watch
  257. ```
  258. ## Requirements
  259. - Node.js 18+
  260. - For SQL Server connectivity: SQL Server 2012 or later
  261. - For PostgreSQL connectivity: PostgreSQL 9.5 or later
  262. ## License
  263. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.