gitlab-docs-mcp 1.0.0

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.
Files changed (118) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +130 -0
  3. package/data/gitlab-docs/documents.json +38252 -0
  4. package/data/gitlab-docs/index_meta.json +6 -0
  5. package/dist/bin.js +2 -0
  6. package/dist/config.d.ts +24 -0
  7. package/dist/config.d.ts.map +1 -0
  8. package/dist/config.js +54 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/content/cache.d.ts +51 -0
  11. package/dist/content/cache.d.ts.map +1 -0
  12. package/dist/content/cache.js +60 -0
  13. package/dist/content/cache.js.map +1 -0
  14. package/dist/content/cache.test.d.ts +2 -0
  15. package/dist/content/cache.test.d.ts.map +1 -0
  16. package/dist/content/cache.test.js +58 -0
  17. package/dist/content/cache.test.js.map +1 -0
  18. package/dist/content/index.d.ts +3 -0
  19. package/dist/content/index.d.ts.map +1 -0
  20. package/dist/content/index.js +3 -0
  21. package/dist/content/index.js.map +1 -0
  22. package/dist/content/parser.d.ts +32 -0
  23. package/dist/content/parser.d.ts.map +1 -0
  24. package/dist/content/parser.js +72 -0
  25. package/dist/content/parser.js.map +1 -0
  26. package/dist/content/parser.test.d.ts +2 -0
  27. package/dist/content/parser.test.d.ts.map +1 -0
  28. package/dist/content/parser.test.js +71 -0
  29. package/dist/content/parser.test.js.map +1 -0
  30. package/dist/index.d.ts +3 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +92 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/search/document.d.ts +11 -0
  35. package/dist/search/document.d.ts.map +1 -0
  36. package/dist/search/document.js +47 -0
  37. package/dist/search/document.js.map +1 -0
  38. package/dist/search/engine.d.ts +41 -0
  39. package/dist/search/engine.d.ts.map +1 -0
  40. package/dist/search/engine.js +200 -0
  41. package/dist/search/engine.js.map +1 -0
  42. package/dist/search/flexsearch-wrapper.d.ts +51 -0
  43. package/dist/search/flexsearch-wrapper.d.ts.map +1 -0
  44. package/dist/search/flexsearch-wrapper.js +55 -0
  45. package/dist/search/flexsearch-wrapper.js.map +1 -0
  46. package/dist/search/index.d.ts +4 -0
  47. package/dist/search/index.d.ts.map +1 -0
  48. package/dist/search/index.js +4 -0
  49. package/dist/search/index.js.map +1 -0
  50. package/dist/tools/getDocPage.d.ts +8 -0
  51. package/dist/tools/getDocPage.d.ts.map +1 -0
  52. package/dist/tools/getDocPage.js +48 -0
  53. package/dist/tools/getDocPage.js.map +1 -0
  54. package/dist/tools/index.d.ts +5 -0
  55. package/dist/tools/index.d.ts.map +1 -0
  56. package/dist/tools/index.js +5 -0
  57. package/dist/tools/index.js.map +1 -0
  58. package/dist/tools/listDocSections.d.ts +8 -0
  59. package/dist/tools/listDocSections.d.ts.map +1 -0
  60. package/dist/tools/listDocSections.js +17 -0
  61. package/dist/tools/listDocSections.js.map +1 -0
  62. package/dist/tools/registry.d.ts +14 -0
  63. package/dist/tools/registry.d.ts.map +1 -0
  64. package/dist/tools/registry.js +64 -0
  65. package/dist/tools/registry.js.map +1 -0
  66. package/dist/tools/registry.test.d.ts +2 -0
  67. package/dist/tools/registry.test.d.ts.map +1 -0
  68. package/dist/tools/registry.test.js +45 -0
  69. package/dist/tools/registry.test.js.map +1 -0
  70. package/dist/tools/searchGitLabDocs.d.ts +19 -0
  71. package/dist/tools/searchGitLabDocs.d.ts.map +1 -0
  72. package/dist/tools/searchGitLabDocs.js +25 -0
  73. package/dist/tools/searchGitLabDocs.js.map +1 -0
  74. package/dist/types/index.d.ts +2 -0
  75. package/dist/types/index.d.ts.map +1 -0
  76. package/dist/types/index.js +2 -0
  77. package/dist/types/index.js.map +1 -0
  78. package/dist/types/models.d.ts +57 -0
  79. package/dist/types/models.d.ts.map +1 -0
  80. package/dist/types/models.js +41 -0
  81. package/dist/types/models.js.map +1 -0
  82. package/dist/utils/constants.d.ts +31 -0
  83. package/dist/utils/constants.d.ts.map +1 -0
  84. package/dist/utils/constants.js +38 -0
  85. package/dist/utils/constants.js.map +1 -0
  86. package/dist/utils/constants.test.d.ts +2 -0
  87. package/dist/utils/constants.test.d.ts.map +1 -0
  88. package/dist/utils/constants.test.js +16 -0
  89. package/dist/utils/constants.test.js.map +1 -0
  90. package/dist/utils/errors.d.ts +22 -0
  91. package/dist/utils/errors.d.ts.map +1 -0
  92. package/dist/utils/errors.js +43 -0
  93. package/dist/utils/errors.js.map +1 -0
  94. package/dist/utils/errors.test.d.ts +2 -0
  95. package/dist/utils/errors.test.d.ts.map +1 -0
  96. package/dist/utils/errors.test.js +55 -0
  97. package/dist/utils/errors.test.js.map +1 -0
  98. package/dist/utils/index.d.ts +5 -0
  99. package/dist/utils/index.d.ts.map +1 -0
  100. package/dist/utils/index.js +5 -0
  101. package/dist/utils/index.js.map +1 -0
  102. package/dist/utils/logger.d.ts +23 -0
  103. package/dist/utils/logger.d.ts.map +1 -0
  104. package/dist/utils/logger.js +44 -0
  105. package/dist/utils/logger.js.map +1 -0
  106. package/dist/utils/logger.test.d.ts +2 -0
  107. package/dist/utils/logger.test.d.ts.map +1 -0
  108. package/dist/utils/logger.test.js +71 -0
  109. package/dist/utils/logger.test.js.map +1 -0
  110. package/dist/utils/performance.d.ts +53 -0
  111. package/dist/utils/performance.d.ts.map +1 -0
  112. package/dist/utils/performance.js +130 -0
  113. package/dist/utils/performance.js.map +1 -0
  114. package/dist/utils/performance.test.d.ts +2 -0
  115. package/dist/utils/performance.test.d.ts.map +1 -0
  116. package/dist/utils/performance.test.js +75 -0
  117. package/dist/utils/performance.test.js.map +1 -0
  118. package/package.json +75 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ozanmutlu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,130 @@
1
+ # GitLab Docs MCP Server
2
+
3
+ A Model Context Protocol server that provides AI assistants instant access to GitLab's official documentation.
4
+
5
+ ## Installation
6
+
7
+ This server works with any MCP-compatible AI assistant including GitHub Copilot, Claude Desktop, and other MCP clients.
8
+
9
+ ### GitHub Copilot (VS Code)
10
+
11
+ **1. Open VS Code Settings** (<kbd>⌘</kbd>+<kbd>,</kbd> or <kbd>Ctrl</kbd>+<kbd>,</kbd>)
12
+
13
+ **2. Add to `settings.json`:**
14
+
15
+ ```json
16
+ {
17
+ "github.copilot.chat.mcp.servers": {
18
+ "gitlab-docs": {
19
+ "command": "npx",
20
+ "args": ["-y", "gitlab-docs-mcp"]
21
+ }
22
+ }
23
+ }
24
+ ```
25
+
26
+ **3. Restart VS Code**
27
+
28
+ ### Claude Desktop
29
+
30
+ Add to your Claude Desktop configuration file:
31
+
32
+ **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
33
+ **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "gitlab-docs": {
39
+ "command": "npx",
40
+ "args": ["-y", "gitlab-docs-mcp"]
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ Restart Claude Desktop.
47
+
48
+ ### Other MCP Clients
49
+
50
+ For other MCP-compatible clients, use:
51
+ ```bash
52
+ npx -y gitlab-docs-mcp
53
+ ```
54
+
55
+ ## Usage
56
+
57
+ Ask your AI assistant about GitLab documentation:
58
+
59
+ ```
60
+ Search GitLab docs for CI/CD pipeline configuration
61
+ Show me GitLab Runner installation steps
62
+ How do I configure GitLab authentication?
63
+ Explain GitLab API rate limits
64
+ ```
65
+
66
+ ## Available Tools
67
+
68
+ ### `searchGitLabDocs`
69
+ Search across 2,494 GitLab documentation pages with intelligent ranking.
70
+
71
+ **Parameters:**
72
+ - `query` - Search terms
73
+ - `maxResults` - Maximum results (default: 10, max: 50)
74
+ - `section` - Filter by section: ci, api, user, admin, development
75
+
76
+ ### `getDocPage`
77
+ Retrieve the complete content of a specific documentation page.
78
+
79
+ **Parameters:**
80
+ - `path` - Document path (e.g., "ci/yaml/README.md")
81
+
82
+ ### `listDocSections`
83
+ Browse available documentation sections and their structure.
84
+
85
+ ## Troubleshooting
86
+
87
+ **Server not responding?**
88
+ - Ensure Node.js 18+ is installed: `node --version`
89
+ - Restart your AI assistant/client completely
90
+ - Check application logs for MCP connection errors
91
+
92
+ **Need to update documentation?**
93
+ The server uses a pre-built index. For the latest GitLab docs, rebuild from source:
94
+ ```bash
95
+ git clone <repository-url>
96
+ cd gitlab-docs-mcp
97
+ npm install
98
+ npm run build-index
99
+ npm run build
100
+ ```
101
+
102
+ Then update your MCP client configuration to use the local build:
103
+
104
+ **GitHub Copilot:**
105
+ ```json
106
+ {
107
+ "github.copilot.chat.mcp.servers": {
108
+ "gitlab-docs": {
109
+ "command": "node",
110
+ "args": ["/absolute/path/to/gitlab-docs-mcp/dist/index.js"]
111
+ }
112
+ }
113
+ }
114
+ ```
115
+
116
+ **Claude Desktop:**
117
+ ```json
118
+ {
119
+ "mcpServers": {
120
+ "gitlab-docs": {
121
+ "command": "node",
122
+ "args": ["/absolute/path/to/gitlab-docs-mcp/dist/index.js"]
123
+ }
124
+ }
125
+ }
126
+ ```
127
+
128
+ ## License
129
+
130
+ MIT