LSD MCP server
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
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
- Clone this repository onto your computer
$ git clone https://github.com/lsd-so/lsd-mcp.git
$ cd lsd-mcp
- Update the values in the
.env
file withLSD_USER
containing the email you have an account on LSD with andLSD_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>
- 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.
- 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.
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
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.
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
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