Project Scope MCP Server
Provides Git version control integration for agentic workflows, including repository status inspection, commit history, branch comparison, and repository initialization.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Project Scope MCP Server rename getUser to fetchUser and preview the changes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Project Scope MCP Server
A robust, production-ready Model Context Protocol (MCP) server empowering AI agents with deep semantic understanding and safe manipulation of software repositories.
Overview
Project Scope moves beyond simple file reading to provide semantic analysis, AST-based refactoring, Git integration, and defense-in-depth security validation. It allows Large Language Models (LLMs) to interact with codebases reliably and safely, bridging the gap between chat interfaces and complex development workflows.
Related MCP server: ARGUS
Key Features
Semantic Repository Analysis: Parse and understand code structure, dependencies, and relationships using Tree-sitter.
Context-Aware Security: Advanced scanner with zero false positives on source code, detecting SQLi, XSS, and RCE attempts in runtime inputs.
Safe Refactoring: AST-based renaming and extraction tools with "preview first" capabilities to prevent syntax errors.
Git Integration: Comprehensive version control management including history, diffing, and branch operations.
Defense-in-Depth: Multi-layered protection including Prompt Injection detection (Regex + LLM Guard), input validation, and file access controls.
Table of Contents
Quick Start
Run instantly with npx:
npx -y @adityasasidhar/project-scope-mcpInstallation (Source)
To build from source:
# Clone the repository
git clone https://github.com/adityasasidhar/Project-Scope-MCP.git
cd Project-Scope-MCP
# Install dependencies
npm install
# Build the project
npm run buildConfiguration
Security is a primary focus of Project Scope. The server is highly customizable to match your risk profile.
Security Modes
strict(default): Blocks operations immediately if a potential threat is detected.advisory: Logs and warnings are generated, but operations are allowed to proceed (useful for initial audits).
Sensitivity Levels
high: Aggressive detection, useful for untrusted user inputs.medium(default): Balanced profile for standard development.low: Only flags high-confidence known attack signatures.
LLM Guard (Optional)
For state-of-the-art protection against prompt injection attacks, enable Meta Llama Prompt Guard 2:
Set
useGuardModel: truein your requests.Requires a valid HuggingFace API token.
Security Architecture
The server features a Context-Aware Security Scanner designed to eliminate false positives while maintaining rigorous threat detection.
Intelligent Context Detection
The scanner uses file categorization to determine the appropriate validation strategy:
File Type | Extension | Scanning Strategy | Reason |
Source Code |
| Skipped | Source code syntax (semi-colons, pipes) mimics attack patterns. |
Templates |
| Syntax-Aware | Validates usage but allows standard template tokens. |
Config |
| Minimal | Allows standard configuration strings. |
Runtime Input | (None) | Strict | Full regex and heuristic scanning for malicious payloads. |
Line-Level Filtering
Within analyzed files, the engine intelligently ignores:
Comments:
//,/*,#Imports:
import,requireDefinitions:
interface,type,class
This ensures that documenting a security vulnerability in a comment or test file does not trigger a false alarm, while executing or receiving a malicious payload is caught.
🔌 Connecting Clients
Claude Desktop
Open your configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the server definition:
{
"mcpServers": {
"project-scope": {
"command": "node",
"args": ["/absolute/path/to/ProjectScopeMCP/dist/index.js"]
}
}
}Claude Code (CLI)
The official Claude Code CLI supports MCP natively.
Add the server: Run the following command in your terminal:
claude mcp add project-scope -- npx -y @adityasasidhar/project-scope-mcpVerify: Run
claudeand type/mcpto see the connected servers.
Codex CLI
Codex CLI (if applicable) supports MCP via its TOML configuration.
Edit Configuration: Open
~/.codex/config.toml.Add Server:
[mcp.servers.project-scope] command = "npx" args = ["-y", "@adityasasidhar/project-scope-mcp"]
Gemini CLI
Gemini CLI supports MCP via its JSON configuration.
Edit Configuration: Open
~/.gemini/settings.json(create if it doesn't exist).Add Server:
{ "mcpServers": { "project-scope": { "command": "npx", "args": ["-y", "@adityasasidhar/project-scope-mcp"] } } }
Generic Clients
For any other client that supports MCP (like Windsurf, Smithery, Goose, or custom implementations), use the standard stdio configuration:
npx -y @adityasasidhar/project-scope-mcpCursor
Open Cursor Settings (Cmd/Ctrl + Shift + J).
Navigate to Features > MCP Servers.
Click + Add New MCP Server.
Configure:
Name:
project-scopeType:
commandCommand:
node /absolute/path/to/ProjectScopeMCP/dist/index.js(Or usenpm run startif preferred)
GitHub Copilot (VS Code)
Open GitHub Copilot Chat in VS Code.
Click the Attach Context (paperclip) or Tools icons.
Select Connect to MCP Server...
Choose Command (or similar) and enter:
Command:
npxArgs:
-y @adityasasidhar/project-scope-mcp
Note: Requires GitHub Copilot Agent Mode enabled in VS Code settings.
Tool Reference
Repository Analysis
get_repo_structure
Generates a hierarchical map of the repository, respecting .gitignore.
input:
{ "path": "/path/to/repo", "format": "tree" }
analyze_impact
Predicts the "blast radius" of changing a symbol (function, variable) by finding all references via AST.
input:
{ "path": "...", "filePath": "src/utils.ts", "symbolName": "processData", "line": 42 }
Security Scanning
scan_repo_for_threats
Audits the entire repository for security risks (secrets, injection patterns). Skips ignored files for performance.
input:
{ "path": "/path/to/repo", "excludePatterns": ["dist"] }
scan_file_for_threats
Deep-scans a single file or string with the context-aware engine.
input:
{ "filePath": "/path/to/file.ts", "mode": "strict" }
validate_shell_input
Validates shell commands for injection risks before execution.
input:
{ "input": "rm -rf /", "mode": "strict" }
Refactoring
refactor_rename
Semantically renames a symbol across the project.
input:
{ "path": "...", "filePath": "...", "oldName": "foo", "newName": "bar", "apply": false }Note: Always use
"apply": falsefirst to preview changes.
refactor_extract_function
Extracts selected lines of code into a new function.
input:
{ "path": "...", "filePath": "...", "startLine": 10, "endLine": 20, "functionName": "newFunc" }
Git Operations
Includes standard Git tools for agentic workflows:
git_statusgit_commit_historygit_compare_branchesgit_init
Troubleshooting
"Repo Scan Too Slow"
Add large directories (e.g.,
vendor,node_modules) toexcludePatterns.Large files (>1MB) are automatically skipped.
"Refactoring Failed to Parse"
Ensure the code is syntactically valid before refactoring. Tree-sitter parsers typically require valid syntax to generate accurate ASTs.
License
This project is licensed under the ISC License.
Available Tools
20 toolsanalyze_impactA
Predict the blast radius of renaming a symbol. Uses AST analysis (not text search) to find all legitimate references across the codebase. Use before refactoring to understand dependencies and prevent breaking changes.
Inputs: path (required), filePath (required), symbolName (required), line.
detect_prompt_injectionA
Defend against AI jailbreaks and prompt injection. Detects role-switching ('You are now DAN'), instruction override ('Ignore previous'), tool manipulation, and hidden payloads. Hybrid detection: Fast regex + optional Llama Prompt Guard 2 (LLM). Use when reading untrusted content (files, web pages, user input).
Inputs: content (required), mode, sensitivity, useGuardModel, +1 more.
detect_template_injectionA
Prevent Server-Side Template Injection (SSTI). Identifies dangerous template syntax from Jinja2, Handlebars, ERB, and others. Flags RCE payloads like {{config.class}}. Scan user-provided templates or dynamic content before rendering.
Inputs: content (required), mode, sensitivity.
find_dead_codeB
Identify dead code (unused exports and functions). Helps reduce bundle size and improve maintainability. Run periodically to clean up legacy code.
Inputs: path (required).
get_repo_structureA
Map the complete file structure of a repository. Automatically respects .gitignore rules. Use 'tree' format for visual hierarchy, 'simple' for flat file lists, or 'json' for programmatic access. Best practice: Run this first when encountering a new codebase.
Inputs: path (required), format.
git_branch_statusB
Display all Git branches with their tracking status and current HEAD. Useful for understanding repository state before making commits or merges.
Inputs: path (required).
git_commit_historyA
View commit history with powerful filtering (by file, author, or date range). Returns structured data including commit hashes, timestamps, and messages. Use to understand code evolution or trace when bugs were introduced.
Inputs: path (required), since, until, author, +2 more.
git_compare_branchesA
Compare two Git branches showing unique commits in each branch, common ancestor, and files that differ. Optionally show full diff.
Inputs: path (required), branch1 (required), branch2 (required), showDiff.
git_initB
Initialize a new Git repository. Creates a .git directory and sets up the repository structure.
Inputs: path (required), bare, initialBranch.
git_show_changesB
Show current working directory changes including staged, unstaged, and untracked files. Optionally show detailed diff.
Inputs: path (required), filePath, showDiff, includeUntracked.
git_statusB
Get a quick overview of the repository status including current branch, staged/unstaged/untracked file counts, and remote tracking info.
Inputs: path (required).
refactor_extract_functionC
Extract a block of code into a new function. Detects parameters and generates function call.
Inputs: path (required), endLine (required), filePath (required), startLine (required), +2 more.
refactor_inline_variableB
Inline a variable by replacing all usages with its value and removing the declaration.
Inputs: line (required), path (required), filePath (required), variableName (required), +1 more.
refactor_move_to_fileA
Move a function or class to a different file. Updates imports automatically.
Inputs: path (required), sourceFile (required), symbolName (required), targetFile (required), +1 more.
refactor_renameB
Rename a symbol (variable, function, class) across the entire codebase. Returns preview of changes, optionally applies them.
Inputs: path (required), newName (required), filePath (required), symbolName (required), +1 more.
scan_file_for_threatsA
Deep-scan a single file for all 5 threat types (shell, SQL, path, template, prompt injection). Returns exact line numbers and risk levels. Use when generating new code or processing uploaded files to ensure safety before execution.
Inputs: filePath (required), mode, sensitivity.
scan_repo_for_threatsA
Audit an entire repository for security risks. Multi-threaded regex scanning (no API costs). Automatically skips node_modules, .git, and binary files. Can scan 10k+ files in seconds. Run this before making changes to untrusted repositories.
Inputs: path (required), mode, sensitivity, excludePatterns.
validate_file_pathA
Prevent path traversal (LFI). Detects ../ sequences, URL/double encoding, null bytes, and ensures paths stay within projectRoot. Use when processing user-provided file paths to prevent unauthorized file access.
Inputs: filePath (required), mode, projectRoot, sensitivity.
validate_shell_inputA
Prevent command injection (RCE). Validates shell input for dangerous metacharacters (&, |, ;, $(), backticks), environment variable tricks, and encoding bypasses. Run this before executing any shell command generated by an LLM or received from user input.
Inputs: input (required), mode, sensitivity, allowedCommands.
validate_sql_queryB
Prevent SQL injection. Detects UNION attacks, stacked queries (DROP TABLE), comment injection (--), boolean/time-based blind SQLi, and encoding tricks. Validate all dynamically constructed SQL before execution.
Inputs: query (required), mode, sensitivity, allowedKeywords.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Several clusters overlap: git_status vs git_branch_status vs git_show_changes all report repository state, and scan_file_for_threats duplicates the combined behavior of the five individual validate_*/detect_* tools, leaving an agent unsure which entry point to pick. analyze_impact and refactor_rename also both promise to predict rename breakage. Descriptions do help disambiguate most cases, but the boundaries are not crisp.
All names are snake_case and largely follow a verb_noun or domain-prefix pattern (git_*, refactor_*, validate_*, detect_*, scan_*). A few outliers (find_dead_code, get_repo_structure, analyze_impact) use different verbs and no domain prefix, but overall the naming is readable and predictable.
20 tools sits in the heavy band and the server spans four loosely related domains (codebase analysis, git, refactoring, security validation), which makes it feel like several servers bundled together. Each tool is individually justified, but the surface is larger than a single 'Project Scope' purpose implies.
Refactoring and security validation have solid coverage, and codebase analysis covers structure, dead code, and impact. The main gap is Git write operations: git_init exists but there is no add/commit/checkout/merge, so an agent can initialize a repo but cannot complete the basic workflow. A file read/search primitive is also absent, though agents can work around both gaps.
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Git-backed platform for skills, tools, and context for AI agents
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables LLMs to search and read files in local and GitHub repositories, analyze pull request diffs, and grep code content with built-in security protections.6-
- FlicenseBqualityCmaintenanceEnables AI agents to perform comprehensive, zero-infrastructure codebase analysis through 24 MCP tools, covering security, quality, architecture, type safety, git history, and dead code detection with high precision and local privacy.45-
- AlicenseAqualityDmaintenanceConnects AI assistants to GitHub repositories, pull requests, issues, commits, and code search while enabling repository visibility controls, CI/CD monitoring, sandboxed local filesystem access, and code quality/security analysis.131MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding assistants to inspect local and remote repositories through sandboxed tools that surface project overviews, structure, dependency audits, Git churn hotspots, and a heuristic health score. It also supports safe GitHub issue searching and creation with built-in duplicate preflight checks, while blocking sensitive files, binary content, and path traversal attacks.MIT