LogCarver MCP Server
Read-only MCP server that finds deleted SQL Server rows from the transaction log (fn_dblog).
LogCarver scores 59 (Fair), licensed MIT and written in C#. It installs as a local process. It does not declare tools yet. Filed under Databases. GitHub shows 1 stars. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
59 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade C
65/100 for listing completeness. Lost points: no listed tools, short summary.
How quality is graded
Where the 59 comes from
22 + 15 + 1 + 10 + 4 + 7 = 59. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 15 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 1 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.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.
{ "mcpServers": { "caiderek-logcarver-mcp": { "command": "dnx", "args": [ "LogCarver.Mcp" ], "env": { "LOGCARVER_MCP_CONNECTION_STRING": "YOUR_LOGCARVER_MCP_CONNECTION_STRING", "LOGCARVER_MCP_ALLOWED_DATABASES": "" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
LOGCARVER_MCP_CONNECTION_STRINGSecret | Required | SQL Server connection string. The login must be sysadmin (fn_dblog requires it). Example: Server=localhost;Database=MyDb;Integrated Security=true;TrustServerCertificate=true |
LOGCARVER_MCP_ALLOWED_DATABASES | Optional | Optional. Extra databases the tool may read besides the one in the connection string, separated by commas or semicolons. |
Tools
All capabilitiesTools 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
LogCarver.Mcp
English | 繁體中文
A read-only MCP server that lets an AI assistant answer "what rows were just deleted from this SQL Server table?" by reading the database's transaction log (fn_dblog). No Audit, CDC or Change Tracking needs to be enabled beforehand.
It is a thin wrapper over the decoding engine from LogCarver (MIT). Everything runs on your machine and nothing is sent anywhere.
Status: early (v0.1). On NuGet and in the official MCP registry as
io.github.caiderek/logcarver-mcp.
Quick start (5 minutes)
-
Install (needs the .NET 10 SDK or runtime):
dotnet tool install -g LogCarver.Mcp -
Make a throwaway database. Run
examples/try-it.sqlin SSMS orsqlcmd. It createsMcpTest, inserts 10 orders, deletes 4 and updates 1. -
Keep the password out of the command. Put the connection string in a file that only you can read (the SQL login must be sysadmin):
Server=localhost;Database=McpTest;User Id=YOUR_LOGIN;Password=YOUR_PASSWORD;TrustServerCertificate=trueSave it as, for example,
C:\Users\you\logcarver-mcp.conn(one line, nothing else). Then add the server and point it at the file:claude mcp add --scope user logcarver --env LOGCARVER_MCP_CONNECTION_STRING_FILE="C:\Users\you\logcarver-mcp.conn" -- logcarver-mcpThe password is never typed on the command line and never appears in the MCP configuration. Do not commit this file anywhere.
-
Ask in a new conversation: "Which rows were deleted from dbo.Orders in McpTest?" You should see Bob, Carol, Dave and Eve (Id 2 to 5). Then try "Show the history of Id=1" (Amount 100.00 to 111.11, Note first to changed) and "Include the undo SQL".
-
Clean up:
DROP DATABASE McpTest;,claude mcp remove logcarver.
If the result is empty, the log space was probably reused (for example after a CHECKPOINT under SIMPLE recovery, or a log backup). See the limits below.
What it does
One tool, find_deleted_rows. It only reads: SELECTs, and DBCC PAGE reads of data pages to rebuild rows whose INSERT has left the log. It never changes data, and the optional undo SQL is plain text that the tool never executes.
| Parameter | Meaning |
|---|---|
table (required) | Schema-qualified, e.g. dbo.Orders |
database | Defaults to the database in the connection string. Any other database is refused unless listed in LOGCARVER_MCP_ALLOWED_DATABASES |
operations | delete (default), update, insert, all |
from, to | ISO 8601 time window, server-local time, no zone conversion |
key | Column=Value, return one row's history only. Column name is case-insensitive; dates, bit, decimals and hex binary match as you would write them |
maxRows | Default 20, max 500, 0 = counts only. The most recent events are kept |
includeUndoSql | Also return suggested SQL that would reverse each event |
The result is JSON: a summary (counts, truncation, warnings and notes) and events (kind, timestamp, LSN, transaction id, before/after column values, note). Binary values are hex strings and decimals are strings, so nothing is silently rounded.
Requirements and limits
- The connection's login must be sysadmin (
fn_dblogrequires it). - You only see what is still in the active log. If the log space has been reused the result is empty, and that is not a bug. The paid LogCarverOffline tool can often recover that case by reading the raw
.ldf. TRUNCATEandDROPcannot be recovered.- Compressed tables are refused.
timeandxmlcolumns and off-row LOB values are refused or flaggedneedsManualReview; they are never guessed. - Validated on SQL Server 2025, 2022, 2019 and 2016 (SP2). Other versions return a warning in
notes. - Scanning a large active log can take a minute or more.
Configure
The connection string comes from an environment variable, so credentials never pass through the AI conversation:
LOGCARVER_MCP_CONNECTION_STRING=Server=localhost;Database=MyDb;Integrated Security=true;TrustServerCertificate=true
Or point LOGCARVER_MCP_CONNECTION_STRING_FILE at a file that contains it.
The login is sysadmin and the caller is an AI, so the tool may only read the connection string's database. To let it read others, list them (comma or semicolon separated):
LOGCARVER_MCP_ALLOWED_DATABASES=Sales;HR
Row values come straight from the database. They are data, not instructions, and the tool description tells the model so.
Install
Needs the .NET 10 SDK or runtime.
dotnet tool install -g LogCarver.Mcp
Or run it without installing, through dnx:
dotnet dnx LogCarver.Mcp --yes
Claude Code
claude mcp add logcarver --env LOGCARVER_MCP_CONNECTION_STRING="Server=localhost;Database=MyDb;Integrated Security=true;TrustServerCertificate=true" -- logcarver-mcp
With dnx instead of a global tool, end the command with -- dotnet dnx LogCarver.Mcp --yes.
From source
git clone --recurse-submodules https://github.com/caiderek/LogCarver.Mcp
dotnet build
dotnet run --project src/LogCarver.Mcp
Tests
dotnet test tests/LogCarver.Mcp.Tests
dotnet test tests/LogCarver.Mcp.IntegrationTests
The integration tests need a local SQL Server and a sysadmin Windows login. They create and drop their own sandbox database, LogCarver_McpTests.
License
MIT, see LICENSE.
Frequently asked questions
What is LogCarver MCP Server?
Read-only MCP server that finds deleted SQL Server rows from the transaction log (fn_dblog).
How do I install LogCarver 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. LogCarver MCP Server runs locally from the NuGet package LogCarver.Mcp with the command dnx LogCarver.Mcp.
Is LogCarver MCP Server free and open source?
Yes. LogCarver MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does LogCarver MCP Server support remote (HTTP) connections?
No remote endpoint is listed for LogCarver MCP Server. It runs locally on your machine over stdio, started by your MCP client.
How is LogCarver MCP Server's trust score calculated?
LogCarver MCP Server scores 59 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
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.