Code Context Provider MCP

by AB498

Integrations

  • Provides community support through Discord, with a server link for users to get help with the MCP integration.

  • Provides code symbol analysis for JavaScript files, extracting functions, variables, classes, imports, and exports to help AI assistants understand code structure.

  • Enables symbol extraction and analysis from Python files, providing AI assistants with contextual understanding of Python code structure.

코드 컨텍스트 공급자 MCP

AI 어시스턴트에 코드 컨텍스트와 분석을 제공하는 MCP 서버입니다. 네이티브 종속성이 없는 WebAssembly 트리시터 파서를 사용하여 디렉터리 구조와 코드 심볼을 추출합니다.


특징

  • 디렉토리 트리 구조 생성
  • JavaScript/TypeScript 및 Python 파일 분석
  • 코드 심볼(함수, 변수, 클래스, 가져오기, 내보내기) 추출
  • AI 어시스턴트와의 원활한 통합을 위한 MCP 프로토콜과 호환

빠른 사용(MCP 설정)

Smithery를 통해 설치

Smithery를 통해 Claude Desktop용 Code Context Provider를 자동으로 설치하려면:

지엑스피1

윈도우

{ "mcpServers": { "code-context-provider-mcp": { "command": "cmd.exe", "args": [ "/c", "npx", "-y", "code-context-provider-mcp@latest" ] } } }

맥OS/리눅스

{ "mcpServers": { "code-context-provider-mcp": { "command": "npx", "args": [ "-y", "code-context-provider-mcp@latest" ] } } }

또는 npm 사용하여 전역적으로 설치합니다.

npm install -g code-context-provider-mcp

그런 다음 다음을 실행하여 사용하세요.

code-context-provider-mcp # if you're not using @latest, you may want to clear the cache for latest version using `Remove-Item -Path "$env:LOCALAPPDATA\npm-cache\_npx" -Recurse -Force` for windows and `rm -rf ~/.npm/_npx` for linux/macos

사용 가능한 도구

get_code_context

디렉토리를 분석하고 코드 기호와 함께 구조를 반환합니다(선택 사항).

매개변수:

  • absolutePath (문자열, 필수): 분석할 디렉토리의 절대 경로
  • analyzeJs (부울, 선택 사항): JavaScript/TypeScript 및 Python 파일을 분석할지 여부(기본값: false)
  • includeSymbols (부울, 선택 사항): 응답에 코드 기호를 포함할지 여부(기본값: false)
  • symbolType (enum, 선택 사항): includeSymbols가 true인 경우 포함할 심볼 유형(옵션: 'functions', 'variables', 'classes', 'imports', 'exports', 'all', 기본값: 'all')
  • filePatterns (문자열 배열, 선택 사항): 분석할 파일 패턴(예: [' .js', ' .py', 'config.*'])
  • maxDepth (숫자, 선택 사항): 분석할 최대 디렉토리 깊이(기본값: 5단계)

참고: 익명 함수는 결과에서 자동으로 필터링됩니다.

도구 호출 시 출력 텍스트 예

Directory structure for: C:\Users\Admin\Desktop\mcp\context-provider-mcp Code Analysis Summary: - Files analyzed: 3 - Total functions: 29 - Total variables: 162 - Total classes: 0 Note: Symbol analysis is supported for JavaScript/TypeScript (.js, .jsx, .ts, .tsx) and Python (.py) files only. Code analysis limited to a maximum depth of 5 directory levels (default). ├── index.js (39 KB) │ └── [Analyzed: 22 functions, 150 variables, 0 classes] │ Functions: │ - initializeTreeSitter [39:0] │ - getLanguageFromExtension [107:0] │ - getPosition [138:24]

파일 패턴 예제

filePatterns 매개변수를 사용하여 분석할 파일을 지정할 수 있습니다. 이 기능은 여러 언어가 포함된 복잡한 프로젝트나 특정 관심 파일을 분석할 때 유용합니다.

예:

  • ["*.js", "*.py"] - 모든 JavaScript 및 Python 파일 분석
  • ["config.*"] - 확장자에 관계없이 모든 구성 파일을 분석합니다.
  • ["package.json", "*.config.js"] - package.json 및 모든 JavaScript 구성 파일을 분석합니다.
  • [".ts", ".tsx", ".py"] - TypeScript 및 Python 파일 분석(확장자 형식 사용)

파일 패턴 매칭은 다음을 지원합니다.

  • 와일드카드(*)를 사용한 간단한 글로브 패턴
  • 직접 파일 확장자(점 포함 또는 제외)
  • 정확한 파일 이름

대규모 프로젝트 처리

매우 큰 프로젝트의 경우 maxDepth 매개변수를 사용하여 도구가 디렉터리를 탐색하는 깊이를 제한할 수 있습니다.

  • maxDepth: 2 - 루트 디렉토리와 하위 디렉토리의 한 수준만 분석합니다.
  • maxDepth: 3 - 루트와 두 레벨의 하위 디렉토리를 분석합니다.
  • maxDepth: 0 - 루트 디렉토리에 있는 파일만 분석합니다.

이 기능은 다음과 같은 경우에 특히 유용합니다.

  • 대형 모노레포 작업
  • 많은 종속성이 있는 프로젝트 분석
  • 타사 라이브러리가 아닌 주요 소스 코드에만 초점을 맞춥니다.

지원 언어

코드 기호 분석은 다음에 대해 지원됩니다.

  • 자바스크립트(.js)
  • JSX(.jsx)
  • 타입스크립트(.ts)
  • TSX(.tsx)
  • 파이썬(.py)

filePatterns 매개변수를 사용하면 디렉토리 구조에 다른 파일 유형을 포함할 수 있지만, 심볼릭 분석은 제한될 수 있습니다.

개발

개발 환경 설정

# Clone the repository git clone https://github.com/your-username/code-context-provider-mcp.git cd code-context-provider-mcp # Install dependencies npm install # Set up WASM parsers npm run setup

설치 후

설치 후 패키지의 prepare 스크립트가 자동으로 실행되어 WASM 파서를 다운로드합니다. 어떤 이유로든 다운로드가 실패하면 사용자는 수동으로 설치 프로그램을 실행할 수 있습니다.

npx code-context-provider-mcp-setup

특허

MIT

더 많은 정보나 도움이 필요하시면

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

네이티브 종속성이 없는 WebAssembly Tree-sitter 파서를 사용하여 디렉토리 구조와 코드 심볼을 추출하여 AI 어시스턴트에 대한 코드 컨텍스트와 분석을 제공합니다.

  1. AI 어시스턴트에 코드 컨텍스트와 분석을 제공하는 MCP 서버입니다. 네이티브 종속성이 없는 WebAssembly 트리시터 파서를 사용하여 디렉터리 구조와 코드 심볼을 추출합니다.
    1. 특징
      1. 빠른 사용(MCP 설정)
        1. Smithery를 통해 설치
        2. 윈도우
        3. 맥OS/리눅스
      2. 사용 가능한 도구
        1. get_code_context
      3. 도구 호출 시 출력 텍스트 예
        1. 파일 패턴 예제
          1. 대규모 프로젝트 처리
            1. 지원 언어
              1. 개발
                1. 개발 환경 설정
                2. 설치 후
              2. 특허
                1. 더 많은 정보나 도움이 필요하시면

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    Analyzes source code dependencies across multiple programming languages in the specified directory to identify file relationships, assisting in dependency management and project structure understanding.
                    Last updated -
                    1
                    Python
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Cursor-compatible toolkit that provides intelligent coding assistance through custom AI tools for code architecture planning, screenshot analysis, code review, and file reading capabilities.
                    Last updated -
                    1,261
                    2
                    TypeScript
                    MIT License
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A TypeScript-based Model Context Protocol toolkit that enables AI to interact with code files, manage translations, build projects, and search for files and code content.
                    Last updated -
                    33
                    43
                    5
                    TypeScript
                    MIT License
                  • A
                    security
                    F
                    license
                    A
                    quality
                    AI-driven tool that helps developers create beautiful UI components instantly through natural language descriptions, integrating with popular IDEs like Cursor, Windsurf, and VSCode.
                    Last updated -
                    3
                    1

                  View all related MCP servers

                  ID: dxvglivv9l