Skip to main content

An AWS Labs Model Context Protocol (MCP) server for researching git repositories

Reason this release was yanked:

Consider an alternative such as the context7 MCP server

Project description

Git Repo Research MCP Server

Model Context Protocol (MCP) server for researching Git repositories using semantic search

This MCP server enables developers to research external Git repositories and influence their code generation without having to clone repositories to local projects. It provides tools to index, search, and explore Git repositories using semantic search powered by Amazon Bedrock and FAISS.

Features

  • Repository Indexing: Create searchable FAISS indexes from local or remote Git repositories
  • Semantic Search: Query repository content using natural language and retrieve relevant code snippets
  • Repository Summary: Get directory structures and identify key files like READMEs
  • GitHub Repository Search: Find repositories in AWS-related organizations filtered by licenses and keywords
  • File Access: Access repository files and directories with support for both text and binary content

Prerequisites

Installation Requirements

  1. Install uv from Astral or the GitHub README
  2. Install Python 3.12 or newer using uv python install 3.12
    • uv - Fast Python package installer and resolver
  3. AWS credentials configured with Bedrock access
  4. Node.js (for UVX installation support)

AWS Requirements

  1. AWS CLI Configuration: You must have the AWS CLI configured with credentials that have access to Amazon Bedrock
  2. Amazon Bedrock Access: Ensure your AWS account has access to embedding models like Titan Embeddings
  3. Environment Variables: The server uses AWS_REGION and AWS_PROFILE environment variables

Optional Requirements

  1. GitHub Token: Set GITHUB_TOKEN environment variable for higher rate limits when searching GitHub repositories

Installation

Cursor VS Code
Install MCP Server Install on VS Code

To add this MCP server to your Amazon Q or Claude, add the following to your MCP config file:

{
  "mcpServers": {
    "awslabs.git-repo-research-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.git-repo-research-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "your-profile-name",
        "AWS_REGION": "us-west-2",
        "FASTMCP_LOG_LEVEL": "ERROR",
        "GITHUB_TOKEN": "your-github-token"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Tools

create_research_repository

Indexes a Git repository (local or remote) using FAISS and Amazon Bedrock embeddings.

create_research_repository(
    repository_path: str,
    output_path: Optional[str] = None,
    embedding_model: str = "amazon.titan-embed-text-v2:0",
    include_patterns: Optional[List[str]] = None,
    exclude_patterns: Optional[List[str]] = None,
    chunk_size: int = 1000,
    chunk_overlap: int = 200
) -> Dict

search_research_repository

Performs semantic search within an indexed repository.

search_research_repository(
    index_path: str,
    query: str,
    limit: int = 10,
    threshold: float = 0.0
) -> Dict

search_repos_on_github

Searches for GitHub repositories based on keywords, scoped to AWS organizations.

search_repos_on_github(
    keywords: List[str],
    num_results: int = 5
) -> Dict

access_file

Accesses file or directory contents within repositories or on the filesystem.

access_file(
    filepath: str
) -> Dict | ImageContent

delete_research_repository

Deletes an indexed repository.

delete_research_repository(
    repository_name_or_path: str,
    index_directory: Optional[str] = None
) -> Dict

Resources

repositories://repository_name/summary

Get a summary of an indexed repository including structure and helpful files.

repositories://awslabs_mcp/summary

repositories://

List all indexed repositories with detailed information.

repositories://

repositories://index_directory

List all indexed repositories from a specific index directory.

repositories:///path/to/custom/index/directory

Considerations

  • Repository indexing requires Amazon Bedrock access and sufficient permissions
  • Large repositories may take significant time to index
  • Binary files (except images) are not supported for content viewing
  • GitHub repository search is by default limited to AWS organizations: aws-samples, aws-solutions-library-samples, and awslabs (but can be configured to include other organizations)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awslabs_git_repo_research_mcp_server-1.0.6.tar.gz (186.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file awslabs_git_repo_research_mcp_server-1.0.6.tar.gz.

File metadata

File hashes

Hashes for awslabs_git_repo_research_mcp_server-1.0.6.tar.gz
Algorithm Hash digest
SHA256 519cf10d68e43fc24689c45d6b98a633fbeea73561b1907e313b619e50d5e333
MD5 9a7ca6f52cb9aaf9d8ed69e11cd93211
BLAKE2b-256 4c47733e31da05a3196a7a56ff3ede6aa4f1a40a5e4e1e75c7a586e89530e6c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for awslabs_git_repo_research_mcp_server-1.0.6.tar.gz:

Publisher: release.yml on awslabs/mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file awslabs_git_repo_research_mcp_server-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for awslabs_git_repo_research_mcp_server-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b3fcb1b528d253053fa712b9605ff82144f2f4bbc5674b0a399810550a31eee5
MD5 d41bacd11c0b88d205f7ccffb7e1bd99
BLAKE2b-256 bc7e291a16bec18c4941b806e32c234323871f6df16ce190ef393fd9fe4c5783

See more details on using hashes here.

Provenance

The following attestation bundles were made for awslabs_git_repo_research_mcp_server-1.0.6-py3-none-any.whl:

Publisher: release.yml on awslabs/mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page