Code Context MCP Server
코드 컨텍스트 MCP 서버
로컬 Git 저장소의 코드 컨텍스트를 제공하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버를 사용하면 다음 작업을 수행할 수 있습니다.
로컬로 git 저장소 복제
프로세스 브랜치 및 파일
코드 청크에 대한 임베딩 생성
코드에 대한 의미 검색 수행
특징
GitHub API 대신 로컬 Git 저장소를 사용합니다.
SQLite 데이터베이스에 데이터를 저장합니다
코드를 의미적 청크로 분할합니다.
Ollama를 사용하여 코드 청크에 대한 임베딩을 생성합니다.
코드에 대한 의미 검색을 제공합니다
Related MCP server: repobase-mcp
필수 조건
Node.js(v16+)
깃
임베딩 모델을 사용한 Ollama
설치
지엑스피1
구성
다음 환경 변수를 설정하세요.
DATA_DIR: SQLite 데이터베이스 디렉토리(기본값: '~/.codeContextMcp/data')REPO_CACHE_DIR: 복제된 저장소의 디렉토리(기본값: '~/.codeContextMcp/repos')
Ollama 사용
더 빠르고 강력한 임베딩을 위해 Ollama를 사용할 수 있습니다.
# Install Ollama from https://ollama.ai/
# Pull an embedding model (unclemusclez/jina-embeddings-v2-base-code is recommended)
ollama pull unclemusclez/jina-embeddings-v2-base-code
용법
Claude Desktop과 함께 사용
Claude Desktop 구성 파일( claude_desktop_config.json )에 다음 구성을 추가합니다.
{
"mcpServers": {
"code-context-mcp": {
"command": "/path/to/your/node",
"args": ["/path/to/code-context-mcp/dist/index.js"]
}
}
}도구
서버는 다음과 같은 도구를 제공합니다.
쿼리리포
저장소를 복제하고, 코드를 처리하고, 의미 검색을 수행합니다.
{
"repoUrl": "https://github.com/username/repo.git",
"branch": "main", // Optional - defaults to repository's default branch
"query": "Your search query",
"keywords": ["keyword1", "keyword2"], // Optional - filter results by keywords
"filePatterns": ["**/*.ts", "src/*.js"], // Optional - filter files by glob patterns
"excludePatterns": ["**/node_modules/**"], // Optional - exclude files by glob patterns
"limit": 10 // Optional - number of results to return, default: 10
}branch 매개변수는 선택 사항입니다. 지정하지 않으면 도구는 자동으로 저장소의 기본 브랜치를 사용합니다.
keywords 매개변수는 선택 사항입니다. 이 매개변수를 지정하면 지정된 키워드 중 하나 이상을 포함하는 청크만 포함하도록 결과가 필터링됩니다(대소문자 구분 없이 일치).
filePatterns 및 excludePatterns 매개변수는 선택 사항입니다. 이 매개변수를 사용하면 glob 패턴(예: 모든 TypeScript 파일에 대해 **/*.ts )을 사용하여 처리 및 검색할 파일을 필터링할 수 있습니다.
데이터베이스 스키마
서버는 다음 스키마를 사용하는 SQLite를 사용합니다.
repository: 저장소에 대한 정보를 저장합니다.branch: 지점에 대한 정보를 저장합니다.file: 파일 정보를 저장합니다branch_file_association: 파일을 브랜치와 연결합니다.file_chunk: 코드 청크와 해당 임베딩을 저장합니다.
특허
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA semantic code search MCP server that enables natural language queries against your codebase, supporting features like related file discovery and context expansion, all running locally.2
- AlicenseNot gradedqualityDmaintenanceMCP server for indexing and searching Git repositories with AI. Enables tools like listing repos, semantic search, file globbing, and regex grep.2416MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables semantic search over local files or GitHub repositories by indexing content into a serverless vector database, allowing AI assistants to understand meaning rather than just keywords.24MIT
- AlicenseAqualityFmaintenanceMCP server for semantic code search that indexes your codebase and allows AI editors to search using natural language queries.911253MIT
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
A MCP server built for developers enabling Git based project management with project and personal…
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fkesheh/code-context-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server