Persistent semantic memory for SQL databases (Postgres, MySQL, MSSQL, SQLite) — the MCP server with the most ironic name. One-line install for Claude Code, Cursor, and any MCP-compatible client.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
claude mcp add amnesic -- uvx caches{
"mcpServers": {
"amnesic": {
"command": "uvx",
"args": ["caches"]
}
}
}Resumen de MCP Servers
# amnesic — the MCP server with the most ironic name in the registry
[](https://pypi.org/project/amnesic/)
[](https://pypi.org/project/amnesic/)
[](LICENSE)
[](https://registry.modelcontextprotocol.io)
**Persistent semantic memory for your SQL databases. The name is ironic — it remembers everything.**
*"The MCP server with the most ironic name in the registry. It's anything but amnesic — it remembers your database so your AI doesn't have to."*
<p align="center">
<img src="assets/demo.svg" alt="Teach your AI a status code once, then query it in plain language forever. Your AI agent calls amnesic's tools; amnesic remembers across sessions." width="720">
</p>
**Works with** Claude Code · Claude Desktop · Cursor · VS Code · Cline · Windsurf — any [MCP-compatible client](https://modelcontextprotocol.io/clients).
**Available on** [Official MCP Registry](https://registry.modelcontextprotocol.io) · [Claude Code plugin marketplace](https://github.com/SurajKGoyal/amnesic-marketplace)
> 🔒 **Read-only by design.** amnesic refuses to execute `INSERT`, `UPDATE`, `DELETE`, `DROP`, `TRUNCATE`, `ALTER`, `CREATE`, `EXEC`, `MERGE`, `GRANT`, `REVOKE` — and any write statement smuggled inside a `WITH` CTE. Two layers of defense: static SQL analysis rejects the statement before connecting, **and** every query runs inside a transaction that is immediately rolled back. Safe to point at prod. [Details ↓](#safety--read-only-enforcement)
---
## The problem
Every session with an AI starts cold. You spend the first few minutes re-explaining what tables exist, what a `status` column value of `3` means, which FK connects `orders` to `users`. Then the session ends, and you do it all over again tomorrow.
**amnesic fixes this.** It gives your AI a persistent SQLite knowledge store — one per database — that survives across sessions. Annotate a status enum once; every future session sees those labels automatically. Discover FK relationships once; every future JOIN query uses that graph.
---
## Quickstart (90 seconds)
```bash
pipx install amnesic # install the core
amnesic init # interactive wizard
```
> ⚡ **Try it without credentials.** Run `amnesic init --demo` instead — it adds a self-contained SQLite sample DB (e-commerce schema: customers / products / orders with FKs and an enum column) so you can exercise every tool in under a minute. Great for a first look before pointing amnesic at a real database.
The wizard asks which database type you're connecting to and tells you the **one** command to run if its driver isn't installed yet — you never need to guess extras up front.
The wizard:
- Asks for your database type, host, and credentials
- Tests the connection before saving anything
- Stores the password securely in `~/.config/amnesic/.env` (chmod 600)
- Writes the connection block to `~/.config/amnesic/connections.toml`
Then [add amnesic to your AI client](#add-to-your-ai-client) and restart.
<details>
<summary><b>Don't have <code>pipx</code>? Or prefer <code>uv</code> / plain <code>pip</code>?</b></summary>
<br/>
**Install `pipx`** (one-time):
```bash
brew install pipx # macOS
sudo apt install pipx # Linux (Debian/Ubuntu)
python -m pip install --user pipx # Windows / generic
```
**Or use `uv`** (single-binary alternative — fast, no Python required):
```bash
brew install uv # macOS
curl -LsSf https://astral.sh/uv/install.sh | sh # Linux / macOS
powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows
uv tool install amnesic
```
**Or plain `pip`** (installs into your active Python env):
```bash
pip install amnesic
```
> Whichever you pick, `amnesic init` asks which database you'll connect to and prints the one extra command to install that driver — no need to commit to extras up front.
</details>
After install, `amnesic --help` works from any terminal.
### Where amnesic stores things
| File | macOS / Linux | Windows |
|---|---|---|
| Config | `~/.config/amnesic/connections.toml` | `%APPDATA%\amnesic\connections.toml` |
| Secrets | `~/.config/amnesic/.env` (chmod 600) | `%APPDATA%\amnesic\.env` (user profile ACL) |
| Knowledge | `~/.config/amnesic/knowledge_<name>.db` | `%APPDATA%\amnesic\knowledge_<name>.db` |
Set `$AMNESIC_HOME` (or `$XDG_CONFIG_HOME` on Linux) to override the location.
### Adding more connections later
```bash
amnesic add # add another connection to existing config
amnesic test # verify all connections
amnesic test orders.prod # verify one connection
```
### Setting and rotating passwords
`amnesic init` and `amnesic add` save your password automatically — for the typical setup flow, you never need to think about this section.
Use `set-secret` when you need to change a stored password later — IT rotated it, you mistyped it during setup, or you're hand-editing the config.
```bash
$ amnesic set-secret ORDERS_PROD_PASSWORD
Value: **** ← hidden input (your typing is invisible)
Confirm: ****
✓ Set ORDERS_PROD_PASSWORD in ~/.config/amnesic/.env
```
**What's the variable name?** It's the env var your `connections.toml` references for that connection's password. The wizard auto-generates these as `<CONNECTION_NAME_UPPERCASE_WITH_UNDERSCORES>_PASSWORD`:
| Connection name | Generated env var |
|---|---|
| `orders.prod` | `ORDERS_PROD_PASSWORD` |
| `analytics` | `ANALYTICS_PASSWORD` |
| `drive.staging` | `DRIVE_STAGING_PASSWORD` |
To see the exact name your config uses, check `~/.config/amnesic/connections.toml` — anything inside `${...}` is the variable to pass to `set-secret`.
**Under the hood**: writes (or replaces) the line in `~/.config/amnesic/.env`, sets file permission to `chmod 600` (only your user can read it), preserves all other entries.
---
## Add to your AI client
Once amnesic is installed with the right driver extras (see [Quickstart](#quickstart-90-seconds)), the `amnesic` command is on your PATH. Use the same snippet across every MCP client:
### Claude Code
**One-line install** (recommended — no JSON editing). Inside Claude Code:
```
/plugin marketplace add SurajKGoyal/amnesic-marketplace
/plugin install amnesic@amnesic
```
That wires amnesic as an MCP server automatically. Source: [SurajKGoyal/amnesic-marketplace](https://github.com/SurajKGoyal/amnesic-marketplace).
<details>
<summary><b>Or wire it by hand — edit <code>~/.claude/mcp.json</code></b></summary>
<br/>
```json
{
"mcpServers": {
"amnesic": {
"command": "amnesic"
}
}
}
```
</details>
### Claude Desktop
Add to your platform's Claude Desktop config:
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"amnesic": {
"command": "amnesic"
}
}
}
```
### Cursor
**One-click install** — click the button below and Cursor wires it up for you:
<a href="https://cursor.com/en-US/install-mcp?name=amnesic&config=eyJjb21tYW5kIjoiYW1uZXNpYyJ9"><img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Add amnesic to Cursor" height="32"></a>
<details>
<summary><b>Or wire it by hand — edit <code>.cursor/mcp.json</code></b></summary>
<br/>
Add to `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` globally):
```json
{
"mcpServers": {
"amnesic": {
"command": "amnesic"
}
}
}
```
</details>
### Without a global install (ephemeral)
If you'd rather not install amnesic on your system, use `uvx` or `pipx` to fetch it each time the MCP client starts. Note the driver extras must be passed explicitly:
```json
// uvx — requires `uv` installed (see Install section for per-OS instructions)
{
"mcpServers": {
"amnesic": {
"command": "uvx",
"args": ["--from", "amnesic[mssql]", "amnesic"]
}
}
}
// pipx — usually pre-installed via Homebrew or system package manager
{
"mcpServers": {
"amnesic": {
"command": "pipx",
"args": ["run", "--spec", "amnesic[mssql]", "amnesic"]
}
}
}
```
For multiple drivers, comma-separate inside the brackets — e.g. `amnesic[postgres,mssql]` or use `amnesic[all]` for everything.
### VS Code (with MCP extension)
Add to `.vscode/mcp.json`:
```json
{
"servers": {
"amnesic": {
"type": "stdio",
"command": "amnesic"
}
}
}
```
---
## Updating
amnesic ships often. Upgrade with the same tool you installed it with:
| Installed via | Upgrade command |
|---|---|
| `pipx` | `pipx upgrade amnesic` |
| `uv tool` | `uv tool upgrade amnesic` |
| `pip` | `pip install --upgrade amnesic` |
| `uvx` (ephemeral, in your MCP config) | uvx caches builds — run `uv cache clean amnesic` to pull the newest |
Then **restart your MCP client** (Claude Code, Cursor, …) so it relaunches the amnesic server and picks up any new tools.
**Upgrading is safe — you won't lose annotations.** Your knowledge files auto-migrate to the new schema on first load; amnesic only ever *adds* columns, never drops your data.
To check the installed version: `amnesic --version`. Latest release: [PyPI](https://pypi.org/project/amnesic/) · [Releases](https://github.com/SurajKGoyal/amnesic/releases).
---
## Tools
| Tool | Description |
|------|-------------|
| `db_list_connections()` | List all configured connections (no secrets exposed) |
| `db_list_tables(connection)` | All known tables with descriptions and column counts |
| `db_search(query, connection, target, limit)` | BM25 search over table/column descriptions and aliases |
| `db_get_schema(table, connection)` | Column schema mergedLo que la gente pregunta sobre amnesic
¿Qué es SurajKGoyal/amnesic?
+
SurajKGoyal/amnesic es mcp servers para el ecosistema de Claude AI. Persistent semantic memory for SQL databases (Postgres, MySQL, MSSQL, SQLite) — the MCP server with the most ironic name. One-line install for Claude Code, Cursor, and any MCP-compatible client. Tiene 0 estrellas en GitHub y se actualizó por última vez today.
¿Cómo se instala amnesic?
+
Puedes instalar amnesic clonando el repositorio (https://github.com/SurajKGoyal/amnesic) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar SurajKGoyal/amnesic?
+
Nuestro agente de seguridad ha analizado SurajKGoyal/amnesic y le ha asignado un Trust Score de 87/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene SurajKGoyal/amnesic?
+
SurajKGoyal/amnesic es mantenido por SurajKGoyal. La última actividad registrada en GitHub es de today, con 4 issues abiertos.
¿Hay alternativas a amnesic?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega amnesic en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/surajkgoyal-amnesic)<a href="https://claudewave.com/repo/surajkgoyal-amnesic"><img src="https://claudewave.com/api/badge/surajkgoyal-amnesic" alt="Featured on ClaudeWave: SurajKGoyal/amnesic" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。