Skip to main content

Connect Claude to the internet with LSD SQL

Project description

LSD MCP server

Image displaying MCP

Immediately gather an aggregation of high quality info directly from a website just by giving LSD the link via Claude MCP.

You will see Claude connect to the internet and:

  • Write LSD SQL
  • Self-correct LSD SQL
  • Run LSD SQL that's connected to cloud browsers

Demo

Here's a demo of what that looks like in action:

Getting trending repositories using LSD

We treated Claude to psychedelic therapy on LSD and now it can just do things. Here's a longer video on YouTube

Contents

Quickstart

Dependencies

To run the MCP server, you'll need both Python and uv installed. To use the MCP server, you'll need to download either the Claude desktop app or another MCP client.

To use LSD, you'll need to sign up and create an API key so your queries are privately associated to only your account. You can do so for free with a Google account.

Giving Claude LSD

  1. Clone this repository onto your computer
$ git clone https://github.com/lsd-so/lsd-mcp.git
$ cd lsd-mcp
  1. Update the values in the .env file with LSD_USER containing the email you have an account on LSD with and LSD_API_KEY containing the API key you obtained from the profile page.
LSD_USER=<your_email_here>
LSD_API_KEY=<api_key_from_your_profile_page>
  1. Give LSD to Claude
$ uv run mcp install app.py

Note: Every time you run mcp install, if you needed to update claude_desktop_config.json the first time, you will need to remember to update the path to uv each time you install the MCP server.

  1. Restart the Claude desktop app and, now, Claude should be able to do trippy things on LSD.

Claude on LSD

If it's the first time in a chat session where you'd like to have Claude use LSD, because we're not popular enough to get caught in Anthropic's crawls, you'll need to first leverage our custom prompt which feeds in our documentation as part of the assistance.

Using custom prompt

See the write_lsd_sql function if you're interested in how it works but it just boils down to a convenient rule we added to our SCAN keyword enabling a developer or LLM to retrieve the documentation for our language in markdown (if you'd like to run it yourself).

SCAN https://lsd.so/docs/database/language

Failed to start MCP server

Using custom prompt

If you encounter error messages when starting Claude desktop along the lines of the following message:

Failed to start MCP server: Could not start MCP server LSD: Error: spawn uv ENOENT

First time running an MCP server

If this is your first time using an MCP server on your computer than, to remedy the error shown above, follow the instructions under the Add the Filesystem MCP Server step to create a claude_desktop_config.json file that Claude desktop can know to refer to.

Missing executable

Additionally, if you've never done anything relating to Postgres on your computer, then you may encounter an error message containing something like the following:

Error: pg_config executable not found.

To fix, simply install postgres to your machine using an available package manager. If you're on a Mac, you can do so using brew.

$ brew install postgres

Incomplete path

Otherwise and maybe in addition to the issue shown above, in the location where claude_desktop_config.json is stored (is ~/Library/Application Support/Claude/claude_desktop_config.json if you're running on a Mac), modify the value of the command key under mcpServers -> LSD to contain the full path to running uv (run which uv in your terminal if you don't already know what it is).

{
  "mcpServers": {
    "LSD": {
-      "command": "uv",
+      "command": "/Users/your_mac_name/.local/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "psycopg2-binary",
        "mcp",
        "run",
        "/Users/y/testing-mcp/lsd-mcp/app.py"
      ]
    }
  }
}

Once you've done that, restart Claude desktop and the problem should be resolved. If not, please file an issue.

What is MCP?

MCP, short for model context protocol, provides a communication layer between Claude and computer-accessible interfaces such as the filesystem or web APIs. If a limiting factor of LLMs was its detachment from the "real world" since it's just a text generating model, MCP allows users and developers to bring Claude to life.

What is LSD?

LSD SQL, a DSL for the web, enables developers to connect the internet to your applications as though it were a postgres compatible database. Rather than present a new semantic web ontology or make a new internet, it provides a dynamic declarative language that sits atop the existing one.

Designed to target browsers instead of an architecture, LSD allows for powerful parallelization while preserving simplicity with just-in-time tables meaning you can just get data without running a CREATE TABLE beforehand. Sign up for free with a Google account to start querying the internet!

Here's an example of something you can do with LSD, takes ~30 sec if first run

Contact

Reach out to pranav at lsd dot so if you have any questions.

Smithery

smithery badge

Installing via Smithery

To install LSD MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @lsd-so/lsd-mcp --client claude

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_lsd_so_lsd_mcp-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_lsd_so_lsd_mcp-0.1.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_lsd_so_lsd_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: iflow_mcp_lsd_so_lsd_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_lsd_so_lsd_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b165ca8dd560873d8708103164e73879299a68c21be9d36572fdfadc80574873
MD5 a95900f6ac4ed594c22e91b7dcad2ba4
BLAKE2b-256 60eff694cb784003e893444ad836c67a2ba932a38782b9a0c9eaeb244b68c65b

See more details on using hashes here.

File details

Details for the file iflow_mcp_lsd_so_lsd_mcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_lsd_so_lsd_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_lsd_so_lsd_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a9ecddd7ada82cb03a7ddc74d0addd0a592c6e92c6083eefa452229a9bc9ac5
MD5 a30917edf05daab3e7363a52c7408bb8
BLAKE2b-256 9b96c0214fdba7ca226e1ca8f150d01e1109e5853c644e0f5a5afc0bc4702f00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page