Skip to content

Deployment: Dockerfile and Smithery config #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
FROM node:lts-alpine

# Create app directory
WORKDIR /app

# Install dependencies
COPY package.json package-lock.json ./
RUN npm install --ignore-scripts

# Copy source
COPY . .

# Build TypeScript
RUN npm run build

# Set NODE_ENV production
ENV NODE_ENV=production

# Expose nothing (stdio server)

# Default command (can be overridden)
CMD ["node","dist/index.js"]
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MCP Database Server

[![smithery badge](https://smithery.ai/badge/@manpreet2000/mcp-database-server)](https://smithery.ai/server/@manpreet2000/mcp-database-server)

A Model Context Protocol (MCP) server implementation that allows Large Language Models (LLMs) to interact with various databases through natural language. Currently supports MongoDB, with plans to support:

- PostgreSQL
Expand Down Expand Up @@ -29,6 +31,16 @@ A Model Context Protocol (MCP) server implementation that allows Large Language

## Installation

### Installing via Smithery

To install Database Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@manpreet2000/mcp-database-server):

```bash
npx -y @smithery/cli install @manpreet2000/mcp-database-server --client claude
```

### Manual Installation

1. Clone the repository:

```bash
Expand Down
19 changes: 19 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Smithery configuration file: https://smithery.ai/docs/build/project-config

startCommand:
type: stdio
commandFunction:
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|-
(config)=>({command:'node',args:['dist/index.js'],env:{MONGODB_URI:config.mongodbUri}})
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required:
- mongodbUri
properties:
mongodbUri:
type: string
description: MongoDB connection URI
exampleConfig:
mongodbUri: mongodb://user:password@localhost:27017/mydb