プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。プロトタイプ · 30分ごとに更新
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

LogCarverGuard

作者:caiderekバージョン 0.1.0i★ 1iパソコンで動く
レジストリ名io.github.caiderek/logcarverguard

インストール方法

What it does

Guardrail for AI agents on SQL Server: statement blocking, optional read-only mode and an audit log.

  • Connects パソコンで動く
  • Account or key Needs LOGCARVERGUARD_CONNECTION_STRING
  • Category データベース・データセット

インストール

使っているAIアプリを選んで、設定をコピーしてください。

チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月13日

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげますが、先に準備が必要です

LogCarverGuard のキーが必要です(提供元のサイトで作成) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません

  1. LogCarverGuard に登録してキーを作る

    提供元のサイトで登録し、次の手順で使う API キーを作ります。料金や無料プランは提供元のサイトで確認してください。

    LogCarverGuard のサイトを開く ↗

  2. パソコン版 Claude アプリの設定ファイルを開く

    SettingsDeveloperEdit Config

  3. この設定を貼り付けて保存

    {
      "mcpServers": {
        "logcarverguard": {
          "command": "dnx",
          "args": [
            "LogCarverGuard.Local",
            "--yes"
          ],
          "env": {
            "LOGCARVERGUARD_CONNECTION_STRING": "your-value",
            "LOGCARVERGUARD_READ_ONLY": "your-value",
            "LOGCARVERGUARD_AUDIT_DB_PATH": "your-value",
            "LOGCARVERGUARD_TRUNCATE_ALLOWLIST": "your-value",
            "LOGCARVERGUARD_EXEC_WHITELIST": "your-value",
            "LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLIST": "your-value"
          }
        }
      }
    }

    キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください

  4. Claude を終了してもう一度開く

  5. 試してみる

    LogCarverGuard を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が LogCarverGuard を使っていると言うか、回答に LogCarverGuard のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT はまだ LogCarverGuard につなげません

LogCarverGuard はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません

代わりにできること

A · LogCarverGuard につなげるアプリを使う

  • LogCarverGuard のキーが必要です(提供元のサイトで作成) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
  • LogCarverGuard のキーが必要です(提供元のサイトで作成)
  • LogCarverGuard のキーが必要です(提供元のサイトで作成)
  • LogCarverGuard のキーが必要です(提供元のサイトで作成)

B · データベース・データセット の中で ChatGPT につなげる別のサーバー

同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました

Claude Code につなげますが、先に準備が必要です

LogCarverGuard のキーが必要です(提供元のサイトで作成)

  1. LogCarverGuard に登録してキーを作る

    提供元のサイトで登録し、次の手順で使う API キーを作ります。料金や無料プランは提供元のサイトで確認してください。

    LogCarverGuard のサイトを開く ↗

  2. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  3. このコマンドを貼り付けて Enter

    claude mcp add --scope user logcarverguard --env LOGCARVERGUARD_CONNECTION_STRING=your-value --env LOGCARVERGUARD_READ_ONLY=your-value --env LOGCARVERGUARD_AUDIT_DB_PATH=your-value --env LOGCARVERGUARD_TRUNCATE_ALLOWLIST=your-value --env LOGCARVERGUARD_EXEC_WHITELIST=your-value --env LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLIST=your-value -- dnx LogCarverGuard.Local --yes

    Enter の前に「your-value」を自分のキーに書き換えてください

    キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください

  4. Claude Code で /mcp と入力

    LogCarverGuard が一覧にあり、接続済みと表示されれば OK です

  5. 試してみる

    LogCarverGuard を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が LogCarverGuard を使っていると言うか、回答に LogCarverGuard のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげますが、先に準備が必要です

LogCarverGuard のキーが必要です(提供元のサイトで作成)

  1. LogCarverGuard に登録してキーを作る

    提供元のサイトで登録し、次の手順で使う API キーを作ります。料金や無料プランは提供元のサイトで確認してください。

    LogCarverGuard のサイトを開く ↗

  2. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  3. キーを入力

    LogCarverGuard の設定で LOGCARVERGUARD_CONNECTION_STRING, LOGCARVERGUARD_READ_ONLY, LOGCARVERGUARD_AUDIT_DB_PATH, LOGCARVERGUARD_TRUNCATE_ALLOWLIST, LOGCARVERGUARD_EXEC_WHITELIST, LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLIST が空です。自分のキーを入れて保存します

    キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください

  4. Cursor の AI チャットを Agent モードで開く

  5. 試してみる

    LogCarverGuard を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が LogCarverGuard を使っていると言うか、回答に LogCarverGuard のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげますが、先に準備が必要です

LogCarverGuard のキーが必要です(提供元のサイトで作成)

  1. LogCarverGuard に登録してキーを作る

    提供元のサイトで登録し、次の手順で使う API キーを作ります。料金や無料プランは提供元のサイトで確認してください。

    LogCarverGuard のサイトを開く ↗

  2. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  3. キーを入力

    LogCarverGuard の設定で LOGCARVERGUARD_CONNECTION_STRING, LOGCARVERGUARD_READ_ONLY, LOGCARVERGUARD_AUDIT_DB_PATH, LOGCARVERGUARD_TRUNCATE_ALLOWLIST, LOGCARVERGUARD_EXEC_WHITELIST, LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLIST が空です。自分のキーを入れて保存します

    キーはアプリの入力欄にだけ貼り付け、チャットに貼ったり人に送ったりしないでください

  4. VS Code の AI チャットを Agent モードで開く

  5. 試してみる

    LogCarverGuard を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が LogCarverGuard を使っていると言うか、回答に LogCarverGuard のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

JSON 設定は下の「開発者向け」にあります

つまずいたら?LogCarverGuard を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

パソコンにインストール

Claude Code

claude mcp add --scope user logcarverguard --env LOGCARVERGUARD_CONNECTION_STRING=your-value --env LOGCARVERGUARD_READ_ONLY=your-value --env LOGCARVERGUARD_AUDIT_DB_PATH=your-value --env LOGCARVERGUARD_TRUNCATE_ALLOWLIST=your-value --env LOGCARVERGUARD_EXEC_WHITELIST=your-value --env LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLIST=your-value -- dnx LogCarverGuard.Local --yes

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "logcarverguard": {
      "command": "dnx",
      "args": [
        "LogCarverGuard.Local",
        "--yes"
      ],
      "env": {
        "LOGCARVERGUARD_CONNECTION_STRING": "your-value",
        "LOGCARVERGUARD_READ_ONLY": "your-value",
        "LOGCARVERGUARD_AUDIT_DB_PATH": "your-value",
        "LOGCARVERGUARD_TRUNCATE_ALLOWLIST": "your-value",
        "LOGCARVERGUARD_EXEC_WHITELIST": "your-value",
        "LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLIST": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "logcarverguard": {
      "command": "dnx",
      "args": [
        "LogCarverGuard.Local",
        "--yes"
      ],
      "env": {
        "LOGCARVERGUARD_CONNECTION_STRING": "your-value",
        "LOGCARVERGUARD_READ_ONLY": "your-value",
        "LOGCARVERGUARD_AUDIT_DB_PATH": "your-value",
        "LOGCARVERGUARD_TRUNCATE_ALLOWLIST": "your-value",
        "LOGCARVERGUARD_EXEC_WHITELIST": "your-value",
        "LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLIST": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "logcarverguard": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "LogCarverGuard.Local",
        "--yes"
      ],
      "env": {
        "LOGCARVERGUARD_CONNECTION_STRING": "your-value",
        "LOGCARVERGUARD_READ_ONLY": "your-value",
        "LOGCARVERGUARD_AUDIT_DB_PATH": "your-value",
        "LOGCARVERGUARD_TRUNCATE_ALLOWLIST": "your-value",
        "LOGCARVERGUARD_EXEC_WHITELIST": "your-value",
        "LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLIST": "your-value"
      }
    }
  }
}

自分で入力する値

  • LOGCARVERGUARD_CONNECTION_STRING 秘密 必須 env
    SQL Server connection string the statements run as. Example: Server=localhost;Database=MyDb;Integrated Security=true;TrustServerCertificate=true
  • LOGCARVERGUARD_READ_ONLY env
    Set to true to allow queries only (SELECT without INTO; remote sources such as OPENQUERY are blocked). Leave unset for the default guard rules.
  • LOGCARVERGUARD_AUDIT_DB_PATH env
    Path of the audit log SQLite file. Defaults to LogCarverGuard/audit.db under the local application data folder.
  • LOGCARVERGUARD_TRUNCATE_ALLOWLIST env
    Comma-separated schema.table entries where TRUNCATE TABLE is allowed. Empty means all TRUNCATE is blocked.
  • LOGCARVERGUARD_EXEC_WHITELIST env
    Comma-separated schema.procedure entries that may be run with EXEC. Empty means all EXEC is blocked.
  • LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLIST env
    Comma-separated schema.table entries where ALTER TABLE ... DROP COLUMN is allowed. Empty means it is blocked.

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

週あたりのダウンロードi
npm/PyPIにない
接続方法
パソコンで動く
最新バージョンi
0.1.0
レジストリ公開日i
2026年10月12日
コードの最終更新i
2026年11月5日
作者
caiderek
パッケージ
nuget: LogCarverGuard.Local
ウェブサイト
github.com
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

パソコン上で動かせるアプリ

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

すべてのアプリと長所・短所 →

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月14日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント caiderek で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:9 日前

  • ✓ 合格

    ライセンスがある

    MITを使用

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

Google でログインして投稿

ユーザーレビュー

まだレビューはありません

Google でログインしてレビューを書く

データベース・データセットのほかのサーバーとの比較i

  • このカテゴリのほかの1188件のうち79%よりスターが多い
  • このカテゴリのほかの1188件のうち60%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの1188件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

LogCarverGuardは安全ですか?

当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

入力が必要なもの:LOGCARVERGUARD_CONNECTION_STRING

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は9 日前、最新バージョン(0.1.0)がレジストリに届いたのは33 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンに.NETも必要です。

代わりに使えるものは?

同じカテゴリには:Dbx, MCP Toolbox for Databases, MCP Toolbox for Databases

同じカテゴリのほかの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Dbx

Query databases from AI agents using connections configured in DBX.

作者:t8y2広く使われている↓ 9446/週★ 3万6 か月前更新

パソコンで動く

MCP Toolbox for Databases

MCP Toolbox for Databases enables your agent to connect to your database.

作者:googleapis広く使われている★ 1.7万8 か月前更新

パソコンで動く

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

LogCarverGuard

English | [繁體中文](README.zh-TW.md)

An MCP proxy that lets an AI coding agent (Claude Code, Cursor, …) read and write a production SQL Server without handing it the real credentials or a free hand. Every statement runs under the caller's own SQL login and grants, dangerous statements are blocked before they reach the database, and everything is written to an audit log.

Status: early (v0.1).

What it does

AI agent --(MCP, API key)--> LogCarverGuard proxy --(EXECUTE AS the caller's own login)--> SQL Server
  • One tool, `execute_sql`. Reads and writes go through it. A SELECT returns its rows (first 100 shown, with a count of the rest). A write is executed and audited.
  • A real T-SQL parser decides what is allowed, not keyword matching, so a fake keyword inside a comment or string does nothing.
  • The AI never sees the database password. The proxy holds one service login. Each person gets an API key that maps to their own SQL login, and the proxy impersonates it, so their existing GRANT/DENY still decide what they can do.
  • The service login does not need sysadmin. It needs IMPERSONATE on each user's login, and a database user in the target database so it can connect. The host tests run SELECT, UPDATE and a permission-denied DELETE through a service account that is not sysadmin.
  • Data changes run in a transaction the proxy controls. A batch containing INSERT / UPDATE / DELETE is rolled back as a whole if any statement fails. DDL (ALTER TABLE…), TRUNCATE and EXEC run as they are and are not rolled back as part of a batch. BEGIN TRAN / COMMIT / ROLLBACK from the caller is blocked.
  • Audit log in a local SQLite file: who, when, which SQL, and whether it was blocked or executed. Executed statements are recorded after they commit. A statement that SQL Server rejects (for example permission denied) or a request with a bad key is not recorded.
Always blocked

DROP TABLE, DROP DATABASE, RESTORE DATABASE / RESTORE LOG, ALTER DATABASE … SET, sp_executesql, xp_cmdshell, dynamic EXEC of a variable or string, identity switching (REVERT, EXECUTE AS, SETUSER), permission changes (GRANT, DENY, REVOKE), and caller-managed transactions (BEGIN TRAN, COMMIT, ROLLBACK, SAVE TRANSACTION).

Blocked unless the admin allow-lists it

TRUNCATE TABLE, ALTER TABLE … DROP COLUMN, and EXEC of a named stored procedure (including INSERT … EXEC). Allow-list entries are written as schema.name; a statement that names a database or a server (OtherDb.dbo.T, [srv].db.dbo.P) is never matched against them.

This list is deliberately narrow. It is not "everything an AI could break": DROP INDEX, sp_rename, BACKUP DATABASE, or a Linked Server OPENQUERY are not specially handled and run if the real login may run them. The real security boundary is the SQL login's own grants, so issue each API key against an account with the least privilege you can accept, never sysadmin or db_owner.

Local mode

Runs on your own machine, started by your AI tool over stdio. No server, no Docker, no API keys. Settings come only from environment variables (not from appsettings.json or the command line). Tested on Windows with integrated authentication.

dotnet tool install -g LogCarverGuard.Local

claude mcp add logcarverguard --env LOGCARVERGUARD_CONNECTION_STRING="Server=localhost;Database=MyDb;Integrated Security=true;TrustServerCertificate=true" -- logcarverguard

Or run it without installing, through dnx (end the command with -- dotnet dnx LogCarverGuard.Local --yes).

VariablePurposeDefault
LOGCARVERGUARD_CONNECTION_STRING (or _FILE)The login the statements run asrequired
LOGCARVERGUARD_READ_ONLYtrue allows queries onlyfalse
LOGCARVERGUARD_AUDIT_DB_PATHAudit log SQLite fileLogCarverGuard/audit.db under your local application data folder
LOGCARVERGUARD_TRUNCATE_ALLOWLIST, LOGCARVERGUARD_EXEC_WHITELIST, LOGCARVERGUARD_ALTER_DROP_COLUMN_ALLOWLISTSame allow-lists as the central serviceempty (all blocked)

Read-only mode lets SELECT (without INTO) through, plus SET, DECLARE and PRINT. Everything else is blocked with a reason, including EXEC even when it is allow-listed, NEXT VALUE FOR, and the remote or file sources OPENQUERY, OPENROWSET and OPENDATASOURCE (they can run a write on another server). What read-only mode does not cover: a SELECT that calls a CLR or extended-procedure function with side effects, long-running or expensive queries, and locks. Also give the login only the permissions it needs; the guard is a second layer, not the first.

What local mode is, and is not. It is a guardrail against an agent doing something destructive by accident. It is not a security boundary:

  • The connection string, and so the credentials, live on your machine and in your AI tool's configuration. An agent that can run shell commands or read that configuration can connect to SQL Server directly and skip this proxy.
  • Every statement runs as the one login in the connection string. There is no per-person identity; the audit log records the operating-system user name and is a local file.
  • For a real boundary use the central service below: SQL Server only accepts connections from the proxy, and each person has their own login.

Install the central service

Needs a Linux host with Docker (or the .NET 10 SDK for the native install below), and a SQL Server with TCP/IP enabled and mixed-mode authentication.

  1. Create the service login and let it impersonate each user's own login:
   CREATE LOGIN logcarverguard_svc WITH PASSWORD = '…';

GRANT IMPERSONATE ON LOGIN::[alice_sql_login] TO logcarverguard_svc;

In the target database, create a database user for the service login and one for each person's login, then give each person the permissions they normally have; the proxy never widens them:

   CREATE USER logcarverguard_svc FOR LOGIN logcarverguard_svc;

CREATE USER alice_sql_login FOR LOGIN alice_sql_login; GRANT SELECT, UPDATE ON dbo.Orders TO alice_sql_login;

  1. Clone and configure
   git clone https://github.com/caiderek/LogCarverGuard

cd LogCarverGuard

Edit docker-compose.yml and set LOGCARVERGUARD_SQLSERVER_CONNECTION_STRING. For production prefer a mounted secret file and LOGCARVERGUARD_SQLSERVER_CONNECTION_STRING_FILE.

  1. Start
   docker compose up -d --build

docker compose logs -f

  1. Issue an API key (--login is the user's own SQL login, not the service login). The key is printed once:
   docker compose exec logcarverguard dotnet cli/LogCarverGuard.Cli.dll \

issue-key --owner alice --login alice_sql_login

  1. Point your MCP client at http:// :8080/ and send the key in the header X-LogCarverGuard-Key.

Other key commands: list-keys (never prints the key itself) and revoke-key --id .

Linux notes
  • Docker is the main install path for the central service on Linux. The image is built from the official .NET 10 images (mcr.microsoft.com/dotnet/sdk:10.0 to build, aspnet:10.0 to run). It does not depend on a particular distribution. I have not tested this Docker setup on a specific distribution. Native (non-Docker) steps for Rocky Linux are below.
  • You need Docker with the Compose plugin on the host, and the container must be able to reach SQL Server over TCP (the sample connection string uses port 1433). Rocky Linux does not ship Docker (its default is Podman); Docker and the Compose plugin come from Docker's own docker-ce repository.
  • The container runs as a non-root user and listens on port 8080. The audit log and the API key store are SQLite files in the /data volume, so keep that volume and back it up.
  • docker-compose.yml publishes the port on 127.0.0.1 only. To reach it from other machines, put a TLS-terminating reverse proxy in front, as described in Hardening for production. Opening port 8080 directly to the network sends the API key over plain HTTP.
  • If the host runs a firewall or SELinux, I have not tested how this Docker setup behaves under them (the native Rocky test below did include both).
  • Local mode was tested on Windows with integrated authentication only. I have not tested it on Linux. Integrated authentication is a Windows feature, so on Linux you would need a connection string with SQL authentication.
Native install on Rocky Linux (without Docker)

The steps below follow the guide I wrote for the Pro build, which I ran on a real Rocky Linux 9 VM and a real Rocky Linux 10 VM. That was an earlier Pro build: it adds undo on top of the same request handling, and it connected to SQL Server as sa, so the non-sysadmin service login described above was not part of those runs. I have not re-run these steps from this Free repo; if one fails, please open an issue.

# 1. .NET 10 SDK (Rocky 9 shown; on Rocky 10 use rhel/10 in the URL)

sudo dnf install -y https://packages.microsoft.com/config/rhel/9/packages-microsoft-prod.rpm sudo dnf install -y dotnet-sdk-10.0 git

2. Service account, build

sudo useradd --system --no-create-home --shell /usr/sbin/nologin logcarverguard sudo git clone https://github.com/caiderek/LogCarverGuard /opt/logcarverguard/src cd /opt/logcarverguard/src sudo dotnet publish src/LogCarverGuard.Server/LogCarverGuard.Server.csproj -c Release -o /opt/logcarverguard/server sudo dotnet publish src/LogCarverGuard.Cli/LogCarverGuard.Cli.csproj -c Release -o /opt/logcarverguard/cli

3. Data directory and the service login's connection string

sudo mkdir -p /var/lib/logcarverguard /etc/logcarverguard sudo chown logcarverguard:logcarverguard /var/lib/logcarverguard sudo tee /etc/logcarverguard/sql-connstring.txt > /dev/null <<'EOF' Server=your-sql-server-host,1433;Initial Catalog=your-database;User Id=logcarverguard_svc;Password=CHANGE_ME;TrustServerCertificate=true; EOF sudo chown logcarverguard:logcarverguard /etc/logcarverguard/sql-connstring.txt sudo chmod 600 /etc/logcarverguard/sql-connstring.txt

Drop TrustServerCertificate=true once SQL Server has a certificate this host trusts (see Hardening for production).

Create /etc/systemd/system/logcarverguard.service:

[Unit]

Description=LogCarverGuard MCP proxy After=network.target

[Service] Type=simple User=logcarverguard Group=logcarverguard WorkingDirectory=/opt/logcarverguard/server ExecStart=/usr/bin/dotnet /opt/logcarverguard/server/LogCarverGuard.Server.dll Restart=on-failure RestartSec=5 Environment=ASPNETCORE_URLS=http://127.0.0.1:8080 Environment=LOGCARVERGUARD_SQLSERVER_CONNECTION_STRING_FILE=/etc/logcarverguard/sql-connstring.txt Environment=LOGCARVERGUARD_AUDIT_DB_PATH=/var/lib/logcarverguard/logcarverguard-audit.db Environment=LOGCARVERGUARD_APIKEYS_DB_PATH=/var/lib/logcarverguard/logcarverguard-apikeys.db

[Install] WantedBy=multi-user.target

sudo systemctl daemon-reload

sudo systemctl enable --now logcarverguard sudo systemctl status logcarverguard --no-pager sudo journalctl -u logcarverguard -n 20 --no-pager # expect "Now listening on: http://127.0.0.1:8080"

Issue a key. Run the CLI as the service user so the key file stays writable by the service.

sudo -u logcarverguard dotnet /opt/logcarverguard/cli/LogCarverGuard.Cli.dll \ issue-key --owner alice --login alice_sql_login \ --apikeys-db /var/lib/logcarverguard/logcarverguard-apikeys.db

  • ASPNETCORE_URLS above listens on 127.0.0.1 only. For access from other machines, put a TLS-terminating reverse proxy in front (see Hardening for production). In my Rocky tests the service listened on all interfaces (http://+:8080) and I opened the port with firewall-cmd --permanent --add-port=8080/tcp and --reload; that sends the API key over

冒頭だけを表示しています。続きはリポジトリで読めます