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.
- package/LICENSE +21 -0
- package/README.md +130 -0
- package/data/gitlab-docs/documents.json +38252 -0
- package/data/gitlab-docs/index_meta.json +6 -0
- package/dist/bin.js +2 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +54 -0
- package/dist/config.js.map +1 -0
- package/dist/content/cache.d.ts +51 -0
- package/dist/content/cache.d.ts.map +1 -0
- package/dist/content/cache.js +60 -0
- package/dist/content/cache.js.map +1 -0
- package/dist/content/cache.test.d.ts +2 -0
- package/dist/content/cache.test.d.ts.map +1 -0
- package/dist/content/cache.test.js +58 -0
- package/dist/content/cache.test.js.map +1 -0
- package/dist/content/index.d.ts +3 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +3 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content/parser.d.ts +32 -0
- package/dist/content/parser.d.ts.map +1 -0
- package/dist/content/parser.js +72 -0
- package/dist/content/parser.js.map +1 -0
- package/dist/content/parser.test.d.ts +2 -0
- package/dist/content/parser.test.d.ts.map +1 -0
- package/dist/content/parser.test.js +71 -0
- package/dist/content/parser.test.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +92 -0
- package/dist/index.js.map +1 -0
- package/dist/search/document.d.ts +11 -0
- package/dist/search/document.d.ts.map +1 -0
- package/dist/search/document.js +47 -0
- package/dist/search/document.js.map +1 -0
- package/dist/search/engine.d.ts +41 -0
- package/dist/search/engine.d.ts.map +1 -0
- package/dist/search/engine.js +200 -0
- package/dist/search/engine.js.map +1 -0
- package/dist/search/flexsearch-wrapper.d.ts +51 -0
- package/dist/search/flexsearch-wrapper.d.ts.map +1 -0
- package/dist/search/flexsearch-wrapper.js +55 -0
- package/dist/search/flexsearch-wrapper.js.map +1 -0
- package/dist/search/index.d.ts +4 -0
- package/dist/search/index.d.ts.map +1 -0
- package/dist/search/index.js +4 -0
- package/dist/search/index.js.map +1 -0
- package/dist/tools/getDocPage.d.ts +8 -0
- package/dist/tools/getDocPage.d.ts.map +1 -0
- package/dist/tools/getDocPage.js +48 -0
- package/dist/tools/getDocPage.js.map +1 -0
- package/dist/tools/index.d.ts +5 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +5 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/listDocSections.d.ts +8 -0
- package/dist/tools/listDocSections.d.ts.map +1 -0
- package/dist/tools/listDocSections.js +17 -0
- package/dist/tools/listDocSections.js.map +1 -0
- package/dist/tools/registry.d.ts +14 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +64 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/registry.test.d.ts +2 -0
- package/dist/tools/registry.test.d.ts.map +1 -0
- package/dist/tools/registry.test.js +45 -0
- package/dist/tools/registry.test.js.map +1 -0
- package/dist/tools/searchGitLabDocs.d.ts +19 -0
- package/dist/tools/searchGitLabDocs.d.ts.map +1 -0
- package/dist/tools/searchGitLabDocs.js +25 -0
- package/dist/tools/searchGitLabDocs.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/models.d.ts +57 -0
- package/dist/types/models.d.ts.map +1 -0
- package/dist/types/models.js +41 -0
- package/dist/types/models.js.map +1 -0
- package/dist/utils/constants.d.ts +31 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +38 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/constants.test.d.ts +2 -0
- package/dist/utils/constants.test.d.ts.map +1 -0
- package/dist/utils/constants.test.js +16 -0
- package/dist/utils/constants.test.js.map +1 -0
- package/dist/utils/errors.d.ts +22 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +43 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/errors.test.d.ts +2 -0
- package/dist/utils/errors.test.d.ts.map +1 -0
- package/dist/utils/errors.test.js +55 -0
- package/dist/utils/errors.test.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +23 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +44 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/logger.test.d.ts +2 -0
- package/dist/utils/logger.test.d.ts.map +1 -0
- package/dist/utils/logger.test.js +71 -0
- package/dist/utils/logger.test.js.map +1 -0
- package/dist/utils/performance.d.ts +53 -0
- package/dist/utils/performance.d.ts.map +1 -0
- package/dist/utils/performance.js +130 -0
- package/dist/utils/performance.js.map +1 -0
- package/dist/utils/performance.test.d.ts +2 -0
- package/dist/utils/performance.test.d.ts.map +1 -0
- package/dist/utils/performance.test.js +75 -0
- package/dist/utils/performance.test.js.map +1 -0
- 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
|