mcp-code-indexer 3.5.5__tar.gz → 3.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/PKG-INFO +102 -49
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/README.md +98 -48
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/pyproject.toml +5 -1
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/main.py +66 -1
- mcp_code_indexer-3.6.0/src/mcp_code_indexer/middleware/__init__.py +12 -0
- mcp_code_indexer-3.6.0/src/mcp_code_indexer/middleware/auth.py +228 -0
- mcp_code_indexer-3.6.0/src/mcp_code_indexer/middleware/logging.py +274 -0
- mcp_code_indexer-3.6.0/src/mcp_code_indexer/middleware/security.py +368 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/server/mcp_server.py +33 -82
- mcp_code_indexer-3.6.0/src/mcp_code_indexer/transport/__init__.py +12 -0
- mcp_code_indexer-3.6.0/src/mcp_code_indexer/transport/base.py +108 -0
- mcp_code_indexer-3.6.0/src/mcp_code_indexer/transport/http_transport.py +365 -0
- mcp_code_indexer-3.6.0/src/mcp_code_indexer/transport/stdio_transport.py +129 -0
- mcp_code_indexer-3.5.5/src/mcp_code_indexer/middleware/__init__.py +0 -7
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/LICENSE +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/__init__.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/__main__.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/ask_handler.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/claude_api_handler.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/cleanup_manager.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/commands/__init__.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/commands/makelocal.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/data/stop_words_english.txt +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/database/__init__.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/database/connection_health.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/database/database.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/database/database_factory.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/database/exceptions.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/database/models.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/database/path_resolver.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/database/retry_executor.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/deepask_handler.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/error_handler.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/file_scanner.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/git_hook_handler.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/logging_config.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/middleware/error_middleware.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/migrations/001_initial.sql +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/migrations/002_performance_indexes.sql +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/migrations/003_project_overviews.sql +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/migrations/004_remove_branch_dependency.sql +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/migrations/005_remove_git_remotes.sql +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/query_preprocessor.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/server/__init__.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/token_counter.py +0 -0
- {mcp_code_indexer-3.5.5 → mcp_code_indexer-3.6.0}/src/mcp_code_indexer/tools/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: mcp-code-indexer
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.6.0
|
|
4
4
|
Summary: MCP server that tracks file descriptions across codebases, enabling AI agents to efficiently navigate and understand code through searchable summaries and token-aware overviews.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: mcp,model-context-protocol,code-indexer,ai-tools,codebase-navigation,file-descriptions,llm-tools
|
|
@@ -26,13 +26,16 @@ Classifier: Typing :: Typed
|
|
|
26
26
|
Requires-Dist: aiofiles (==23.2.0)
|
|
27
27
|
Requires-Dist: aiohttp (>=3.8.0)
|
|
28
28
|
Requires-Dist: aiosqlite (==0.19.0)
|
|
29
|
+
Requires-Dist: fastapi (>=0.104.0)
|
|
29
30
|
Requires-Dist: gitignore-parser (==0.1.11)
|
|
30
31
|
Requires-Dist: importlib-metadata (>=1.0.0) ; python_version < "3.8"
|
|
31
32
|
Requires-Dist: mcp (>=1.9.0)
|
|
32
33
|
Requires-Dist: pydantic (>=2.8.0)
|
|
34
|
+
Requires-Dist: python-multipart (>=0.0.6)
|
|
33
35
|
Requires-Dist: tenacity (>=8.0.0)
|
|
34
36
|
Requires-Dist: tiktoken (>=0.9.0)
|
|
35
37
|
Requires-Dist: tomli (>=1.2.0) ; python_version < "3.11"
|
|
38
|
+
Requires-Dist: uvicorn (>=0.24.0)
|
|
36
39
|
Project-URL: Documentation, https://github.com/fluffypony/mcp-code-indexer/blob/main/README.md
|
|
37
40
|
Project-URL: Homepage, https://github.com/fluffypony/mcp-code-indexer
|
|
38
41
|
Project-URL: Repository, https://github.com/fluffypony/mcp-code-indexer
|
|
@@ -40,8 +43,8 @@ Description-Content-Type: text/markdown
|
|
|
40
43
|
|
|
41
44
|
# MCP Code Indexer 🚀
|
|
42
45
|
|
|
43
|
-
[](https://badge.fury.io/py/mcp-code-indexer)
|
|
47
|
+
[](https://pypi.org/project/mcp-code-indexer/)
|
|
45
48
|
[](https://opensource.org/licenses/MIT)
|
|
46
49
|
|
|
47
50
|
A production-ready **Model Context Protocol (MCP) server** that revolutionizes how AI agents navigate and understand codebases. Built for high-concurrency environments with advanced database resilience, the server provides instant access to intelligent descriptions, semantic search, and context-aware recommendations while maintaining 800+ writes/sec throughput.
|
|
@@ -211,29 +214,39 @@ mypy src/
|
|
|
211
214
|
|
|
212
215
|
## 🛠️ MCP Tools Available
|
|
213
216
|
|
|
214
|
-
The server provides **
|
|
215
|
-
|
|
216
|
-
### 🎯
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
217
|
+
The server provides **11 powerful MCP tools** for intelligent codebase management. Whether you're an AI agent or human developer, these tools make navigating code effortless.
|
|
218
|
+
|
|
219
|
+
### 🎯 Essential Tools (Start Here)
|
|
220
|
+
| Tool | Purpose | When to Use |
|
|
221
|
+
|------|---------|-------------|
|
|
222
|
+
| **`check_codebase_size`** | Get navigation recommendations | First tool to call for any project |
|
|
223
|
+
| **`search_descriptions`** | Find files by functionality | When you need specific files |
|
|
224
|
+
| **`get_codebase_overview`** | Project architectural summary | Understanding system design |
|
|
225
|
+
|
|
226
|
+
### 🔧 Core Operations
|
|
227
|
+
| Tool | Purpose | Best For |
|
|
228
|
+
|------|---------|----------|
|
|
229
|
+
| **`get_file_description`** | Retrieve file summaries | Quick file understanding |
|
|
230
|
+
| **`update_file_description`** | Store detailed file analysis | AI agents updating descriptions |
|
|
231
|
+
| **`find_missing_descriptions`** | Scan for undocumented files | Maintenance and coverage |
|
|
232
|
+
|
|
233
|
+
### 🔍 Advanced Features
|
|
234
|
+
| Tool | Purpose | Use Case |
|
|
235
|
+
|------|---------|----------|
|
|
236
|
+
| **`get_all_descriptions`** | Complete project structure | Small-to-medium codebases |
|
|
237
|
+
| **`get_word_frequency`** | Technical vocabulary analysis | Domain understanding |
|
|
238
|
+
| **`update_codebase_overview`** | Create project documentation | Architecture documentation |
|
|
239
|
+
| **`search_codebase_overview`** | Search in project overviews | Finding specific topics |
|
|
240
|
+
|
|
241
|
+
### 🏥 System Health
|
|
242
|
+
| Tool | Purpose | For |
|
|
243
|
+
|------|---------|-----|
|
|
244
|
+
| **`check_database_health`** | Real-time performance monitoring | Production deployments |
|
|
234
245
|
|
|
235
246
|
💡 **Pro Tip**: Always start with `check_codebase_size` to get personalized recommendations for navigating your specific codebase.
|
|
236
247
|
|
|
248
|
+
**📖 Complete API Documentation**: [View all 11 tools with examples →](docs/api-reference.md)
|
|
249
|
+
|
|
237
250
|
## 🔗 Git Hook Integration
|
|
238
251
|
|
|
239
252
|
Keep your codebase documentation automatically synchronized with automated analysis on every commit:
|
|
@@ -290,21 +303,38 @@ See the **[Git Hook Setup Guide](docs/git-hook-setup.md)** for complete installa
|
|
|
290
303
|
|
|
291
304
|
## 📖 Documentation
|
|
292
305
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
###
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
Comprehensive documentation organized by user journey and expertise level.
|
|
307
|
+
|
|
308
|
+
### 🚀 Getting Started (New Users)
|
|
309
|
+
| Guide | Purpose | Time Investment |
|
|
310
|
+
|-------|---------|-----------------|
|
|
311
|
+
| **[Quick Start](#-quick-start)** | Install and run your first server | 2 minutes |
|
|
312
|
+
| **[Git Hook Setup](docs/git-hook-setup.md)** | Automate your workflow | 5 minutes |
|
|
313
|
+
| **[API Reference](docs/api-reference.md)** | Master all 11 MCP tools | 15 minutes |
|
|
314
|
+
|
|
315
|
+
### 🏗️ Production Deployment (Teams & Admins)
|
|
316
|
+
| Guide | Focus | Best For |
|
|
317
|
+
|-------|-------|----------|
|
|
318
|
+
| **[Configuration Guide](docs/configuration.md)** | Production setup & tuning | System administrators |
|
|
319
|
+
| **[Performance Tuning](docs/performance-tuning.md)** | High-concurrency optimization | DevOps teams |
|
|
320
|
+
| **[Monitoring & Diagnostics](docs/monitoring.md)** | Production monitoring | Operations teams |
|
|
321
|
+
|
|
322
|
+
### 🔧 Advanced Topics (Power Users)
|
|
323
|
+
| Guide | Depth | For |
|
|
324
|
+
|-------|-------|-----|
|
|
325
|
+
| **[Architecture Overview](docs/architecture.md)** | System design deep dive | Developers & architects |
|
|
326
|
+
| **[Database Resilience](docs/database-resilience.md)** | Advanced error handling | Senior developers |
|
|
327
|
+
| **[Contributing Guide](docs/contributing.md)** | Development workflow | Contributors |
|
|
328
|
+
|
|
329
|
+
### 📋 Quick References
|
|
330
|
+
- **[Examples & Integrations](examples/)** - Ready-to-use configurations
|
|
331
|
+
- **[Troubleshooting](#🚨-troubleshooting)** - Common issues & solutions
|
|
332
|
+
- **[API Tools Summary](#🛠️-mcp-tools-available)** - All 11 tools at a glance
|
|
333
|
+
|
|
334
|
+
**📚 Reading Paths:**
|
|
335
|
+
- **New to MCP Code Indexer?** Quick Start → Git Hooks → API Reference
|
|
336
|
+
- **Setting up for a team?** Configuration → Performance → Monitoring
|
|
337
|
+
- **Contributing to the project?** Architecture → Contributing → API Reference
|
|
308
338
|
|
|
309
339
|
## 🚦 System Requirements
|
|
310
340
|
|
|
@@ -508,22 +538,45 @@ mcp-code-indexer --dumpdescriptions PROJECT_ID
|
|
|
508
538
|
- **Error sanitization** to prevent information leakage
|
|
509
539
|
- **Async resource cleanup** to prevent memory leaks
|
|
510
540
|
|
|
541
|
+
## 🚨 Quick Troubleshooting
|
|
542
|
+
|
|
543
|
+
**Common issues and instant solutions:**
|
|
544
|
+
|
|
545
|
+
| Issue | Quick Fix | Learn More |
|
|
546
|
+
|-------|-----------|------------|
|
|
547
|
+
| **"No module named 'mcp_code_indexer'"** | `pip install -e .` (for development) | [Contributing Guide](docs/contributing.md#development-setup) |
|
|
548
|
+
| **"OPENROUTER_API_KEY not found"** | `export OPENROUTER_API_KEY="your-key"` | [Git Hook Setup](docs/git-hook-setup.md#prerequisites) |
|
|
549
|
+
| **"Database is locked"** | Enable WAL mode: `--enable-wal-mode` | [Performance Tuning](docs/performance-tuning.md#database-configuration) |
|
|
550
|
+
| **"Large codebase - use search"** | Normal for 200+ files. Use `search_descriptions` | [API Reference](docs/api-reference.md#search_descriptions) |
|
|
551
|
+
| **High memory usage** | Reduce token limit: `--token-limit 10000` | [Configuration Guide](docs/configuration.md#performance-tuning) |
|
|
552
|
+
|
|
553
|
+
**💡 Not finding your issue?** Check the [complete troubleshooting guides](docs/monitoring.md#troubleshooting-runbook) in our documentation.
|
|
554
|
+
|
|
511
555
|
## 🚀 Next Steps
|
|
512
556
|
|
|
513
557
|
Ready to supercharge your AI agents with intelligent codebase navigation?
|
|
514
558
|
|
|
515
|
-
###
|
|
516
|
-
1. **[Install and run your first server](#-quick-start)** - Get up and running in 2 minutes
|
|
517
|
-
2. **[Set up git hooks](docs/git-hook-setup.md)** - Automate your workflow
|
|
518
|
-
3. **[Configure for production](docs/configuration.md)** - Deploy for your team
|
|
519
|
-
|
|
520
|
-
### 👨💻 For Developers
|
|
521
|
-
4. **[Explore the API tools](docs/api-reference.md)** - Master all 11 MCP tools
|
|
522
|
-
5. **[Understand the architecture](docs/architecture.md)** - Deep dive into the technical design
|
|
559
|
+
### 🎯 Choose Your Path
|
|
523
560
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
561
|
+
**🆕 New to MCP Code Indexer?**
|
|
562
|
+
1. **[Install and run your first server](#-quick-start)** - Get up and running in 2 minutes
|
|
563
|
+
2. **[Set up git hooks](docs/git-hook-setup.md)** - Automate your workflow
|
|
564
|
+
3. **[Master the API tools](docs/api-reference.md)** - Learn all 11 tools with examples
|
|
565
|
+
|
|
566
|
+
**👥 Setting up for a team?**
|
|
567
|
+
1. **[Configure for production](docs/configuration.md)** - Production deployment guide
|
|
568
|
+
2. **[Performance optimization](docs/performance-tuning.md)** - High-concurrency setup
|
|
569
|
+
3. **[Monitoring & alerts](docs/monitoring.md)** - Production monitoring
|
|
570
|
+
|
|
571
|
+
**🔧 Want to contribute?**
|
|
572
|
+
1. **[Understand the architecture](docs/architecture.md)** - Technical deep dive
|
|
573
|
+
2. **[Development setup](docs/contributing.md)** - Contribution workflow
|
|
574
|
+
3. **[Report issues](https://github.com/fluffypony/mcp-code-indexer/issues)** - Share feedback and suggestions
|
|
575
|
+
|
|
576
|
+
**📚 Learning Resources:**
|
|
577
|
+
- **[Examples & integrations](examples/)** - Ready-to-use configurations
|
|
578
|
+
- **[Video tutorials](#)** - Coming soon!
|
|
579
|
+
- **[Community discussions](https://github.com/fluffypony/mcp-code-indexer/discussions)** - Ask questions and share tips
|
|
527
580
|
|
|
528
581
|
## 🤝 Contributing
|
|
529
582
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# MCP Code Indexer 🚀
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/py/mcp-code-indexer)
|
|
4
|
+
[](https://pypi.org/project/mcp-code-indexer/)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
7
|
A production-ready **Model Context Protocol (MCP) server** that revolutionizes how AI agents navigate and understand codebases. Built for high-concurrency environments with advanced database resilience, the server provides instant access to intelligent descriptions, semantic search, and context-aware recommendations while maintaining 800+ writes/sec throughput.
|
|
@@ -171,29 +171,39 @@ mypy src/
|
|
|
171
171
|
|
|
172
172
|
## 🛠️ MCP Tools Available
|
|
173
173
|
|
|
174
|
-
The server provides **
|
|
175
|
-
|
|
176
|
-
### 🎯
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
174
|
+
The server provides **11 powerful MCP tools** for intelligent codebase management. Whether you're an AI agent or human developer, these tools make navigating code effortless.
|
|
175
|
+
|
|
176
|
+
### 🎯 Essential Tools (Start Here)
|
|
177
|
+
| Tool | Purpose | When to Use |
|
|
178
|
+
|------|---------|-------------|
|
|
179
|
+
| **`check_codebase_size`** | Get navigation recommendations | First tool to call for any project |
|
|
180
|
+
| **`search_descriptions`** | Find files by functionality | When you need specific files |
|
|
181
|
+
| **`get_codebase_overview`** | Project architectural summary | Understanding system design |
|
|
182
|
+
|
|
183
|
+
### 🔧 Core Operations
|
|
184
|
+
| Tool | Purpose | Best For |
|
|
185
|
+
|------|---------|----------|
|
|
186
|
+
| **`get_file_description`** | Retrieve file summaries | Quick file understanding |
|
|
187
|
+
| **`update_file_description`** | Store detailed file analysis | AI agents updating descriptions |
|
|
188
|
+
| **`find_missing_descriptions`** | Scan for undocumented files | Maintenance and coverage |
|
|
189
|
+
|
|
190
|
+
### 🔍 Advanced Features
|
|
191
|
+
| Tool | Purpose | Use Case |
|
|
192
|
+
|------|---------|----------|
|
|
193
|
+
| **`get_all_descriptions`** | Complete project structure | Small-to-medium codebases |
|
|
194
|
+
| **`get_word_frequency`** | Technical vocabulary analysis | Domain understanding |
|
|
195
|
+
| **`update_codebase_overview`** | Create project documentation | Architecture documentation |
|
|
196
|
+
| **`search_codebase_overview`** | Search in project overviews | Finding specific topics |
|
|
197
|
+
|
|
198
|
+
### 🏥 System Health
|
|
199
|
+
| Tool | Purpose | For |
|
|
200
|
+
|------|---------|-----|
|
|
201
|
+
| **`check_database_health`** | Real-time performance monitoring | Production deployments |
|
|
194
202
|
|
|
195
203
|
💡 **Pro Tip**: Always start with `check_codebase_size` to get personalized recommendations for navigating your specific codebase.
|
|
196
204
|
|
|
205
|
+
**📖 Complete API Documentation**: [View all 11 tools with examples →](docs/api-reference.md)
|
|
206
|
+
|
|
197
207
|
## 🔗 Git Hook Integration
|
|
198
208
|
|
|
199
209
|
Keep your codebase documentation automatically synchronized with automated analysis on every commit:
|
|
@@ -250,21 +260,38 @@ See the **[Git Hook Setup Guide](docs/git-hook-setup.md)** for complete installa
|
|
|
250
260
|
|
|
251
261
|
## 📖 Documentation
|
|
252
262
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
###
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
263
|
+
Comprehensive documentation organized by user journey and expertise level.
|
|
264
|
+
|
|
265
|
+
### 🚀 Getting Started (New Users)
|
|
266
|
+
| Guide | Purpose | Time Investment |
|
|
267
|
+
|-------|---------|-----------------|
|
|
268
|
+
| **[Quick Start](#-quick-start)** | Install and run your first server | 2 minutes |
|
|
269
|
+
| **[Git Hook Setup](docs/git-hook-setup.md)** | Automate your workflow | 5 minutes |
|
|
270
|
+
| **[API Reference](docs/api-reference.md)** | Master all 11 MCP tools | 15 minutes |
|
|
271
|
+
|
|
272
|
+
### 🏗️ Production Deployment (Teams & Admins)
|
|
273
|
+
| Guide | Focus | Best For |
|
|
274
|
+
|-------|-------|----------|
|
|
275
|
+
| **[Configuration Guide](docs/configuration.md)** | Production setup & tuning | System administrators |
|
|
276
|
+
| **[Performance Tuning](docs/performance-tuning.md)** | High-concurrency optimization | DevOps teams |
|
|
277
|
+
| **[Monitoring & Diagnostics](docs/monitoring.md)** | Production monitoring | Operations teams |
|
|
278
|
+
|
|
279
|
+
### 🔧 Advanced Topics (Power Users)
|
|
280
|
+
| Guide | Depth | For |
|
|
281
|
+
|-------|-------|-----|
|
|
282
|
+
| **[Architecture Overview](docs/architecture.md)** | System design deep dive | Developers & architects |
|
|
283
|
+
| **[Database Resilience](docs/database-resilience.md)** | Advanced error handling | Senior developers |
|
|
284
|
+
| **[Contributing Guide](docs/contributing.md)** | Development workflow | Contributors |
|
|
285
|
+
|
|
286
|
+
### 📋 Quick References
|
|
287
|
+
- **[Examples & Integrations](examples/)** - Ready-to-use configurations
|
|
288
|
+
- **[Troubleshooting](#🚨-troubleshooting)** - Common issues & solutions
|
|
289
|
+
- **[API Tools Summary](#🛠️-mcp-tools-available)** - All 11 tools at a glance
|
|
290
|
+
|
|
291
|
+
**📚 Reading Paths:**
|
|
292
|
+
- **New to MCP Code Indexer?** Quick Start → Git Hooks → API Reference
|
|
293
|
+
- **Setting up for a team?** Configuration → Performance → Monitoring
|
|
294
|
+
- **Contributing to the project?** Architecture → Contributing → API Reference
|
|
268
295
|
|
|
269
296
|
## 🚦 System Requirements
|
|
270
297
|
|
|
@@ -468,22 +495,45 @@ mcp-code-indexer --dumpdescriptions PROJECT_ID
|
|
|
468
495
|
- **Error sanitization** to prevent information leakage
|
|
469
496
|
- **Async resource cleanup** to prevent memory leaks
|
|
470
497
|
|
|
498
|
+
## 🚨 Quick Troubleshooting
|
|
499
|
+
|
|
500
|
+
**Common issues and instant solutions:**
|
|
501
|
+
|
|
502
|
+
| Issue | Quick Fix | Learn More |
|
|
503
|
+
|-------|-----------|------------|
|
|
504
|
+
| **"No module named 'mcp_code_indexer'"** | `pip install -e .` (for development) | [Contributing Guide](docs/contributing.md#development-setup) |
|
|
505
|
+
| **"OPENROUTER_API_KEY not found"** | `export OPENROUTER_API_KEY="your-key"` | [Git Hook Setup](docs/git-hook-setup.md#prerequisites) |
|
|
506
|
+
| **"Database is locked"** | Enable WAL mode: `--enable-wal-mode` | [Performance Tuning](docs/performance-tuning.md#database-configuration) |
|
|
507
|
+
| **"Large codebase - use search"** | Normal for 200+ files. Use `search_descriptions` | [API Reference](docs/api-reference.md#search_descriptions) |
|
|
508
|
+
| **High memory usage** | Reduce token limit: `--token-limit 10000` | [Configuration Guide](docs/configuration.md#performance-tuning) |
|
|
509
|
+
|
|
510
|
+
**💡 Not finding your issue?** Check the [complete troubleshooting guides](docs/monitoring.md#troubleshooting-runbook) in our documentation.
|
|
511
|
+
|
|
471
512
|
## 🚀 Next Steps
|
|
472
513
|
|
|
473
514
|
Ready to supercharge your AI agents with intelligent codebase navigation?
|
|
474
515
|
|
|
475
|
-
###
|
|
476
|
-
1. **[Install and run your first server](#-quick-start)** - Get up and running in 2 minutes
|
|
477
|
-
2. **[Set up git hooks](docs/git-hook-setup.md)** - Automate your workflow
|
|
478
|
-
3. **[Configure for production](docs/configuration.md)** - Deploy for your team
|
|
479
|
-
|
|
480
|
-
### 👨💻 For Developers
|
|
481
|
-
4. **[Explore the API tools](docs/api-reference.md)** - Master all 11 MCP tools
|
|
482
|
-
5. **[Understand the architecture](docs/architecture.md)** - Deep dive into the technical design
|
|
516
|
+
### 🎯 Choose Your Path
|
|
483
517
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
518
|
+
**🆕 New to MCP Code Indexer?**
|
|
519
|
+
1. **[Install and run your first server](#-quick-start)** - Get up and running in 2 minutes
|
|
520
|
+
2. **[Set up git hooks](docs/git-hook-setup.md)** - Automate your workflow
|
|
521
|
+
3. **[Master the API tools](docs/api-reference.md)** - Learn all 11 tools with examples
|
|
522
|
+
|
|
523
|
+
**👥 Setting up for a team?**
|
|
524
|
+
1. **[Configure for production](docs/configuration.md)** - Production deployment guide
|
|
525
|
+
2. **[Performance optimization](docs/performance-tuning.md)** - High-concurrency setup
|
|
526
|
+
3. **[Monitoring & alerts](docs/monitoring.md)** - Production monitoring
|
|
527
|
+
|
|
528
|
+
**🔧 Want to contribute?**
|
|
529
|
+
1. **[Understand the architecture](docs/architecture.md)** - Technical deep dive
|
|
530
|
+
2. **[Development setup](docs/contributing.md)** - Contribution workflow
|
|
531
|
+
3. **[Report issues](https://github.com/fluffypony/mcp-code-indexer/issues)** - Share feedback and suggestions
|
|
532
|
+
|
|
533
|
+
**📚 Learning Resources:**
|
|
534
|
+
- **[Examples & integrations](examples/)** - Ready-to-use configurations
|
|
535
|
+
- **[Video tutorials](#)** - Coming soon!
|
|
536
|
+
- **[Community discussions](https://github.com/fluffypony/mcp-code-indexer/discussions)** - Ask questions and share tips
|
|
487
537
|
|
|
488
538
|
## 🤝 Contributing
|
|
489
539
|
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "mcp-code-indexer"
|
|
7
|
-
version = "3.
|
|
7
|
+
version = "3.6.0"
|
|
8
8
|
description = "MCP server that tracks file descriptions across codebases, enabling AI agents to efficiently navigate and understand code through searchable summaries and token-aware overviews."
|
|
9
9
|
authors = ["MCP Code Indexer Contributors"]
|
|
10
10
|
maintainers = ["MCP Code Indexer Contributors"]
|
|
@@ -54,6 +54,10 @@ aiohttp = ">=3.8.0"
|
|
|
54
54
|
tenacity = ">=8.0.0"
|
|
55
55
|
tomli = {version = ">=1.2.0", markers = "python_version < '3.11'"}
|
|
56
56
|
importlib-metadata = {version = ">=1.0.0", markers = "python_version < '3.8'"}
|
|
57
|
+
# HTTP transport dependencies
|
|
58
|
+
fastapi = ">=0.104.0"
|
|
59
|
+
uvicorn = ">=0.24.0"
|
|
60
|
+
python-multipart = ">=0.0.6"
|
|
57
61
|
|
|
58
62
|
[tool.poetry.group.dev.dependencies]
|
|
59
63
|
pytest = ">=8.0.0"
|
|
@@ -116,6 +116,41 @@ def parse_arguments() -> argparse.Namespace:
|
|
|
116
116
|
help="Create local database in specified folder and migrate project data from global DB",
|
|
117
117
|
)
|
|
118
118
|
|
|
119
|
+
# HTTP transport options
|
|
120
|
+
parser.add_argument(
|
|
121
|
+
"--http",
|
|
122
|
+
action="store_true",
|
|
123
|
+
help="Enable HTTP transport instead of stdio (requires 'http' extras)",
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
parser.add_argument(
|
|
127
|
+
"--host",
|
|
128
|
+
type=str,
|
|
129
|
+
default="127.0.0.1",
|
|
130
|
+
help="Host to bind HTTP server to (default: 127.0.0.1)",
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
parser.add_argument(
|
|
134
|
+
"--port",
|
|
135
|
+
type=int,
|
|
136
|
+
default=7557,
|
|
137
|
+
help="Port to bind HTTP server to (default: 7557)",
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
parser.add_argument(
|
|
141
|
+
"--auth-token",
|
|
142
|
+
type=str,
|
|
143
|
+
help="Bearer token for HTTP authentication (optional)",
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
parser.add_argument(
|
|
147
|
+
"--cors-origins",
|
|
148
|
+
type=str,
|
|
149
|
+
nargs="*",
|
|
150
|
+
default=["*"],
|
|
151
|
+
help="Allowed CORS origins for HTTP transport (default: allow all)",
|
|
152
|
+
)
|
|
153
|
+
|
|
119
154
|
return parser.parse_args()
|
|
120
155
|
|
|
121
156
|
|
|
@@ -961,10 +996,40 @@ async def main() -> None:
|
|
|
961
996
|
try:
|
|
962
997
|
# Import and run the MCP server
|
|
963
998
|
from .server.mcp_server import MCPCodeIndexServer
|
|
999
|
+
|
|
1000
|
+
# Create transport based on arguments
|
|
1001
|
+
transport = None
|
|
1002
|
+
if args.http:
|
|
1003
|
+
from .transport.http_transport import HTTPTransport
|
|
1004
|
+
transport = HTTPTransport(
|
|
1005
|
+
server_instance=None, # Will be set after server creation
|
|
1006
|
+
host=args.host,
|
|
1007
|
+
port=args.port,
|
|
1008
|
+
auth_token=args.auth_token,
|
|
1009
|
+
cors_origins=args.cors_origins,
|
|
1010
|
+
)
|
|
1011
|
+
logger.info(
|
|
1012
|
+
"HTTP transport configured",
|
|
1013
|
+
extra={
|
|
1014
|
+
"structured_data": {
|
|
1015
|
+
"host": args.host,
|
|
1016
|
+
"port": args.port,
|
|
1017
|
+
"auth_enabled": transport.auth_token is not None,
|
|
1018
|
+
"cors_origins": args.cors_origins,
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
)
|
|
964
1022
|
|
|
965
1023
|
server = MCPCodeIndexServer(
|
|
966
|
-
token_limit=args.token_limit,
|
|
1024
|
+
token_limit=args.token_limit,
|
|
1025
|
+
db_path=db_path,
|
|
1026
|
+
cache_dir=cache_dir,
|
|
1027
|
+
transport=transport,
|
|
967
1028
|
)
|
|
1029
|
+
|
|
1030
|
+
# Set server instance in transport after server creation
|
|
1031
|
+
if transport:
|
|
1032
|
+
transport.server = server
|
|
968
1033
|
|
|
969
1034
|
await server.run()
|
|
970
1035
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Middleware components for MCP Code Indexer.
|
|
3
|
+
|
|
4
|
+
This module provides middleware for HTTP transport features like
|
|
5
|
+
logging, authentication, and security.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .logging import HTTPLoggingMiddleware
|
|
9
|
+
from .auth import HTTPAuthMiddleware
|
|
10
|
+
from .security import HTTPSecurityMiddleware
|
|
11
|
+
|
|
12
|
+
__all__ = ["HTTPLoggingMiddleware", "HTTPAuthMiddleware", "HTTPSecurityMiddleware"]
|