Back to Home
PatrickSys icon

codebase-context-mcp

by PatrickSys

Overview

An MCP server that provides AI agents with deep, context-aware understanding of a codebase's patterns, libraries, conventions, and architecture for generating more accurate and relevant code.

Installation

Run Command
npx codebase-context-mcp /path/to/your/project

Environment Variables

  • CODEBASE_ROOT

Security Notes

The `LanceDBStorageProvider.search` method constructs 'where' clauses for database queries using direct string interpolation of filter values (e.g., `filters.framework`, `filters.componentType`, `filters.layer`, `filters.language`). If an MCP client sends untrusted or malicious strings for these filters (e.g., `'angular' OR 1=1 --`), it could lead to a LanceDB query injection, allowing attackers to bypass intended filtering logic and potentially access unauthorized data or disrupt query execution. This is a critical vulnerability as the input schema for the `search_codebase` tool does not specify validation or sanitization for these string inputs. No other 'eval' or direct arbitrary code execution was identified.

Similar Servers

Stats

Interest Score0
Security Score4
Cost ClassHigh
Avg Tokens1800
Stars0
Forks0
Last Update2025-11-30

Tags

MCPAI Agent ToolCode AnalysisSemantic SearchAngular