Git RAG MCP Server
Provides tools for interacting with the GitHub REST API, including retrieving the authenticated user, listing repositories, getting repository information, searching issues, reading file content, listing repository files, and searching repository code.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Git RAG MCP Server Find information about Ravi Rao"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Git RAG MCP Server
A practical MCP (Model Context Protocol) project that connects an LLM to multiple custom MCP servers.
The project demonstrates how an MCP client can communicate with specialized servers for:
GitHub operations
Employee document RAG
QA and test-case generation
The goal of this project is to understand and demonstrate MCP architecture, tool calling, resources, prompts, RAG retrieval, and multi-server communication.
Architecture
┌──────────────────┐
│ UI │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ MCP Client │
│ │
│ Tool discovery │
│ Tool calling │
│ LLM interaction │
└────────┬─────────┘
│
┌────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
┌────────────────┐ ┌──────────────┐ ┌──────────────┐
│ GitHub Server │ │ RAG Server │ │ QA Server │
└───────┬────────┘ └──────┬───────┘ └──────────────┘
│ │
▼ ▼
GitHub REST API Employee PDF
TF-IDF SearchProject Structure
git-mcp-server/
│
├── client/
│ └── client.py
│
├── servers/
│ ├── git_server.py
│ ├── rag_server.py
│ └── qa_server.py
│
├── data/
│ └── Employee_Details.pdf
│
├── .env
├── pyproject.toml
├── uv.lock
└── README.mdMCP Servers
Related MCP server: dev-mcp
1. GitHub Server
File:
servers/git_server.pyThe GitHub server communicates with the GitHub REST API using an authenticated GitHub token.
It provides tools for:
Getting the authenticated GitHub user
Listing repositories
Getting repository information
Searching issues
Reading file content
Listing repository files
Searching repository code
Available Tools
get_github_user()
list_repositories()
get_repository(owner, repo)
search_issues(query, top_k)
get_file_content(owner, repo, path, ref)
list_files(owner, repo, path, ref)
search_code(owner, repo, query, top_k)2. RAG Server
File:
servers/rag_server.pyThe RAG server searches employee information stored in:
data/Employee_Details.pdfThe server:
Extracts text from the PDF
Identifies employee records
Creates employee chunks
Builds a TF-IDF vector index
Uses cosine similarity for retrieval
Combines TF-IDF similarity with keyword matching
Returns the most relevant employee records
Available Tools
search_employees(query, top_k)
show_chunks(start, count)
get_chunk_count()Example
User:
Find information about Ravi RaoThe MCP client can call:
search_employees(
query="Ravi Rao",
top_k=5
)The RAG server returns the most relevant employee records with relevance scores.
3. QA Server
File:
servers/qa_server.pyThe QA server provides testing capabilities for the MCP project.
It is designed to help test the GitHub and RAG servers rather than duplicate their functionality.
MCP Tools
create_test_case()
Creates a standardized test case.
Example:
create_test_case(
name="Search code for a known term",
tool_name="search_code",
input_data="...",
expected_result="..."
)Example output:
TEST CASE
Name: Search code for a known term
Tool: search_code
Input:
...
Expected Result:
...
Status: Not Executedvalidate_github_result()
Performs basic validation of results returned by GitHub tools.
Supported operations include:
get_github_user
list_repositories
get_repository
search_issues
get_file_content
list_files
search_codeThe validator checks whether expected fields are present and returns:
PASSor:
FAILvalidate_rag_result()
Performs basic validation of results returned by RAG tools.
Supported operations include:
search_employees
show_chunks
get_chunk_countQA Resource
The QA server exposes:
qa://mcp-test-checklistThe resource contains a reusable checklist covering:
GitHub server testing
RAG server testing
MCP integration testing
Invalid inputs
Empty results
Authentication errors
Tool discovery
Tool argument handling
QA Prompt
The QA server exposes:
generate_mcp_test_plan(component)It generates a reusable prompt for creating test plans.
The generated test plan includes:
Positive test cases
Negative test cases
Boundary cases
Invalid input cases
Empty-result cases
Error cases
MCP integration cases
Expected results
MCP Primitives Demonstrated
This project demonstrates the three major MCP server primitives.
Tool
↓
Performs an action
Resource
↓
Provides read-only context
Prompt
↓
Provides reusable prompt templatesThe project therefore demonstrates:
GitHub Server
└── Tools
RAG Server
└── Tools
QA Server
├── Tools
├── Resource
└── PromptEnvironment Variables
Create a .env file in the project root.
Example:
GITHUB_TOKEN=your_github_tokenThe GitHub server reads the token from the environment and uses it for authenticated GitHub API requests.
Do not commit .env to Git.
Add:
.envto .gitignore.
Installation
This project uses uv for Python environment and dependency management.
Create/sync the environment:
uv syncRun Python through the project environment:
uv run python ...Running the Servers
The MCP servers use stdio communication.
For example:
uv run python servers/qa_server.pyThe server will wait for an MCP client.
This is expected behavior.
The server should normally be launched by the MCP client rather than manually interacted with from the terminal.
Running the MCP Client
Run:
uv run python client/client.pyThe client connects to the configured MCP servers and discovers their available capabilities.
The general flow is:
Client starts
↓
Connect to MCP servers
↓
Discover tools/resources/prompts
↓
Send available capabilities to LLM
↓
User asks a question
↓
LLM decides whether a tool is required
↓
MCP client executes the requested tool
↓
Tool result returned
↓
LLM generates final responseExample: QA Test Case
User:
Create a test case for the search_code tool.The LLM can select:
create_test_casewith arguments such as:
{
"name": "Search code for a known term",
"tool_name": "search_code",
"input_data": "...",
"expected_result": "..."
}The QA server returns the formatted test case.
Example: Employee Search
User:
Find Ravi RaoThe client can select:
search_employeesThe RAG server performs retrieval against the employee PDF.
Question
↓
search_employees
↓
TF-IDF retrieval
+
keyword matching
↓
Relevant employee records
↓
MCP client
↓
LLM responseExample: GitHub Search
User:
Search for MCPServer in my repository.The client can call:
search_code(
owner="...",
repo="...",
query="MCPServer",
top_k=10
)The GitHub server communicates with the GitHub API and returns matching code results.
Example: QA Validation
A GitHub operation can be followed by QA validation:
search_code
↓
GitHub result
↓
validate_github_result
↓
PASS / FAILSimilarly:
search_employees
↓
RAG result
↓
validate_rag_result
↓
PASS / FAILThis demonstrates the concept of using multiple MCP capabilities together.
Technologies Used
Python
Model Context Protocol (MCP)
MCP Python SDK
uv
GitHub REST API
httpx
python-dotenv
PyPDF
scikit-learn
TF-IDF
Cosine similarity
What This Project Demonstrates
This project is intended as a practical MCP learning project.
It demonstrates:
MCP
MCP client
MCP servers
Tool discovery
Tool calling
Resources
Prompts
stdio transport
Multiple MCP servers
GitHub Integration
Authentication
GitHub REST API requests
Repository operations
Issue search
File operations
Code search
RAG
PDF ingestion
Document chunking
TF-IDF indexing
Similarity search
Keyword matching
Retrieval results
QA
Test-case generation
Result validation
QA checklists
Reusable test-plan prompts
Current Limitation
The QA server's create_test_case() tool currently creates a test definition but does not execute the test automatically.
For example:
create_test_case()
↓
Test case created
↓
Status: Not ExecutedAutomatic execution would require the MCP client to orchestrate multiple tool calls:
create test
↓
execute target tool
↓
capture result
↓
validate result
↓
PASS / FAILThis can be implemented as a future enhancement.
Future Improvements
Possible next improvements include:
Automatic multi-tool QA workflows
Automatic test execution
PASS/FAIL test reports
Test history
ChatGPT-style UI
More GitHub operations
Better RAG retrieval
Source/chunk citations
Automated regression testing
More MCP servers
Learning Objective
The main objective of this project is not to build a production GitHub client or production RAG system.
The objective is to understand how an LLM application can use MCP to connect to multiple specialized capabilities.
The core architecture is:
LLM
│
▼
MCP Client
│
┌──────────┼──────────┐
▼ ▼ ▼
GitHub RAG QA
Server Server Server
│ │ │
▼ ▼ ▼
GitHub API PDF/RAG TestingEach server has a clear responsibility, while the MCP client acts as the central communication layer.
Available Tools
3 toolscreate_test_caseC
Create a standardized MCP test case.
Args: name: Short name of the test.
tool_name:
MCP tool being tested.
input_data:
Input that should be passed to the tool.
expected_result:
Expected behavior/result.
Inputs: name (required), tool_name (required), input_data (required), expected_result (required). Returns: result
validate_github_resultB
Perform basic validation of a GitHub MCP tool result.
Args: operation: GitHub operation being tested.
result:
Result returned by the GitHub MCP server.
Inputs: result (required), operation (required). Returns: result
validate_rag_resultC
Perform basic validation of a RAG MCP tool result.
Args: operation: RAG operation being tested.
result:
Result returned by the RAG MCP server.
Inputs: result (required), operation (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Create_test_case is distinct in purpose from the two validate_* tools. The two validators are parallel and could be momentarily confused, but their names clearly indicate the GitHub vs RAG domain, so boundaries are mostly clear.
All tool names follow a consistent snake_case verb_noun pattern: create_test_case, validate_github_result, validate_rag_result. The convention is predictable and uniform.
Three tools is a small but reasonable set for a focused testing utility. It is slightly on the low side, but each tool has a clear role and the count does not feel excessive or arbitrarily inflated.
The domain is a testing harness for MCP tools, yet there is no tool to run a test case, list/retrieve existing test cases, or update/delete them. Validation covers only GitHub and RAG results, leaving other potential MCP results unsupported, which creates significant gaps for realistic workflows.
Related MCP Connectors
Toolstile is a managed MCP gateway that connects remote MCP servers behind one endpoint, with per-agent permissions, shared accounts and activity logs. Connect at https://mcp.toolstile.com/mcp over Streamable HTTP with OAuth; sign in at https://toolstile.com, select a workspace and connect your upstream servers. Available tools, resources and prompts depend on that workspace and the agent's granted access.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Verified component catalog over remote MCP: agents pick component ids and get a stamped project repo that builds. Connect at https://www.botkelp.com/mcp. Auth: MCP OAuth 2.1, or a Bearer bk_live_ API key; initialize and tools/list are open.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with a Git-native organizational governance system, supporting proposal-validation workflows, decision-making, and audit trail management through 21 MCP tools over stdio transport.1MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that gives AI agents access to developer tooling — GitHub (read-only), documentation search, and web research — via stdio transport.MIT
- AlicenseNot gradedqualityBmaintenanceA production-grade MCP server that provides LLMs with safe, structured, tool-based access to GitHub repositories, including issue management, semantic search, and guarded write operations.MIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP-compatible LLM clients to query GitHub repository data—commits, issues, contributor stats, and code search—as typed callable tools over stdio.-