LogCarver
Read-only MCP server that finds deleted SQL Server rows in the transaction log
- Pricing
- Open source
- Platforms
- CLI, Windows, macOS
- Runs
- Locally
- Version
- 0.1.4
- Listing updated
- 2 days ago
About LogCarver
LogCarver is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.
When rows vanish from a SQL Server table and no Audit, CDC or Change Tracking was switched on, the transaction log is often the only record. LogCarver.Mcp lets an assistant answer "what was just deleted from dbo.Orders?" by decoding that log through fn_dblog. It wraps the MIT-licensed LogCarver decoding engine and runs on your machine; nothing is sent anywhere.
It exposes a single tool, find_deleted_rows. Parameters cover the table, an optional database (others are refused unless allow-listed), operations (delete, update, insert or all), an ISO time window, a Column=Value key for one row's history, a row cap up to 500, and an option to return suggested undo SQL that the tool never executes. The result is JSON with a summary and events carrying LSN, transaction id and before and after values.
Limits are spelled out. The login must be sysadmin, only the active log is visible, TRUNCATE and DROP cannot be recovered, and compressed tables are refused. Install needs the .NET 10 SDK or runtime, and the README recommends keeping the connection string in a file rather than on the command line.
Install
Run in a terminal
claude mcp add logcarver-mcp --env LOGCARVER_MCP_CONNECTION_STRING='<LOGCARVER_MCP_CONNECTION_STRING>' -- dnx LogCarver.Mcp --yesAdd to claude_desktop_config.json
{
"mcpServers": {
"logcarver-mcp": {
"command": "dnx",
"args": [
"LogCarver.Mcp",
"--yes"
],
"env": {
"LOGCARVER_MCP_CONNECTION_STRING": "<LOGCARVER_MCP_CONNECTION_STRING>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"logcarver-mcp": {
"command": "dnx",
"args": [
"LogCarver.Mcp",
"--yes"
],
"env": {
"LOGCARVER_MCP_CONNECTION_STRING": "<LOGCARVER_MCP_CONNECTION_STRING>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"logcarver-mcp": {
"type": "stdio",
"command": "dnx",
"args": [
"LogCarver.Mcp",
"--yes"
],
"env": {
"LOGCARVER_MCP_CONNECTION_STRING": "<LOGCARVER_MCP_CONNECTION_STRING>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"logcarver-mcp": {
"command": "dnx",
"args": [
"LogCarver.Mcp",
"--yes"
],
"env": {
"LOGCARVER_MCP_CONNECTION_STRING": "<LOGCARVER_MCP_CONNECTION_STRING>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"logcarver-mcp": {
"command": "dnx",
"args": [
"LogCarver.Mcp",
"--yes"
],
"env": {
"LOGCARVER_MCP_CONNECTION_STRING": "<LOGCARVER_MCP_CONNECTION_STRING>"
}
}
}
}Configuration
LOGCARVER_MCP_CONNECTION_STRINGSQL Server connection string. The login must be sysadmin (fn_dblog requires it). Example: Server=localhost;Database=MyDb;Integrated Security=true;TrustServerCertificate=trueRequiredLOGCARVER_MCP_ALLOWED_DATABASESOptional. Extra databases the tool may read besides the one in the connection string, separated by commas or semicolons.
Tools this server provides (1)
Taken from the project documentation; the running server may differ.
- find_deleted_rows
- Finds deleted, updated or inserted rows in a table from the SQL Server transaction log.
What it does
- Deleted-row recovery
- Finds deleted, updated or inserted rows from the live transaction log.
- Row history by key
- Returns the history of one row using a Column=Value key.
- Suggested undo SQL
- Optionally returns plain-text SQL that would reverse each event; it is never executed.
- Read-only access
- Uses SELECT and DBCC PAGE reads and never changes data.
- Database allow-list
- Refuses databases other than the connection's own unless listed.
- Honest value handling
- Binary values are hex strings and decimals are strings, so nothing is rounded.
Good for
- Find out which rows an accidental DELETE removed
- Trace how a single record changed over time
- Draft undo SQL for review after a bad update
- Investigate data loss without prior auditing
Pricing
Open source
MIT licensed; a separate paid LogCarverOffline tool reads raw .ldf files
Prices change. Check caiderek.github.io before you buy.
LogCarver FAQ
What permissions does it need?
The SQL login must be sysadmin because fn_dblog requires it.
Why can the result be empty?
Only the active log is visible; if log space has been reused, for example after a checkpoint under SIMPLE recovery or a log backup, nothing remains to read.
Can it recover TRUNCATE or DROP TABLE?
No.
Which SQL Server versions were validated?
SQL Server 2025, 2022, 2019 and 2016 SP2.
Is LogCarver free?
Yes. LogCarver is open source, so you can use and self-host it for free.
How do I add LogCarver to Claude Code?
Run this command in your terminal: claude mcp add logcarver-mcp --env LOGCARVER_MCP_CONNECTION_STRING='<LOGCARVER_MCP_CONNECTION_STRING>' -- dnx LogCarver.Mcp --yes
What are the best alternatives to LogCarver?
The closest alternatives to LogCarver are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to LogCarver

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools