
This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

An MCP server for libSQL database operations that provides secure database access.
MCP libSQL by xexr is cataloged as an MCP server attributed to xexr. An MCP server for libSQL database operations that provides secure database access. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP libSQL by xexr are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It provides read-query, write-query, create-table, alter-table, list-tables, and describe-table tools.
It includes multi-layer SQL injection prevention, connection pooling with health monitoring and retry, transaction rollback on errors, and comprehensive audit logging.
It supports parameterized queries for safe data handling.
README.md · 77786817125a · Fetched 2026-11-13 08:19:32 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A Model Context Protocol (MCP) server for libSQL database operations, providing secure database access through Claude Desktop, Claude Code, Cursor, and other MCP-compatible clients.
Runs on Node, written in TypeScript
Install:
pnpm install -g @xexr/mcp-libsql
Test locally:
mcp-libsql --url file:///tmp/test.db --log-mode console
Configure Claude Desktop with your Node.js path and database URL (see configuration examples below)
✅ Complete database management capabilities - All 6 core tools implemented and tested
✅ Comprehensive security validation - 67 security tests covering all injection vectors
✅ Extensive test coverage - 244 total tests (177 unit + 67 security) with 100% pass rate
✅ Production deployment verified - Successfully working with MCP clients
✅ Robust error handling - Connection retry, graceful degradation, and audit logging
🔐 Security details: See docs/SECURITY.md for comprehensive security features and testing.
# Use your package manager of choice, e.g. npm, pnpm, bun etc
# Install globally
pnpm install -g @xexr/mcp-libsql
mcp-libsql -v # check version
# ...or build from the repository
git clone https://github.com/Xexr/mcp-libsql.git
cd mcp-libsql
pnpm install # Install dependencies
pnpm build # Build the project
node dist/index.js -v # check version
Global installation assumed below, replace "mcp-libsql" with "node dist/index.js" if using local build
# Test with file database (default: file-only logging)
mcp-libsql --url file:///tmp/test.db
# Test with HTTP database
mcp-libsql --url http://127.0.0.1:8080
# Test with Turso database (environment variable, alternatively export the env var)
LIBSQL_AUTH_TOKEN="your-token" mcp-libsql --url "libsql://your-db.turso.io"
# Test with Turso database (CLI parameter)
mcp-libsql --url "libsql://your-db.turso.io" --auth-token "your-token"
# Development mode with console logging
mcp-libsql --dev --log-mode console --url file:///tmp/test.db
# Test with different logging modes
mcp-libsql --url --log-mode both file:///tmp/test.db
Configure the MCP server in Claude Desktop based on your operating system:
~/Library/Application Support/Claude/claude_desktop_config.json:Global install
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"file:///Users/username/database.db"
]
}
}
}
Alternative configuration for local build installation:
{
"mcpServers": {
"mcp-libsql": {
"command": "node",
"args": [
"/Users/username/projects/mcp-libsql/dist/index.js",
"--url",
"file:///Users/username/database.db"
],
}
}
}
Alternative configuration for global install using nvm lts for node
{
"mcpServers": {
"mcp-libsql": {
"command": "zsh",
"args": [
"-c",
"source ~/.nvm/nvm.sh && nvm use --lts > /dev/null && mcp-libsql --url file:///Users/username/database.db",
],
}
}
}
Important: The global installation method is recommended as it handles PATH automatically.
~/.config/Claude/claude_desktop_config.json:Global install
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"file:///home/username/database.db"
]
}
}
}
Alternative configuration for local build installation:
{
"mcpServers": {
"mcp-libsql": {
"command": "node",
"args": [
"/home/username/projects/mcp-libsql/dist/index.js",
"--url",
"file:///home/username/database.db"
],
}
}
}
%APPDATA%\Claude\claude_desktop_config.json:Global install
{
"mcpServers": {
"mcp-libsql": {
"command": "wsl.exe",
"args": [
"-e",
"bash",
"-c",
"mcp-libsql --url file:///home/username/database.db",
]
}
}
}
Alternative configuration for local build installation:
{
"mcpServers": {
"mcp-libsql": {
"command": "wsl.exe",
"args": [
"-e",
"bash",
"-c",
"/home/username/projects/mcp-libsql/dist/index.js --url file:///home/username/database.db",
]
}
}
}
Alternative configuration for global install using nvm for node
{
"mcpServers": {
"mcp-libsql": {
"command": "wsl.exe",
"args": [
"-e",
"bash",
"-c",
"source ~/.nvm/nvm.sh && mcp-libsql --url file:///home/username/database.db",
]
}
}
}
Important: Use wsl.exe -e (not just wsl.exe) to ensure proper command handling and avoid issues with server command reception on Windows.
For Turso (and other credentialed) databases, you'll need an authentication token. There are two secure ways to provide it:
Global installation shown below, adjust accordingly for your setup
Configure Claude Desktop with environment variable (macOS/Linux example):
export LIBSQL_AUTH_TOKEN="your-turso-auth-token-here"
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"libsql://your-database.turso.io"
]
}
}
}
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"libsql://your-database.turso.io",
"--auth-token",
"your-turso-auth-token-here"
]
}
}
}
Install Turso CLI:
curl -sSfL https://get.tur.so/install.sh | bash
Login to Turso:
turso auth login
Create an auth token:
turso auth token create --name "mcp-libsql"
Get your database URL:
turso db show your-database-name --url
Create and configure database:
# Create database
turso db create my-app-db
# Get database URL
turso db show my-app-db --url
# Output: libsql://my-app-db-username.turso.io
# Create auth token
turso auth token create --name "mcp-libsql-token"
# Output: your-long-auth-token-string
Configure Claude Desktop:
export LIBSQL_AUTH_TOKEN="your-turso-auth-token-here"
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"libsql://my-app-db-username.turso.io"
]
}
}
}
Test the connection:
# Test locally first
mcp-libsql --url "libsql://my-app-db-username.turso.io" --log-mode console
file:///absolute/path/to/database.dbhttp://hostname:portlibsql://your-database.turso.iowhich node to find your Node.js installation pathcwd to ensure relative paths work correctlyfile mode prevents JSON parsing errors in MCP protocol--log-mode console for development debugging--log-mode both for comprehensive logging--log-mode none to disable all loggingRestart Claude Desktop completely after updating the configuration
Test the integration by asking Claude to run SQL queries:
Can you run this SQL query: SELECT 1 as test
📖 Detailed API documentation: See docs/API.md for complete input/output examples and parameters.
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverage
# Run specific test file
pnpm test security-verification
# Lint code
pnpm lint
# Fix linting issues
pnpm lint:fix
# Type check
pnpm typecheck
Test Coverage: 403 tests covering all functionality including edge cases, error scenarios, CLI arguments, authentication, and comprehensive security validation.
# Clean and rebuild
rm -rf dist node_modules
pnpm install && pnpm build
SyntaxError: Unexpected token '??='
Problem: Claude Desktop may default to using an older Node.js version on your system which doesn't support the required feature set.
Solution: Use global installation and nvm node selection method shown above.
pnpm install -g @xexr/mcp-libsqlpnpm build was run and dist/index.js existsmcp-libsql --url file:///tmp/test.dbfile:///tmp/test.dbExpected ',' or ']' after array element in JSON
Resolved: This issue is caused by stdout console logging. The --log-mode option now defaults to file mode which prevents this issue. If you see these errors, ensure you're using the default --log-mode file or not specifying --log-mode at all. Note, the error is harmless, and the tool will still work with it if you wish to have console logging.
# Test database connectivity
sqlite3 /tmp/test.db "SELECT 1"
# Fix permissions
chmod 644 /path/to/database.db
🔧 Full troubleshooting guide: See docs/TROUBLESHOOTING.md for detailed solutions to all issues.
Built with TypeScript and modern Node.js patterns:
Development: pnpm dev • Build: pnpm build • Test: pnpm test
MIT License - see LICENSE file for details.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP libSQL by xexr from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/libsql-database)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.