Code Analysis MCP Server
코드 분석 MCP 서버
AI 모델이 자연어 대화를 통해 코드베이스를 이해하고 분석할 수 있도록 하는 MCP(모델 컨텍스트 프로토콜) 서버입니다.
✨ 하이라이트
자연스러운 코드 탐색 : 코드베이스에 대한 고급 질문하기
지엑스피1
심층 코드 이해 : 데이터 모델 및 시스템 아키텍처에 대한 통찰력 추출
"How does the user authentication flow work from frontend to database?"동적 분석 : 데이터 흐름을 추적하고 시스템 관계를 이해합니다.
"Show me all the places where we calculate transaction fees"
Related MCP server: Notion MCP Server
제한 사항
이 도구는 Aider 와 같은 보다 정교한 코드 분석 도구/부조종 도구보다 더 간단한 대안입니다. Aider와 같은 도구의 고급 코드 분석 기능과 견고성은 부족하지만, 이미 Claude Pro 구독을 보유하고 있다면 코드베이스 탐색을 위한 가벼운 솔루션을 제공합니다. 주요 장점은 다음과 같습니다.
비용 효율성 : 기존 Claude Pro 구독을 사용하면 대규모 코드베이스를 분석할 때 비용이 많이 들 수 있는 도구와 달리 추가 API 비용이 발생하지 않습니다.
간단한 설정 : 최소한의 구성으로 빠르게 시작 가능
기본 분석 : 고급 코드 이해 및 탐색에 유용함
코드 분석에 대한 접근 방식이 더 간단하기 때문에 더 전문적인 도구에 비해 오류가 더 많거나 제공되는 통찰력이 부족할 수 있습니다.
🚀 빠른 시작
서버를 설치하세요:
git clone https://github.com/saiprashanths/code-analysis-mcp.git
cd code-analysis-mcpClaude Desktop App을 설치하세요. Claude Desktop App을 사용하여 MCP 서버를 설정하는 방법에 대한 자세한 내용은 문서를 참조하세요.
Claude Desktop의 구성 파일에서 서버를 구성합니다.
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"code-analysis": {
"command": "uv",
"args": [
"--directory",
"/PATH/TO/YOUR/REPO",
"run",
"code_analysis.py"
]
}
}
}Claude Desktop을 다시 시작하고 코드 분석을 시작하세요!
도구가 올바르게 설정되었는지 확인하세요
도구 아이콘을 클릭하면
code-analysis도구가 표시됩니다.통합 버튼을 클릭하면
analyze_code_repository프롬프트가 표시됩니다.
💡 사용 예시
복잡한 코드베이스를 이해하기 위해 도구를 사용하는 방법은 다음과 같습니다.
아래에 표시된 analyze_code_repository 프롬프트를 클릭하여 시작하세요. 그러면 저장소를 초기화하고 시작하는 과정이 안내됩니다.
You: How does the transaction processing work in this system?
Claude: Let me analyze the data flow for transactions.
Looking at the codebase, I can see that transaction processing happens through several key components:
1. Raw transaction data is captured in the `TransactionEvent` model with fields for:
- Payment status
- Amount
- Fee calculations
- Processing timestamps
2. This data is then processed through the PaymentSummary model, which:
- Validates payment provider responses
- Calculates processing fees
- Records transaction status
Would you like me to explain any part of this in more detail?
You: What are the key database tables involved?
Claude: The main tables in the transaction processing pipeline are:
1. transaction_events: Stores raw payment events
2. payment_summary: Processed transaction records
3. payment_providers: Provider configuration
4. merchant_accounts: Account-specific settings
Let me know if you'd like to see the schema for any of these tables!🔧 사용 가능한 도구
저장소 초기화
분석을 위해 코드 저장소를 초기화합니다.
initialize_repository("/path/to/repo")
# Output: Successfully initialized code repository at: /path/to/repoget_repo_info
초기화된 저장소에 대한 정보를 검색합니다.
get_repo_info()
# Output:
# Code Repository Information:
# Path: /path/to/repo
# Exists: True
# Is Directory: True
# Found .gitignore fileget_repo_structure
저장소 파일 구조를 살펴보세요.
get_repo_structure(depth=2)
# Output:
# 📁 src/
# 📁 api/
# 📄 routes.py
# 📄 models.py
# 📁 utils/
# 📄 helpers.py
# 📄 main.py읽기_파일
특정 파일을 읽고 분석합니다.
read_file("src/api/models.py")
# Output:
# File: src/api/models.py
# Language: python
# Size: 2.3 KB
#
# [File contents...]⚙️ 기술 세부 사항
기본 스캐닝 깊이: 3단계
최대 파일 크기: 1MB
파일당 최대 줄 수: 1000
.gitignore에 나열된 경로를 무시합니다.
로컬 파일 시스템 액세스만 가능
디렉토리 탐색을 방지하기 위해 파일 경로를 검증합니다.
📝 라이센스
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.
Available Tools
4 toolsget_repo_infoB
Get information about the currently initialized code repository.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool gets information, implying a read-only operation, but doesn't specify what type of information (e.g., metadata, status, details) or any behavioral traits like error handling, permissions needed, or response format. This leaves significant gaps for a tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and wastes no space, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (simple read operation) but lack of annotations and output schema, the description is incomplete. It doesn't explain what information is returned, potential errors, or how it differs from siblings, leaving the agent with insufficient context to use it effectively beyond basic purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and the schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't mention parameters, aligning with the schema. A baseline of 4 is applied as it handles the zero-parameter case correctly without redundancy.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get information') and resource ('currently initialized code repository'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_repo_structure' or 'initialize_repository', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides minimal guidance by implying usage when a repository is 'currently initialized,' but it doesn't specify when to use this tool versus alternatives like 'get_repo_structure' or 'initialize_repository.' No explicit when-not-to-use or prerequisite information is included.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_repo_structureB
Get the structure of files and directories in the repository.
Args:
sub_path: Optional subdirectory path relative to repository root
depth: Optional maximum depth to traverse (default is 3)
| Name | Required | Description | Default |
|---|---|---|---|
| sub_path | No | ||
| depth | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states what the tool does but lacks behavioral details such as whether this is a read-only operation, potential rate limits, error conditions, or the format of the returned structure. The description doesn't contradict annotations, but it's insufficient for a mutation-free tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded with the purpose in the first sentence, followed by parameter details. It's efficient with no wasted sentences, though the parameter explanations could be slightly more integrated into the flow.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 optional parameters) and lack of annotations or output schema, the description is partially complete. It covers the purpose and parameters well but misses behavioral context and usage guidelines, leaving gaps for an AI agent to understand full tool behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'sub_path' is an 'Optional subdirectory path relative to repository root' and 'depth' is an 'Optional maximum depth to traverse (default is 3)', providing clear semantics and default values not present in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get the structure of files and directories in the repository.' This is a specific verb ('Get') and resource ('structure of files and directories'), though it doesn't explicitly distinguish from sibling tools like 'get_repo_info' or 'read_file'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_repo_info' (which might provide metadata) or 'read_file' (which reads file contents), nor does it specify prerequisites or exclusions for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
initialize_repositoryC
Initialize the repository path for future code analysis operations.
Args:
path: Path to the repository root directory that contains the code to analyze
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool initializes a path for future operations, but doesn't explain what 'initialize' entails (e.g., does it cache data, set up configurations, or validate the path?). It also omits details like error handling, permissions needed, or side effects, leaving significant gaps for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by a brief parameter explanation. There's no wasted text, and the structure is clear. However, it could be slightly more efficient by integrating the parameter info more seamlessly, preventing a perfect score.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (a setup tool with no annotations, no output schema, and low schema coverage), the description is incomplete. It doesn't explain what happens after initialization (e.g., success/failure states, return values, or how it interacts with sibling tools like 'read_file'). For a tool that likely enables other operations, more context on its role and outcomes is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds some meaning beyond the input schema: it explains that 'path' is 'Path to the repository root directory that contains the code to analyze,' clarifying the parameter's purpose. However, with 0% schema description coverage and only one parameter, the baseline is 4 for zero parameters, but here it's reduced to 3 because the description doesn't fully compensate for the lack of schema details (e.g., format expectations like absolute vs. relative paths).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Initialize the repository path for future code analysis operations.' It specifies the verb ('initialize') and resource ('repository path'), making the action explicit. However, it doesn't distinguish this from sibling tools like 'get_repo_info' or 'get_repo_structure', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides minimal guidance: it implies this tool should be used before other code analysis operations. However, it doesn't specify when to use it versus alternatives (e.g., if 'get_repo_info' might also initialize a path), nor does it mention prerequisites or exclusions. This lack of explicit context limits its utility for an AI agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_fileB
Read and display the contents of a file from the repository.
Args:
file_path: Path to the file relative to repository root
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool reads and displays file contents, implying a read-only operation, but lacks details on permissions, error handling (e.g., for missing files), output format (e.g., text vs. raw bytes), or limitations (e.g., file size constraints). This leaves significant gaps in understanding how the tool behaves beyond its basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized with two sentences: a clear purpose statement and parameter explanation. It's front-loaded with the core function, and the parameter note adds necessary detail without redundancy. However, the formatting with 'Args:' could be slightly more integrated for optimal flow.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally complete but has gaps. It covers the basic purpose and parameter semantics but lacks usage guidelines, behavioral details, and output information, making it adequate for simple tasks but insufficient for robust agent operation in varied scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaningful context for the single parameter 'file_path' by specifying it's 'relative to repository root', which clarifies usage beyond the schema's basic type definition. With 0% schema description coverage and only one parameter, this compensates adequately, though it doesn't detail format constraints (e.g., path syntax).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Read and display the contents') and resource ('a file from the repository'), distinguishing it from sibling tools like get_repo_info (repository metadata) and get_repo_structure (directory listing). It precisely communicates what the tool does without being vague or tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. While it implies usage for reading file contents, it doesn't specify prerequisites (e.g., repository must be initialized), exclusions (e.g., binary files), or comparisons to sibling tools like get_repo_structure for browsing directories. This leaves the agent without contextual decision-making help.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
- First observed
get_repo_info - First observed
get_repo_structure - First observed
initialize_repository - First observed
read_file
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: initialize_repository sets up the context, get_repo_info provides metadata, get_repo_structure shows the file hierarchy, and read_file accesses file contents. There is no overlap in functionality, making tool selection straightforward for an agent.
All tools follow a consistent verb_noun pattern (e.g., initialize_repository, get_repo_info, get_repo_structure, read_file). The naming is uniform and predictable, using snake_case throughout with clear action descriptors.
With 4 tools, the count is reasonable for a code analysis server, covering core operations like initialization, metadata retrieval, structure viewing, and file reading. However, it feels slightly thin, as advanced analysis features (e.g., linting, dependency checks) are absent, though not essential for basic functionality.
The toolset covers basic repository operations (initialize, info, structure, read), but there are notable gaps for a code analysis domain, such as missing tools for analyzing code quality (e.g., lint, test), searching within files, or modifying content. Agents can perform foundational tasks but may hit dead ends for deeper analysis.
Maintenance
Related MCP Connectors
The Ramp MCP server enables users to securely connect Ramp with AI assistants like ChatGPT and Claude to query financial data and take actions using natural language. It transforms Ramp's developer API into a SQL interface that LLMs can query, allowing admins to analyze spend trends, identify cost savings, and run complex SQL analyses on comprehensive datasets (transactions, purchase orders, vendors, users), while all users can manage cards, view transactions, request reimbursements, and get expense policy answers.
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Related MCP Servers
- FlicenseBqualityDmaintenanceA server that enables Claude Desktop users to access the Claude API directly, allowing them to bypass Professional Plan limitations and use advanced features like custom system prompts and conversation management.133-
- AlicenseNot gradedqualityDmaintenanceA simple server that integrates with Claude to allow querying and manipulating Notion pages and databases through natural language prompts.3,286 npmMIT
- FlicenseNot gradedqualityDmaintenanceA server that enables interaction with PostgreSQL, MySQL, MariaDB, or SQLite databases through Claude Desktop using natural language queries.1-

Inkeep MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceA server that connects Claude to your documentation via Inkeep's API, enabling AI-powered interactions with your documentation content.25MIT