QUICK_REF.mdā¢3.4 kB
# MCP Codebase Index - Quick Reference
One-page cheat sheet for fast setup and troubleshooting.
---
## Required Config
**All 4 variables are mandatory:**
```json
{
"mcpServers": {
"codebase": {
"command": "npx",
"args": ["-y", "@ngotaico/mcp-codebase-index"],
"env": {
"REPO_PATH": "/Users/you/Projects/myapp",
"GEMINI_API_KEY": "AIzaSyC...",
"QDRANT_URL": "https://xxx.gcp.cloud.qdrant.io:6333",
"QDRANT_API_KEY": "eyJhbGci..."
}
}
}
}
```
---
## Optional Config
```json
{
"env": {
"QDRANT_COLLECTION": "my_project",
"WATCH_MODE": "true",
"BATCH_SIZE": "50"
}
}
```
---
## Get Credentials
### Gemini API Key
1. Go to [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey)
2. Click "Create API Key"
3. Copy key (starts with `AIzaSy...`)
### Qdrant Cloud
1. Sign up at [cloud.qdrant.io](https://cloud.qdrant.io)
2. Create cluster (free tier)
3. Copy cluster URL: `https://xxx.gcp.cloud.qdrant.io:6333`
4. Create API key: JWT token starting with `eyJhbGci...`
š **Detailed guide**: [QDRANT_CLOUD_SETUP.md](QDRANT_CLOUD_SETUP.md)
---
## Config File Location
**macOS:**
```bash
~/Library/Application Support/Claude/claude_desktop_config.json
```
**Windows:**
```
%APPDATA%\Claude\claude_desktop_config.json
```
**Linux:**
```bash
~/.config/Claude/claude_desktop_config.json
```
---
## Usage Examples
```
"Find the authentication logic"
"Show me database connection code"
"Where is error handling implemented?"
"Find all API endpoints"
```
---
## Troubleshooting
### Check Logs
```bash
# macOS/Linux
tail -f ~/Library/Logs/Claude/mcp*.log
# Windows
Get-Content "$env:APPDATA\Claude\logs\mcp*.log" -Wait
```
### Test Qdrant Connection
```bash
curl -H "api-key: YOUR_KEY" \
https://YOUR_CLUSTER.gcp.cloud.qdrant.io:6333/collections
```
### Common Issues
ā
**Server not appearing?**
- Restart Claude Desktop
- Check all 4 env variables are set
- Verify `REPO_PATH` is absolute path
ā
**Can't connect to Qdrant?**
- Check URL includes `:6333` port
- Verify API key is correct
- Check cluster is running
ā
**Indexing too slow?**
- Large repos take 5-10 minutes
- Reduce `BATCH_SIZE` to 20-30
- Check Gemini API quota
ā
**Search returns nothing?**
- Wait for indexing to complete
- Try more specific queries
- Check logs for errors
---
## Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `REPO_PATH` | ā
| - | Absolute path to project |
| `GEMINI_API_KEY` | ā
| - | Google Gemini API key |
| `QDRANT_URL` | ā
| - | Qdrant cluster URL |
| `QDRANT_API_KEY` | ā
| - | Qdrant Cloud API key |
| `QDRANT_COLLECTION` | ā | `codebase` | Collection name |
| `WATCH_MODE` | ā | `true` | Auto-update files |
| `BATCH_SIZE` | ā | `50` | Embedding batch size |
---
## Supported Languages
Python ⢠TypeScript ⢠JavaScript ⢠Dart ⢠Go ⢠Rust ⢠Java ⢠Kotlin ⢠Swift ⢠Ruby ⢠PHP ⢠C ⢠C++ ⢠C# ⢠Shell
---
## Links
- **NPM**: [npmjs.com/package/@ngotaico/mcp-codebase-index](https://www.npmjs.com/package/@ngotaico/mcp-codebase-index)
- **GitHub**: [github.com/NgoTaiCo/mcp-codebase-index](https://github.com/NgoTaiCo/mcp-codebase-index)
- **Issues**: [github.com/NgoTaiCo/mcp-codebase-index/issues](https://github.com/NgoTaiCo/mcp-codebase-index/issues)