sqlite
SQLite 데이터베이스를 MCP(Model Context Protocol) 경유로 조작할 수 있는 서버입니다. 기동 시에 복수의 DB를 "alias=path" 형식으로 등록해 두고, 툴 호출 시에는 에일리어스명으로 DB를 선택합니다. 실행 시에 임의의 파일 경로를 받지 않으므로 안전합니다.
기능(툴)
list_databases— 등록된 DB의 에일리어스 목록을 표시list_tables— 지정 DB 내의 전체 테이블명을 목록 표시describe_table— 지정 테이블의 스키마(컬럼/형/외부 키/인덱스)를 취득read_query— SELECT / WITH / PRAGMA 를 실행(읽기 전용)write_query— INSERT / UPDATE / DELETE / DDL 를 실행(데이터 변경)
list_tables/describe_table/read_query/write_query 는 임의의 database 인수(에일리어스명)를
받아들입니다. 등록 DB가 1개뿐인 경우는 생략 가능(자동으로 그것이 디폴트가 됩니다).
2개 이상 등록하고 있는 경우는 매회 database 지정이 필수입니다.
Related MCP server: MCP SQLite Server
셋업
npm install기동
에일리어스=패스 형식으로, 1개 이상의 DB를 지정하여 기동합니다.
node index.js main=/path/to/main.db logs=/path/to/logs.db1개만 등록하는 경우(이 경우는 database 인수를 생략할 수 있습니다):
node index.js main=/path/to/main.db환경 변수
변수명 | 설명 |
| 모든 접속을 읽기 전용으로 엽니다( |
사용 예
// 登録済みDB一覧を確認
{ "tool": "list_databases", "arguments": {} }
// "main" DBのテーブル一覧
{ "tool": "list_tables", "arguments": { "database": "main" } }
// "logs" DBに対してクエリ
{ "tool": "read_query", "arguments": { "sql": "SELECT * FROM events", "database": "logs" } }
// DBが1つしか登録されていない場合は database 省略可
{ "tool": "read_query", "arguments": { "sql": "SELECT * FROM users" } }MCP 클라이언트에 등록
Claude Desktop
claude_desktop_config.json 에 다음을 추가합니다(패스는 환경에 맞춰 절대 패스로 지정):
{
"mcpServers": {
"sqlite": {
"command": "node",
"args": [
"/絶対パス/sqlite-mcp-server/index.js",
"main=/絶対パス/main.db",
"logs=/絶対パス/logs.db"
]
}
}
}설정 후, Claude Desktop을 재기동하면 sqlite 서버의 툴이 이용 가능해집니다.
Claude Code(CLI / VS Code 확장)
VS Code 내의 터미널, 또는 보통 터미널에서 claude 커맨드로 등록합니다.
claude mcp add --transport stdio sqlite -- node /絶対パス/sqlite-mcp-server/index.js main=/絶対パス/main.db logs=/絶対パス/logs.db--의 뒤가 그대로 서버 기동 커맨드로서 전달됩니다.읽기 전용으로 하고 싶은 경우는
--env SQLITE_READONLY=1를 추가합니다:claude mcp add --transport stdio --env SQLITE_READONLY=1 sqlite -- node /絶対パス/index.js main=/絶対パス/main.db디폴트는 로컬 스코프(자신의 현재 프로젝트만). 전 프로젝트에서 사용하려면
--scope user, 팀에서.mcp.json으로 공유하려면--scope project를 붙입니다.claude mcp add --transport stdio --scope user sqlite -- node /絶対パス/index.js main=/絶対パス/main.db
등록 내용의 확인·삭제:
claude mcp list
claude mcp remove sqliteVS Code에서 Claude Code 패널을 열면(또는 claude 세션을 시작하면) list_databases나 read_query 등의 툴이 이용 가능해집니다.
주의 사항
write_query는 SQL 인젝션 대책으로서?플레이스홀더의 이용을 권장합니다(params인수).테이블명은 영숫자와 언더스코어만 허용하도록 밸리데이션하고 있습니다.
에일리어스명은 영숫자·언더스코어·하이픈만 사용할 수 있습니다.
각 DB에의 접속은 최초 액세스 시에 열리고, 이후는 재사용됩니다. 서버 종료 시에 전부 클로즈됩니다.
기동 시에 등록한 에일리어스 이외의 DB에는 일절 액세스할 수 없습니다(임의 패스의 수취 없음).
프로덕션 데이터베이스에 접속하는 경우는
SQLITE_READONLY=1로 기동하는 것을 검토해 주세요.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes sqlite3 database functionality as MCP tools, enabling SQL query execution, schema management, and CRUD operations.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides comprehensive SQLite database interaction through MCP, enabling CRUD operations, custom SQL queries, and database exploration.497126MIT
- AlicenseAqualityCmaintenanceRead-only SQLite database explorer for MCP clients. Allows discovery of tables and columns via resources and running SELECT queries via a tool.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage and query SQLite databases through MCP tools, supporting CRUD operations, schema management, and saved views.4MIT
Related MCP Connectors
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
GibsonAI MCP server: manage your databases with natural language
MCP server for managing Prisma Postgres.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nao9net/mcp-sqlite'
If you have feedback or need assistance with the MCP directory API, please join our Discord server