Skip to content

Commit fdd98fd

Browse files
committed
Improve readme
1 parent 8c5d42f commit fdd98fd

File tree

2 files changed

+187
-31
lines changed

2 files changed

+187
-31
lines changed

README.md

+186-30
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
<p align="center">
66
<a href="#features">Features</a> •
7-
<a href="#usage">Usage</a> •
7+
<a href="#what-is-gitmcp">What is GitMCP</a> •
8+
<a href="#getting-started">Getting Started</a> •
89
<a href="#how-it-works">How It Works</a> •
910
<a href="#examples">Examples</a> •
1011
<a href="#faq">FAQ</a> •
@@ -19,61 +20,182 @@
1920
</div>
2021

2122
## What is GitMCP?
23+
**The end to vibe-hallucinating!** [GitMCP](https://gitmcp.io) is a free, open-source, remote [Model Context Protocol (MCP)](https://docs.anthropic.com/en/docs/agents-and-tools/mcp) server that transforms **any** GitHub project (repositories or GitHub pages) into a documentation hub. It allows AI tools like Cursor to access up-to-date documentation and code, ending hallucinations seamlessly.
2224

23-
GitMCP is a free, open-source service that seamlessly transforms any GitHub project into a remote [Model Context Protocol (MCP)](https://modelcontextprotocol.github.io/) endpoint, enabling AI assistants to access and understand the project's documentation effortlessly.
2425

2526
## Features
2627

27-
- **Empower AI with GitHub Project Access**: Direct your AI assistant to GitMCP for instant access to any GitHub project's documentation, complete with semantic search capabilities to optimize token usage.
28-
- **Zero Setup Required**: No configurations or modifications needed — GitMCP works out of the box.
29-
- **Completely Free and Private**: GitMCP is free. We don't collect any personally identifiable information or queries. Plus, you can host it yourself!
28+
- **Latest Documentation on Any GitHub project**: Grant your AI assistant seamless access to the GitHub project's documentation and code. The built-in smart search capabilities help find exactly what the AI needs without using too many tokens!
29+
- 👌 **Zero Setup**: Simply add the chosen GitMCP URL as an MCP server in your IDE —no downloads, installations, signups, or changes are required.
30+
- **Free and Private**: GitMCP is open-source and completely free to use. It doesn't collect personal information or store queries. You can even self-host it!
3031

31-
## Getting Started (Usage)
32+
<video src="https://github.com/user-attachments/assets/2c3afaf9-6c08-436e-9efd-db8710554430"></video>
3233

33-
To make your GitHub repository accessible to AI assistants via GitMCP, use the following URL formats:
34+
## Getting Started
3435

35-
- For GitHub repositories: `gitmcp.io/{owner}/{repo}`
36-
- For GitHub Pages sites: `{owner}.gitmcp.io/{repo}`
37-
- Dynamic endpoint: `gitmcp.io/docs`
36+
Using GitMCP is as easy as it gets! Just follow these steps:
3837

39-
Congratulations! The chosen GitHub project is now fully accessible to your AI.
38+
### Step 1: Choose the type of server you want
4039

41-
Replace `{owner}` with your GitHub username or organization name and `{repo}` with your repository name. Once configured, your AI assistant can access the project's documentation seamlessly.
42-
The dynamic endpoint doesn't require a pre-defined repository. When used, your AI assistant can dynamically input any GitHub repository to enjoy GitMCP's features.
40+
Choose one of these URL formats depending on what you want to connect to:
4341

44-
<video src="https://github.com/user-attachments/assets/2c3afaf9-6c08-436e-9efd-db8710554430"></video>
42+
- For GitHub repositories: `gitmcp.io/{owner}/{repo}`
43+
- For GitHub Pages sites: `{owner}.gitmcp.io/{repo}`
44+
- For any repository (dynamic): `gitmcp.io/docs`
45+
46+
Replace `{owner}` with the GitHub username or organization name, and `{repo}` with the repository name.
47+
48+
### Step 2: Connect your AI assistant
49+
50+
Select your AI assistant from the options below and follow the configuration instructions:
51+
52+
#### Connecting Cursor
53+
54+
1. Update your Cursor configuration file at `~/.cursor/mcp.json`:
55+
```json
56+
{
57+
"mcpServers": {
58+
"gitmcp": {
59+
"url": "https://gitmcp.io/{owner}/{repo}"
60+
}
61+
}
62+
}
63+
```
64+
65+
#### Connecting Claude Desktop
66+
67+
1. In Claude Desktop, go to Settings > Developer > Edit Config
68+
2. Replace the configuration with:
69+
```json
70+
{
71+
"mcpServers": {
72+
"gitmcp": {
73+
"command": "npx",
74+
"args": [
75+
"mcp-remote",
76+
"https://gitmcp.io/{owner}/{repo}"
77+
]
78+
}
79+
}
80+
}
81+
```
82+
83+
#### Connecting Windsurf
84+
85+
1. Update your Windsurf configuration file at `~/.codeium/windsurf/mcp_config.json`:
86+
```json
87+
{
88+
"mcpServers": {
89+
"gitmcp": {
90+
"serverUrl": "https://gitmcp.io/{owner}/{repo}"
91+
}
92+
}
93+
}
94+
```
95+
96+
#### Connecting VSCode
97+
98+
1. Update your VSCode configuration file at `.vscode/mcp.json`:
99+
```json
100+
{
101+
"servers": {
102+
"gitmcp": {
103+
"type": "sse",
104+
"url": "https://gitmcp.io/{owner}/{repo}"
105+
}
106+
}
107+
}
108+
```
109+
110+
#### Connecting Cline
111+
112+
1. Update your Cline configuration file at `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`:
113+
```json
114+
{
115+
"mcpServers": {
116+
"gitmcp": {
117+
"url": "https://gitmcp.io/{owner}/{repo}",
118+
"disabled": false,
119+
"autoApprove": []
120+
}
121+
}
122+
}
123+
```
124+
125+
> **Note:** Remember to replace `{owner}` and `{repo}` with the actual GitHub username/organization and repository name. You can also use the dynamic endpoint `https://gitmcp.io/docs` to allow your AI to access any repository on demand.
45126
46127
## How It Works
47128

48-
GitMCP serves as a bridge between your GitHub repository's documentation and AI assistants by implementing the Model Context Protocol (MCP). When an AI assistant requires information from your repository, it sends a request to GitMCP. GitMCP retrieves the relevant content and provides semantic search capabilities, ensuring efficient and accurate information delivery.
129+
GitMCP connects your AI assistant to GitHub repositories using the Model Context Protocol (MCP), a standard that lets AI tools request additional information from external sources.
130+
131+
What happens when you use GitMCP:
132+
133+
1. **You provide the GitMCP URL** to your AI assistant (e.g., `gitmcp.io/microsoft/typescript`). GitMCP exposes tools like documentation fetching, smart search, code search, etc.
134+
2. **Prompt the AI assistant** on documentation/code-related questions.
135+
3. **Your AI sends requests** to GitMCP to use its tools (with your approval).
136+
4. **GitMCP executes the AI's request** and returns the requested data.
137+
5. **Your AI receives the information** and generates a more accurate, grounded response without hallucinations.
49138

50139
## Examples
51140

52-
Here are some examples of how to use GitMCP with different repositories:
141+
Here are some examples of how to use GitMCP with different AI assistants and repositories:
142+
143+
### Example 1: Using Windsurf with a specific repository
144+
145+
For the GitHub repository `https://github.com/microsoft/playwright-mcp`, add `https://gitmcp.io/microsoft/playwright-mcp` as an MCP server to Windsurf.
146+
147+
**Prompt to Claude:**
148+
> "How do I use the Playwright MCP"
149+
150+
Windsurf will pull the relevant documentation from GitMCP to implement the memory feature correctly.
151+
152+
### Example 2: Using Cursor with a GitHub Pages site
153+
154+
For the GitHub Pages site `langchain-ai.github.io/langgraph`, add `https://langchain-ai.gitmcp.io/langgraph` as an MCP server to Cursor.
53155

54-
- **Example 1**: For the repository `https://github.com/octocat/Hello-World`, use: `https://gitmcp.io/octocat/Hello-World`
55-
- **Example 2**: For the GitHub Pages site `langchain-ai.github.io/langgraph`, use: `https://langchain-ai.gitmcp.io/langgraph`
56-
- **Example 3**: Use the generic `gitmcp.io/docs` endpoint for your AI to dynamically select a repository
156+
**Prompt to Cursor:**
157+
> "Add memory to my LangGraph agent"
57158
58-
These URLs enable AI assistants to access and interact with the project's documentation through GitMCP.
159+
Cursor will pull the relevant documentation and code from GitMCP to correctly implement the memory feature.
160+
161+
### Example 3: Using Claude Desktop with the dynamic endpoint
162+
163+
You don't have to pick specific repositories. The generic `gitmcp.io/docs` endpoint allows AI to pick the GitHub project on the fly!
164+
165+
**Prompt to any AI assistant:**
166+
> "I want to learn about the OpenAI Whisper speech recognition model. Explain how it works.
167+
168+
Claude will pull the data from GitMCP and answer the question.
59169

60170
## Tools
61171

62-
GitMCP provides a set of tools that can be used to access and interact with the project's documentation.
172+
GitMCP provides AI assistants with several valuable tools to help them access, understand, and query GitHub repositories.
173+
174+
### `fetch_<repo-name>_documentation`
175+
176+
This tool gets the primary documentation from a GitHub repository. It works by retrieving relevant documentation (e.g., `llms.txt`). This gives the AI a good overview of what the project is about
177+
178+
**When it's useful:** For general questions about a project's purpose, features, or how to get started
63179

64-
### `fetch_<repo-name>_documentation`:
65-
Fetches the documentation for the `{owner}/{repo}` GitHub repository (as extracted from the URL: `gitmcp.io/{owner}/{repo}` or `{owner}.gitmcp.io/{repo}`). Useful for general questions. Retrieves the `llms.txt` file and falls back to `README.md` or other pages if the former is unavailable.
180+
### `search_<repo-name>_documentation`
66181

67-
### `search_<repo-name>_documentation`:
68-
It searches the repository's documentation by providing a `query`. This is useful for specific questions. It uses semantic search to find the most relevant documentation. This mitigates the cost of a large documentation set that cannot be provided as direct context to LLMs.
182+
This tool lets the AI search through a repository's documentation by providing a specific search query. Instead of loading all documentation (which could be very large), it uses smart search to find just the relevant parts.
69183

70-
### `fetch_url_content`:
71-
Fetches content from a URL that was referenced in previously retrieved documentation and converts it to markdown. This enables the AI assistant to access and process additional resources linked within the project documentation (extremely handy for `llms.txt`).
184+
**When it's useful:** For specific questions about particular features, functions, or concepts within a project
72185

73-
### `search_<repo-name>_code`:
74-
Searches code in the repository using the GitHub code search API. Provides results of code matching the search query, helping AI assistants find relevant implementation details and examples within the codebase.
186+
### `fetch_url_content`
75187

76-
> Note: In the case of a generic `gitmcp.com/docs` usage, the tools are called `fetch_generic_documentation`, `search_generic_code`, and `search_generic_documentation`. They receive additional `owner` and `repo` arguments.
188+
This tool helps the AI get information from links mentioned in the documentation. It retrieves the content from those links and converts it to a format the AI can easily read.
189+
190+
**When it's useful:** When documentation references external information that would help answer your question
191+
192+
### `search_<repo-name>_code`
193+
194+
This tool searches through the actual code in the repository using GitHub's code search. It helps AI find specific code examples or implementation details.
195+
196+
**When it's useful:** When you want examples of how something is implemented or need technical details not covered in documentation
197+
198+
> **Note:** When using the dynamic endpoint (`gitmcp.io/docs`), these tools are named slightly differently (`fetch_generic_documentation`, `search_generic_code`, and `search_generic_documentation`) and need additional information about which repository to access.
77199
78200
## FAQ
79201

@@ -103,6 +225,40 @@ GitMCP only accesses content that is already publicly available and only when qu
103225

104226
We welcome contributions! Please take a look at our [contribution](https://github.com/idosal/git-mcp/blob/main/.github/CONTRIBUTING.md) guidelines.
105227

228+
### Local Development Setup
229+
230+
1. **Clone the repository**
231+
```bash
232+
git clone https://github.com/idosal/git-mcp.git
233+
cd git-mcp
234+
```
235+
236+
2. **Install dependencies**
237+
```bash
238+
npm install
239+
# or if you prefer pnpm
240+
pnpm install
241+
```
242+
243+
3. **Run locally for development**
244+
```bash
245+
npm run dev
246+
# or
247+
pnpm dev
248+
```
249+
250+
#### Using MCP Inspector for Testing
251+
252+
1. Install the MCP Inspector tool:
253+
```bash
254+
npx @modelcontextprotocol/inspector
255+
```
256+
257+
2. In the inspector interface (http://localhost:5173):
258+
- Set Transport Type to `SSE`
259+
- Enter your GitMCP URL (e.g., `http://localhost:8787/docs`)
260+
- Click "Connect"
261+
106262
## License
107263

108264
This project is licensed under the [Apache License 2.0](LICENSE).

app/components/content.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ export default function Content({
307307
code={`{
308308
"mcpServers": {
309309
"${serverName}": {
310-
"url": "${url}"
310+
"url": "${url}",
311311
"disabled": false,
312312
"autoApprove": []
313313
}

0 commit comments

Comments
 (0)