Code Sentinel
概要
作者による説明(英語の原文)
Code quality analysis MCP server - detects security issues, deceptive patterns, and placeholders
できること
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
- 接続方法: パソコンで動く
- トランスポート: stdio
- カテゴリ: 開発者ツール
インストール
使っているAIアプリを選んで、設定をコピーしてください。
チェック 1/2 合格 · あなたのパソコンで動きます
まず:どの AI を使っていますか?
使っているアプリを選ぶと、下に手順が表示されます。
Claude につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
パソコン版 Claude アプリの設定ファイルを開く
SettingsDeveloperEdit Config
この設定を貼り付けて保存
{ "mcpServers": { "code-sentinel": { "command": "npx", "args": [ "-y", "code-sentinel-mcp" ] } } }Claude を終了してもう一度開く
試してみる
Code Sentinel を使って、私に何ができるか教えて、1 つやってみせて✓ Claude が Code Sentinel を使っていると言うか、回答に Code Sentinel のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
ChatGPT はまだ Code Sentinel につなげません
Code Sentinel はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません
代わりにできること
A · Code Sentinel につなげるアプリを使う
- 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
- 先にパソコンへ Node.js を入れてください(1 回だけ)
- 先にパソコンへ Node.js を入れてください(1 回だけ)
- 先にパソコンへ Node.js を入れてください(1 回だけ)
B · 開発者ツール の中で ChatGPT につなげる別のサーバー
同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました
- Sentry✓ ChatGPT
- Front-End Checklist✓ ChatGPT
- Compiler Explorer✓ ChatGPT
Claude Code につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
ターミナルを開く
Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く
このコマンドを貼り付けて Enter
claude mcp add code-sentinel -- npx -y code-sentinel-mcpClaude Code で /mcp と入力
Code Sentinel が一覧にあり、接続済みと表示されれば OK です
試してみる
Code Sentinel を使って、私に何ができるか教えて、1 つやってみせて✓ Claude Code が Code Sentinel を使っていると言うか、回答に Code Sentinel のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Cursor につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
Cursor の AI チャットを Agent モードで開く
試してみる
Code Sentinel を使って、私に何ができるか教えて、1 つやってみせて✓ Cursor が Code Sentinel を使っていると言うか、回答に Code Sentinel のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
VS Code につなげますが、先に準備が必要です
先にパソコンへ Node.js を入れてください(1 回だけ)
VS Code の AI チャットを Agent モードで開く
試してみる
Code Sentinel を使って、私に何ができるか教えて、1 つやってみせて✓ VS Code が Code Sentinel を使っていると言うか、回答に Code Sentinel のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
開発者向け:ターミナルのコマンドと JSON 設定
パソコンにインストール
Claude Code
claude mcp add code-sentinel -- npx -y code-sentinel-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"code-sentinel": {
"command": "npx",
"args": [
"-y",
"code-sentinel-mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"code-sentinel": {
"command": "npx",
"args": [
"-y",
"code-sentinel-mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"code-sentinel": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"code-sentinel-mcp"
]
}
}
}この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
ひと目でわかる
使えるアプリ
このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。
パソコン上で動かせるアプリ
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
できること
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月11日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント salrad22 で確認済みです
- ! 注意
今もメンテナンスされている
コードの最終更新:10 か月前(6か月以上前)
- … 未チェック
ライセンスがある
このリポジトリはまだGitHubから読み取っていません
- – 対象外
エンドポイントが応答する
これはパソコンで動くため、インターネット上のエンドポイントはありません
- – 対象外
OAuthでサインイン
パソコンで動き、代わりにローカルの設定を使います
- … 未チェック
ツールの説明に隠れた指示がない
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
話し合い
質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。
ユーザーレビュー
まだレビューはありません
開発者ツールのほかのサーバーとの比較i
- このカテゴリのほかの5756件のうち81%よりスターが多い
- このカテゴリのほかの5756件のうち2%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの5756件のうち11%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
Code Sentinelは安全ですか?
当てはまる基本チェック2項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
パソコンで動きますか、それともクラウドですか?
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は10 か月前、最新バージョン(0.2.6)がレジストリに届いたのは10 か月前です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。
代わりに使えるものは?
同じカテゴリには:REA, Netdata, Front-End Checklist
代わりの候補
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Netdata
Real-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Front-End Checklist
Review frontend code and live pages against 386 quality-gated web development rules.
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
CodeSentinel MCP Server
A comprehensive code quality analysis server for the Model Context Protocol (MCP). CodeSentinel integrates with Claude Code and other MCP-compatible clients to detect security vulnerabilities, deceptive patterns, incomplete code, and highlight good practices.
Why CodeSentinel?
AI coding assistants can inadvertently introduce subtle issues: hardcoded secrets, empty catch blocks, TODO placeholders left behind, or patterns that hide errors. CodeSentinel acts as a quality gate, analyzing code for 93 distinct patterns across 5 categories before issues reach production.
Key differentiators:
- Verification-aware detection: Many patterns include verification steps to reduce false positives
- LLM-optimized output: Structured JSON output designed for AI consumption and action
- Balanced analysis: Detects both issues AND strengths for fair code assessment
- Multi-language support: Works with TypeScript, JavaScript, Python, Go, Rust, Java, and more
Why Not Tree-sitter or AST-Based Tools?
CodeSentinel intentionally uses a pattern-based approach rather than AST parsing. Here's why:
The Problem We Solve Is Different
Traditional linters (ESLint, tree-sitter) detect syntax errors and style violations. CodeSentinel detects semantically deceptive patterns - code that is:
- Syntactically valid (passes all linters)
- Structurally correct (valid AST)
- But hides serious issues that AI agents commonly produce
Examples AST Tools Miss
// AST sees: valid try-catch block
// CodeSentinel sees: error swallowing that masks failures try { riskyOperation(); } catch(e) { }
// AST sees: valid function returning boolean // CodeSentinel sees: fake implementation that always succeeds function validateUser() { return true; } // TODO: implement
// AST sees: valid fallback expression // CodeSentinel sees: failure masking - "no data" vs "fetch failed" indistinguishable const users = response.data || [];
// AST sees: valid return statement // CodeSentinel sees: silent failure hiding if (error) { return null; } // error case
What Each Approach Detects
| Issue Type | AST/Tree-sitter | CodeSentinel |
|---|---|---|
| Syntax errors | Yes | No (not our goal) |
| Missing semicolons | Yes | No |
| Unused variables | Yes | No |
| Empty catch blocks | Partially | Yes |
| Silent error returns | No | Yes |
| Fake success responses | No | Yes |
| TODO/placeholder code | No | Yes |
| Error-masking fallbacks | No | Yes |
| Hardcoded secrets | Limited | Yes |
| Deceptive comments | No | Yes |
The Real Issue: Agent Behavior
AI coding agents produce code that looks correct but contains subtle deceptions:
- "Making the error go away" - Empty catches, silent returns, swallowed exceptions
- Placeholder implementations -
return true,return [], TODO comments - False confidence patterns -
|| []fallbacks that mask fetch failures - Suppression abuse -
@ts-ignore,eslint-disableto hide type errors
These patterns pass every linter and compile successfully. AST tools see valid structure. Only pattern-based detection catches the semantic intent behind the code.
When to Use What
| Tool | Use For |
|---|---|
| ESLint/TSLint | Style consistency, syntax rules, unused code |
| Tree-sitter | Syntax highlighting, code navigation, refactoring |
| TypeScript | Type safety, compile-time errors |
| CodeSentinel | Agent-generated deceptions, error hiding, incomplete implementations |
CodeSentinel complements these tools - it catches what they structurally cannot.
Features
- Security Analysis (16 patterns): Hardcoded secrets, SQL injection, XSS, command injection, insecure crypto, disabled SSL, and more
- Deceptive Pattern Detection (17 patterns): Empty catch blocks, silent failures, error-hiding fallbacks, linter suppression
- Placeholder Detection (19 patterns): TODO/FIXME/HACK comments, lorem ipsum, test data, incomplete implementations
- Error & Code Smell Detection (18 patterns): Type coercion issues, null references, async anti-patterns, floating point comparison
- Strength Recognition (23 patterns): Highlights good practices like proper typing, error handling, testing patterns, documentation
- HTML Reports: Visual reports with quality scores and actionable suggestions
Installation
From npm
npm install -g code-sentinel-mcp
From source
git clone https://github.com/salrad22/code-sentinel.git
cd code-sentinel npm install npm run build
Usage with Claude Code
Quick setup
claude mcp add code-sentinel -- npx code-sentinel-mcp
Or if installed globally
claude mcp add code-sentinel -- code-sentinel
Manual configuration
Add to your Claude Code MCP configuration file (~/.claude/claude_desktop_config.json):
{
"mcpServers": { "code-sentinel": { "command": "npx", "args": ["code-sentinel-mcp"] } } }
Remote Server (Cloudflare Workers)
CodeSentinel is also available as a remote MCP server on Cloudflare Workers. No local installation required!
Quick connect (Claude Code)
claude mcp add-remote code-sentinel https://code-sentinel-mcp.sharara.dev/sse
Or use the Streamable HTTP endpoint (recommended for newer clients):
claude mcp add --transport http code-sentinel https://code-sentinel-mcp.sharara.dev/mcp
Endpoints
| Endpoint | Protocol | Description |
|---|---|---|
https://code-sentinel-mcp.sharara.dev/mcp | Streamable HTTP | Recommended |
https://code-sentinel-mcp.sharara.dev/sse | Server-Sent Events | Legacy support |
https://code-sentinel-mcp.sharara.dev/ | HTTP GET | Health check / server info |
Self-hosting on Cloudflare
Deploy your own instance:
cd cloudflare
npm install npm run dev # Local development at localhost:8787 npm run deploy # Deploy to your Cloudflare account
Requirements:
- Cloudflare account (free tier works)
- Wrangler CLI (
npm install -g wrangler) wrangler loginto authenticate
The server uses Durable Objects for persistent MCP connections. No database required.
Available Tools
analyze_code
Full analysis returning structured JSON with all issues and strengths. Best for programmatic processing.
Parameters:
code(string, required): The source code to analyzefilename(string, required): Filename for language detection (e.g., "app.ts")
Returns: JSON object with issues, strengths, and summary statistics.
generate_report
Full analysis with a visual HTML report. Best for human review.
Parameters:
code(string, required): The source code to analyzefilename(string, required): Filename for language detection
Returns: Markdown summary plus complete HTML report.
check_security
Security-focused analysis only. Use when you specifically want to audit for vulnerabilities.
Parameters:
code(string, required): The source code to checkfilename(string, required): Filename
Returns: List of security issues or confirmation of none found.
check_deceptive_patterns
Check for code patterns that hide errors or create false confidence.
Parameters:
code(string, required): The source code to checkfilename(string, required): Filename
Returns: List of deceptive patterns found.
check_placeholders
Find TODOs, dummy data, and incomplete implementations.
Parameters:
code(string, required): The source code to checkfilename(string, required): Filename
Returns: List of placeholder code found.
analyze_patterns
Analyze code for architectural, design, and implementation patterns. Detects pattern usage, inconsistencies, and provides actionable suggestions.
Parameters:
code(string, required): The source code to analyzefilename(string, required): Filename for language detectionlevel(string, optional): Pattern level to analyze:architectural: System structure patterns (layering, modules)design: Gang of Four patterns (Singleton, Factory, Observer)code: Implementation idioms (error handling, async patterns)all: All levels (default)query(string, optional): Natural language query to focus analysis (e.g., "how is error handling done?")
Returns: LLM-optimized JSON with detected patterns, inconsistencies, suggestions, and ready-to-execute action items.
analyze_design_patterns
Focused analysis of Gang of Four (GoF) design patterns. Best for understanding OOP structure.
Parameters:
code(string, required): The source code to analyzefilename(string, required): Filename for language detection
Returns: Detected design patterns with confidence levels, locations, and implementation details.
Example Usage
Ask Claude to analyze code:
Analyze this code for quality issues:
const API_KEY = "sk-abc123456789";
async function fetchData() { try { const response = await fetch(url); return response.json(); } catch (e) { // TODO: handle error } }
CodeSentinel will detect:
- Critical (CS-SEC003): OpenAI API key hardcoded in source
- High (CS-DEC001): Empty catch block silently swallowing errors
- Low (CS-PH001): TODO comment indicating incomplete implementation
Detection Categories
Security Issues (CS-SEC)
| ID | Pattern |
|---|---|
| SEC001 | Hardcoded secrets (API keys, tokens, passwords) |
| SEC002 | GitHub tokens |
| SEC003 | OpenAI API keys |
| SEC004 | AWS access keys |
| SEC005-010 | SQL injection patterns |
| SEC011-015 | XSS vulnerabilities |
| SEC016 | Command injection (eval, exec) |
Deceptive Patterns (CS-DEC)
| ID | Pattern | ||||
|---|---|---|---|---|---|
| DEC001-003 | Empty/comment-only catch blocks | ||||
| DEC010-012 | Silent promise rejections | ||||
| DEC020-025 | Error-hiding fallbacks ( | [], | {}, ?? default) | ||
| DEC030+ | Linter suppression, fake success responses |
Placeholders (CS-PH)
| ID | Pattern |
|---|---|
| PH001-005 | TODO/FIXME/HACK/XXX/NOTE comments |
| PH010-015 | Lorem ipsum, placeholder text |
| PH020-025 | Test/dummy data (test@example.com, password123) |
| PH030+ | console.log debugging, debugger statements |
Errors & Code Smells (CS-ERR)
| ID | Pattern |
|---|---|
| ERR001-005 | Loose equality (==), type coercion issues |
| ERR010-015 | Null reference risks |
| ERR020-025 | Async anti-patterns |
| ERR030+ | parseInt without radix, array mutation in loops |
Strengths (CS-STR)
| ID | Pattern |
|---|---|
| STR001-005 | TypeScript strict typing |
| STR010-015 | Proper error handling patterns |
| STR020-025 | Test coverage indicators |
| STR030+ | Documentation, input validation |
Scoring Algorithm
Quality score (0-100) calculated as:
Score = 100 - (critical × 25) - (high × 15) - (medium × 5) - (low × 1) + (strengths × 2)
| Severity | Point Deduction |
|---|---|
| Critical | -25 points |
| High | -15 points |
| Medium | -5 points |
| Low | -1 point |
| Strength | +2 points (bonus) |
Supported Languages
CodeSentinel detects language from file extensions:
| Extension | Language |
|---|---|
.ts, .tsx | TypeScript |
.js, .jsx | JavaScript |
.py | Python |
.go | Go |
.rs | Rust |
.java | Java |
.kt | Kotlin |
.swift | Swift |
.cs | C# |
.cpp, .c | C/C++ |
.php | PHP |
.vue | Vue |
.svelte | Svelte |
Extending CodeSentinel
CodeSentinel uses a data-driven pattern system that separates pattern definitions from regex generation. This makes adding new patterns easier and more maintainable.
Project Structure
src/
├── patterns/ │ ├── types.ts # Type definitions for pattern configs │ ├── buil