home / mcp / libsql model context protocol server
Provides schema information and enables LibSQL table queries via MCP for both authenticated and unauthenticated access.
Configuration
View docs{
"mcpServers": {
"nicholasq-mcp-server-libsql": {
"command": "./mcp-server-libsql",
"args": [
"<database-url>"
]
}
}
}You will run a LibSQL MCP server that exposes LibSQL schema information and table query capabilities through the Model Context Protocol (MCP). You can access resources, read schemas, complete prompts, and execute SQL against LibSQL databases using either unauthenticated or authenticated access, depending on your needs and security requirements.
Connect to the LibSQL MCP server from your MCP-enabled client using the local binary you start from your project or environment. You can run the server without authentication for local access or supply an authentication token to enable authorized access. Once running, you can request resource lists, read resource schemas, perform SQL queries, and leverage prompt completion features provided by the MCP interface.
Typical usage patterns include starting the server with your LibSQL database URL, optionally including an authentication token, and then issuing MCP requests from your client to list databases and tables, fetch schemas, and execute SQL queries. The server is designed to handle both authenticated and unauthenticated modes, giving you flexibility for local development or secure production setups.
Prerequisites you need before installation:
- Deno 2.1 or newer
- A LibSQL database URL
Step by step commands you will run to install and start the server:
curl -fsSL https://deno.land/install.sh | sh
```
```
deno run build
```
# Start without authentication (local LibSQL DB)
``./mcp-server-libsql <database-url>``
# Start with authentication
``./mcp-server-libsql --auth-token <token> <database-url>Security: If you enable authentication, protect the token and limit access to trusted clients. Do not expose the auth token in client-side code or public repositories.
Build and run flow recap: install dependencies, build the binary, then run it with your database URL and optional auth token. Use the run command that matches your security needs.
List available LibSQL resources such as databases and tables via MCP requests.
Read and return the schema for a specified LibSQL resource, enabling clients to understand table structures.
Provide prompt completion capabilities to help construct queries or understand schema usage within MCP interactions.
Execute SQL queries against the LibSQL database and return results to the MCP client.