A comprehensive Model Context Protocol (MCP) server implementation that provides full CRUD (Create, Read, Update, Delete) operations for SQLite databases. This server allows clients to interact with multiple SQLite database files through a standardized MCP interface.
This MCP server provides comprehensive SQLite database operations through the Model Context Protocol. It supports Create, Read, Update, Delete (CRUD) operations on multiple SQLite database files, with each operation accepting a database path parameter for flexible multi-database management.
- Multi-database Support: Connect to different SQLite databases per request
- Full CRUD Operations: Create, Read, Update, Delete operations
- Schema Management: Table creation, schema inspection, and metadata queries
- SQLite Meta Commands: Support for
.tables,.schema,.indexes,.pragmacommands - Type Safety: Full TypeScript implementation with Zod validation
- Property-based Testing: Comprehensive testing with fast-check
- MCP Protocol Compliance: Standard MCP protocol implementation
npm install# Build the project
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Lint code
npm run lintsrc/
├── types/ # Type definitions and schemas
├── tools/ # MCP tool implementations
├── database/ # Database management
├── server/ # MCP server implementation
└── index.ts # Entry point
To use this server with an MCP client, add the following configuration:
{
"mcpServers": {
"sqlite-mcp": {
"command": "npx",
"args": ["-y", "git+https://github.com/YUChoe/sqlite-mcp"],
"disabled": false,
"autoApprove": []
}
}
}The server exposes the following MCP tools:
create-table: Create new tables with specified schemainsert-data: Insert data into existing tables
select-data: Execute SELECT queries with optional parametersget-schema: Retrieve table schema information
update-data: Execute UPDATE queries with conditions
delete-data: Execute DELETE queries with conditions
meta-command: Execute SQLite meta commands (.tables, .schema, etc.)
This implementation satisfies the following requirements:
- Multi-database connection management (Requirements 1.1-1.4)
- Complete CRUD operations (Requirements 2.1-5.4)
- Schema and metadata access (Requirements 6.1-7.5)
- MCP protocol compliance (Requirements 8.1-8.4)
- Multilingual documentation (Requirements 9.1-9.4)
MIT
TypeScript로 구현된 SQLite CRUD 작업을 위한 MCP(Model Context Protocol) 서버입니다.
이 MCP 서버는 Model Context Protocol을 통해 포괄적인 SQLite 데이터베이스 작업을 제공합니다. 여러 SQLite 데이터베이스 파일에 대한 생성, 읽기, 업데이트, 삭제(CRUD) 작업을 지원하며, 각 작업마다 데이터베이스 경로 매개변수를 받아 유연한 다중 데이터베이스 관리가 가능합니다.
- 다중 데이터베이스 지원: 요청별로 다른 SQLite 데이터베이스에 연결
- 완전한 CRUD 작업: 생성, 읽기, 업데이트, 삭제 작업
- 스키마 관리: 테이블 생성, 스키마 검사, 메타데이터 쿼리
- SQLite 메타 명령:
.tables,.schema,.indexes,.pragma명령 지원 - 타입 안전성: Zod 검증을 포함한 완전한 TypeScript 구현
- 속성 기반 테스트: fast-check를 사용한 포괄적인 테스트
- MCP 프로토콜 준수: 표준 MCP 프로토콜 구현
npm install# 프로젝트 빌드
npm run build
# 개발 모드 실행
npm run dev
# 테스트 실행
npm test
# 커버리지와 함께 테스트 실행
npm run test:coverage
# 코드 린트
npm run lintsrc/
├── types/ # 타입 정의 및 스키마
├── tools/ # MCP 도구 구현
├── database/ # 데이터베이스 관리
├── server/ # MCP 서버 구현
└── index.ts # 진입점
MCP 클라이언트에서 이 서버를 사용하려면 다음 설정을 추가하세요:
{
"mcpServers": {
"sqlite-mcp": {
"command": "npx",
"args": ["-y", "git+https://github.com/YUChoe/sqlite-mcp"],
"disabled": false,
"autoApprove": []
}
}
}서버는 다음 MCP 도구들을 제공합니다:
create-table: 지정된 스키마로 새 테이블 생성insert-data: 기존 테이블에 데이터 삽입
select-data: 선택적 매개변수와 함께 SELECT 쿼리 실행get-schema: 테이블 스키마 정보 조회
update-data: 조건과 함께 UPDATE 쿼리 실행
delete-data: 조건과 함께 DELETE 쿼리 실행
meta-command: SQLite 메타 명령 실행 (.tables, .schema 등)
이 구현은 다음 요구사항을 만족합니다:
- 다중 데이터베이스 연결 관리 (요구사항 1.1-1.4)
- 완전한 CRUD 작업 (요구사항 2.1-5.4)
- 스키마 및 메타데이터 접근 (요구사항 6.1-7.5)
- MCP 프로토콜 준수 (요구사항 8.1-8.4)
- 다국어 문서화 (요구사항 9.1-9.4)
MIT