Skip to content
MCP server

datasette-mcp MCP Server

Adds a /-/mcp MCP server to any Datasette instance

datasette-mcp scores 45 (Fair), licensed Apache-2.0 and written in Python. It installs as a local process. It does not declare tools yet. Filed under Uncategorized. GitHub shows 21 stars. Package registries report about 332 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.

by datasetteApache-2.0Python21 stars
Trust score
45Fair
Trust score 45 of 100, Fair

Fair trust

45 of 100 from six public signals. Nobody can buy a point.

  • OSI-style license: apache-2.0.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 45 comes from

0 + 20 + 4 + 10 + 4 + 7 = 45. Each factor is capped, so no single signal can carry a listing.

Registry0 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 0 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity4 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 4 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs7 / 10

A real summary, a README with depth, listed tools.

Docs: 7 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "datasette-datasette-mcp": {      "command": "uvx",      "args": [        "datasette-mcp"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.

About

datasette-mcp

PyPI Changelog Tests License

Adds a /-/mcp MCP server to any Datasette instance

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-mcp

Usage

Start Datasette as normal, then configure an MCP client to connect to:

http://localhost:8001/-/mcp

The endpoint uses MCP Streamable HTTP and exposes three read-only tools by default:

  • list_databases lists the databases available to the current Datasette actor.
  • get_database_schema returns the complete SQL schema for a database, including tables, indexes, views, and triggers.
  • execute_sql executes one read-only SQL statement and returns structured columns, column-keyed row objects, and a truncation indicator.

Datasette database visibility and execute-sql permissions are enforced for every tool call. SQL uses the same validate_sql_select() and read-only Database.execute() path as Datasette's custom SQL interface.

Canned queries

Datasette canned queries (called stored queries in Datasette 1.0), including writable canned queries, can be exposed as MCP tools by enabling this plugin setting:

plugins:
  datasette-mcp:
    canned_queries: true

This adds three more tools:

  • list_canned_queries lists the canned queries the current actor can view, optionally filtered to one database. Each entry includes the query's name, title, description, SQL (omitted if hide_sql is set), the parameters it accepts and whether it writes data.
  • execute_canned_query runs a read-only canned query with a dictionary of parameters and returns the same structured results as execute_sql.
  • execute_writable_canned_query runs a writable canned query and returns its success message and number of affected rows. This tool is annotated as destructive, so MCP clients can ask for confirmation before running it.

Canned queries follow the same permission checks as Datasette's own query pages for the actor making the MCP request: the actor needs view-database and view-query permission. On Datasette 1.0, untrusted stored queries also need execute-sql, or execute-write-sql plus the relevant table permissions for writes. Missing parameters default to empty strings, as they do in Datasette, and magic parameters such as :_actor_id are resolved from the MCP HTTP request.

Registering additional MCP tools

Other Datasette plugins can add tools to this MCP server by implementing the register_mcp_tools(datasette, mcp) plugin hook. The mcp argument is the MCPServer for that Datasette instance, so implementations use the MCP Python SDK's normal @mcp.tool() decorator:

from datasette import hookimpl


@hookimpl
def register_mcp_tools(datasette, mcp):
    @mcp.tool()
    async def database_count() -> int:
        """Return the number of user-facing databases."""
        return len(
            [name for name in datasette.databases if name != "_internal"]
        )

The hook itself is synchronous because tools are registered while the MCP server is being constructed. Tool functions can be synchronous or asynchronous and can use all of the input, output, context, and annotation features provided by the MCP Python SDK.

Datasette-mcp registers list_databases, get_database_schema, and execute_sql through this same hook.

Development

To set up this plugin locally, first checkout the code. You can confirm it is available like this:

cd datasette-mcp
# Confirm the plugin is visible
uv run datasette plugins

To run the tests:

uv run pytest

Frequently asked questions

What is datasette-mcp MCP Server?

Adds a /-/mcp MCP server to any Datasette instance

How do I install datasette-mcp MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. datasette-mcp MCP Server runs locally from the PyPI package datasette-mcp with the command uvx datasette-mcp.

Is datasette-mcp MCP Server free and open source?

Yes. datasette-mcp MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does datasette-mcp MCP Server support remote (HTTP) connections?

No remote endpoint is listed for datasette-mcp MCP Server. It runs locally on your machine over stdio, started by your MCP client.

How is datasette-mcp MCP Server's trust score calculated?

datasette-mcp MCP Server scores 45 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server