npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@prama13/turso-mcp

v0.1.1

Published

MCP server for readonly Turso/libSQL database queries

Readme

@prama13/turso-mcp

A Model Context Protocol (MCP) server for readonly querying of Turso/libSQL databases. This server enables AI assistants like Claude, Roo, and Cline to safely query your Turso database without any risk of data modification.

Features

  • 🔒 Read-only operations - Only SELECT queries are allowed
  • 📊 Table browsing - List all tables and view their schemas
  • 🚫 Security-focused - Blocks all write operations (INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, etc.)
  • 🔌 MCP Protocol - Compatible with any MCP client
  • 📦 Easy setup - Works with npx - no installation required

Installation

No installation needed! Use directly with npx:

npx @prama13/turso-mcp

Configuration

For Roo/Cline

Add to your MCP settings:

{
  "mcpServers": {
    "turso": {
      "command": "npx",
      "args": ["-y", "@prama13/turso-mcp"],
      "env": {
        "TURSO_DATABASE_URL": "libsql://your-database.turso.io",
        "TURSO_AUTH_TOKEN": "your-auth-token"
      }
    }
  }
}

For Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "turso": {
      "command": "npx",
      "args": ["-y", "@prama13/turso-mcp"],
      "env": {
        "TURSO_DATABASE_URL": "libsql://your-database.turso.io",
        "TURSO_AUTH_TOKEN": "your-auth-token"
      }
    }
  }
}

Getting Your Turso Credentials

  1. Install Turso CLI:
curl -sSfL https://get.tur.so/install.sh | bash
  1. Sign up/login:
turso auth signup
# or
turso auth login
  1. Create a database:
turso db create my-database
  1. Get your database URL:
turso db show my-database --url
  1. Create an auth token:
turso db tokens create my-database

Available Tools

query

Run read-only SQL queries against your Turso database.

Parameters:

  • sql (string, required) - The SQL query to execute (SELECT only)

Example:

SELECT * FROM users WHERE id = 1;

Available Resources

The server exposes all database tables as resources:

  • List tables - Automatically discovers all tables in your database
  • Table schemas - View column definitions for each table

Security

This server implements multiple layers of security to ensure read-only access:

  1. Keyword filtering - Blocks SQL statements containing write keywords:

    • INSERT, UPDATE, DELETE, DROP, CREATE, ALTER
    • REPLACE, TRUNCATE, ATTACH, DETACH
    • PRAGMA, REINDEX, VACUUM, ANALYZE
  2. Environment-based credentials - Database credentials are passed via environment variables, never in code

Development

# Clone the repository
git clone https://github.com/PramaAditya/turso-mcp.git
cd turso-mcp

# Install dependencies
npm install

# Build
npm run build

# Test locally
TURSO_DATABASE_URL="libsql://..." TURSO_AUTH_TOKEN="..." node dist/index.js

License

MIT

Author

prama13

Related