
cuongtl1992/mcp-dbs
Database management이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
MCP Server는 SQL Database(SQLite, SQL Server, Postgres SQL)와 통합된 LLM을 지원합니다
개요
다양한 데이터베이스 시스템에 연결 및 작업을위한 모델 Context Protocol (MCP) 구현. - SQLite - PostgreSQL - Microsoft SQL 서버 - MongoDB MCP 데이터베이스 서버는 두 가지 모드에서 사용할 수 있습니다. 기본적으로 서버는 SSE (Server-Sent Events) 모드에서 포트 3001에서 실행합니다. http://localhost:3001/mcp.]에서 SSE endpoint로 HTTP 서버를 시작합니다. --port 옵션을 사용하여 사용자 정의 포트를 지정할 수 있습니다. 표준 입력/출력에 통신하는 공구를 위해, 당신은 --stdio 선택권을 이용할 수 있습니다: Claude 설정 파일에 추가하여 Claude Desktop과 mcp-dbs를 통합할 수 있습니다.
개요(AI 번역)
다양한 데이터베이스 시스템에 연결 및 작업을위한 모델 Context Protocol (MCP) 구현.
지원된 데이터베이스
- SQLite의
- 포스트그레SQL
- Microsoft SQL 서버
- 몽고DB
설치
사용법
MCP 데이터베이스 서버는 두 가지 모드에서 사용할 수 있습니다.
SSE 형태 (과태)
기본적으로 서버는 SSE (Server-Sent Events) 모드에서 포트 3001에서 실행합니다.
http://localhost:3001/mcp]에서 SSE endpoint로 HTTP 서버를 시작합니다.
주문 포트
--port 옵션을 사용하여 사용자 지정 포트를 지정할 수 있습니다:
STDIO 형태
표준 입력/출력을 통해 통신하는 공구를 위해, 당신은 --stdio 선택권을 이용할 수 있습니다:
Claude 데스크탑 통합
Claude 설정 파일에 추가하여 Claude Desktop과 mcp-dbs를 통합할 수 있습니다.
구성 단계
- Claude 데스크탑 구성 파일을 열고 만들
mcpServers]에 mcp-dbs 윤곽을 추가하십시오:
자신의 데이터베이스 연결 세부 사항과 환경 변수를 대체합니다.
노트
command]node]args에서 mcp-dbs 설치에서 cli.js 파일에 절대 경로 제공
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
MCP Database Server
A Model Context Protocol (MCP) implementation for connecting to and working with various database systems.
Supported Databases
- SQLite
- PostgreSQL
- Microsoft SQL Server
- MongoDB
Installation
npm install -g mcp-dbs
Usage
The MCP Database Server can be used in two modes:
SSE Mode (Default)
By default, the server runs in SSE (Server-Sent Events) mode on port 3001:
npx mcp-dbs
This will start an HTTP server with an SSE endpoint at http://localhost:3001/mcp.
Custom Port
You can specify a custom port using the --port option:
npx mcp-dbs --port 8080
STDIO Mode
For tools that communicate over standard input/output, you can use the --stdio option:
npx mcp-dbs --stdio
Claude Desktop Integration
You can integrate mcp-dbs with Claude Desktop by adding it to your Claude configuration file.
Configuration Steps
- Open or create your Claude Desktop configuration file
- Add the mcp-dbs configuration to the
mcpServerssection:
{
"mcpServers": {
"mcp-dbs": {
"command": "node",
"args": [
"/path/to/your/mcp-dbs/dist/cli.js",
"--stdio"
],
"env": {
"MCP_MONGODB_URI": "mongodb://localhost:27017",
"MCP_MONGODB_DATABASE": "your-database-name"
}
}
}
}
Replace the environment variables with your own database connection details.
Notes
- The
commandshould benode - In
args, provide the absolute path to the cli.js file in your mcp-dbs installation - Configure the appropriate environment variables for your database type (see the environment variables section below)
- You can use environment variables for any of the supported databases (SQLite, PostgreSQL, SQL Server, or MongoDB)
Using with Claude
Once configured, Claude will be able to access your database using the MCP tools described below. You can ask Claude to:
- Connect to your database
- Execute queries and get results
- Explore your database schema
- Work with tables and data
Tools
- connect-database: Connect to a database
- disconnect-database: Disconnect from a database
- execute-query: Execute a query and return results
- execute-update: Execute a query without returning results
Resources
- database-schema: Get the full database schema
- table-schema: Get the schema for a specific table
- tables-list: Get a list of all tables
Using environment variables for configuration
You can configure your database connections using environment variables:
SQLite
# Set these environment variables before connecting
export MCP_SQLITE_FILENAME="path/to/database.db"
설치
npx mcp-dbs설정
{
"mcpServers": {
"mcp-dbs": {
"command": "node",
"args": [
"/path/to/your/mcp-dbs/dist/cli.js",
"--stdio"
],
"env": {
"MCP_MONGODB_URI": "mongodb://localhost:27017",
"MCP_MONGODB_DATABASE": "your-database-name"
}
}
}
}