@infograb/gitlab-openapi-mcp 1.0.1
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/.bunfig.toml +3 -0
- package/.changelogrc.js +1 -0
- package/.commitlintrc.js +1 -0
- package/.dockerignore +3 -0
- package/.editorconfig +16 -0
- package/.eslintignore +30 -0
- package/.eslintrc.js +1 -0
- package/.gitlab-ci.yml +117 -0
- package/.prettierignore +61 -0
- package/.prettierrc.js +1 -0
- package/.releaserc.js +1 -0
- package/.remarkrc.js +1 -0
- package/.stylelintrc.js +1 -0
- package/CHANGELOG.md +230 -0
- package/Dockerfile +17 -0
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/bin/start.js +20 -0
- package/docs/.dumirc.ts +56 -0
- package/docs/docs/changelog.md +9 -0
- package/docs/docs/data.ts +7 -0
- package/docs/docs/demo.tsx +7 -0
- package/docs/docs/index.md +7 -0
- package/docs/package.json +14 -0
- package/docs/tsconfig.json +29 -0
- package/main.js +31 -0
- package/next-env.d.ts +5 -0
- package/next.config.mjs +32 -0
- package/package.json +92 -0
- package/public/manifest-dev.json +27 -0
- package/public/manifest.json +27 -0
- package/public/openapi.json +5303 -0
- package/renovate.json +13 -0
- package/src/pages/api/gateway.ts +13 -0
- package/tsconfig.json +30 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "CommonJS",
|
|
4
|
+
"target": "ES5",
|
|
5
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
6
|
+
"sourceMap": true,
|
|
7
|
+
"skipDefaultLibCheck": true,
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"baseUrl": ".",
|
|
10
|
+
"allowSyntheticDefaultImports": true,
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"noImplicitReturns": true,
|
|
14
|
+
"noUnusedLocals": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"strict": true,
|
|
18
|
+
"paths": {
|
|
19
|
+
"@@/*": ["./dumi/tmp/*"],
|
|
20
|
+
"@/*": ["../src/*"]
|
|
21
|
+
},
|
|
22
|
+
"noEmit": true,
|
|
23
|
+
"incremental": true,
|
|
24
|
+
"esModuleInterop": true,
|
|
25
|
+
"isolatedModules": true
|
|
26
|
+
},
|
|
27
|
+
"exclude": ["node_modules"],
|
|
28
|
+
"include": [".", ".dumirc.ts", "../src"]
|
|
29
|
+
}
|
package/main.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
3
|
+
|
|
4
|
+
const app = express();
|
|
5
|
+
|
|
6
|
+
const target = 'http://localhost:3000';
|
|
7
|
+
|
|
8
|
+
// 프록시 미들웨어 생성
|
|
9
|
+
const proxy = createProxyMiddleware({
|
|
10
|
+
target,
|
|
11
|
+
changeOrigin: false, // 호스트를 직접 바꿀 예정이므로 false로 둠
|
|
12
|
+
selfHandleResponse: false,
|
|
13
|
+
onProxyReq(proxyReq, req, res) {
|
|
14
|
+
// 요청 헤더 중 Host 만 'localhost'로 강제 변경
|
|
15
|
+
proxyReq.setHeader('Host', 'localhost');
|
|
16
|
+
|
|
17
|
+
// Body를 직접 보내야 하는 경우가 있는데 대부분 http-proxy-middleware가 자동으로 처리함
|
|
18
|
+
// 참고로 multipart/form-data 등 streaming body도 자동 전달됨
|
|
19
|
+
},
|
|
20
|
+
onError(err, req, res) {
|
|
21
|
+
console.error('Proxy error:', err);
|
|
22
|
+
res.status(500).send('Proxy error');
|
|
23
|
+
},
|
|
24
|
+
logLevel: 'warn',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
app.use('*', proxy);
|
|
28
|
+
|
|
29
|
+
app.listen(8300, () => {
|
|
30
|
+
console.log('MCP Proxy is running on http://localhost:8300');
|
|
31
|
+
});
|
package/next-env.d.ts
ADDED
package/next.config.mjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** @type {import('next').NextConfig} */
|
|
2
|
+
const nextConfig = {
|
|
3
|
+
reactStrictMode: true,
|
|
4
|
+
transpilePackages: ['@lobehub/ui'],
|
|
5
|
+
eslint: {
|
|
6
|
+
ignoreDuringBuilds: true,
|
|
7
|
+
},
|
|
8
|
+
typescript: {
|
|
9
|
+
ignoreBuildErrors: true,
|
|
10
|
+
},
|
|
11
|
+
output: 'standalone',
|
|
12
|
+
async headers() {
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
// matching all API routes
|
|
16
|
+
source: '/:path*',
|
|
17
|
+
headers: [
|
|
18
|
+
{ key: 'Access-Control-Allow-Credentials', value: 'true' },
|
|
19
|
+
{ key: 'Access-Control-Allow-Origin', value: '*' },
|
|
20
|
+
{ key: 'Access-Control-Allow-Methods', value: 'GET,OPTIONS,PATCH,DELETE,POST,PUT' },
|
|
21
|
+
{
|
|
22
|
+
key: 'Access-Control-Allow-Headers',
|
|
23
|
+
value:
|
|
24
|
+
'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default nextConfig;
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@infograb/gitlab-openapi-mcp",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "GitLab OpenAPI MCP",
|
|
6
|
+
"homepage": "https://gitlab.com/innfograb/ai/gitlab-mcp-agent",
|
|
7
|
+
"repository": "https://gitlab.com/innfograb/ai/gitlab-mcp-agent.git",
|
|
8
|
+
"workspaces": [
|
|
9
|
+
"docs/*",
|
|
10
|
+
"./*"
|
|
11
|
+
],
|
|
12
|
+
"bin": {
|
|
13
|
+
"@infograb/gitlab-openapi-mcp": "bin/start.js"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "next build",
|
|
17
|
+
"ci": "npm run lint && npm run type-check",
|
|
18
|
+
"dev": "next dev -p 9200",
|
|
19
|
+
"docs:build": "cd docs && npm run build",
|
|
20
|
+
"docs:dev": "cd docs && npm run dev",
|
|
21
|
+
"lint": "eslint \"{src,api,docs}/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
22
|
+
"lint:md": "remark . --quiet --frail --output",
|
|
23
|
+
"lint:style": "stylelint \"src/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
24
|
+
"prepublishOnly": "npm run doctor && npm run build",
|
|
25
|
+
"prettier": "prettier -c --write \"**/**\"",
|
|
26
|
+
"release": "semantic-release",
|
|
27
|
+
"start": "next start",
|
|
28
|
+
"test": "vitest --passWithNoTests",
|
|
29
|
+
"test:coverage": "vitest --coverage --passWithNoTests",
|
|
30
|
+
"type-check": "tsc --noEmit",
|
|
31
|
+
"doctor": "npm doctor"
|
|
32
|
+
},
|
|
33
|
+
"lint-staged": {
|
|
34
|
+
"*.md": [
|
|
35
|
+
"remark --quiet --output --",
|
|
36
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
37
|
+
],
|
|
38
|
+
"*.json": [
|
|
39
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
40
|
+
],
|
|
41
|
+
"*.{js,jsx}": [
|
|
42
|
+
"prettier --write",
|
|
43
|
+
"stylelint --fix",
|
|
44
|
+
"eslint --fix"
|
|
45
|
+
],
|
|
46
|
+
"*.{ts,tsx}": [
|
|
47
|
+
"prettier --parser=typescript --write",
|
|
48
|
+
"stylelint --fix",
|
|
49
|
+
"eslint --fix"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"browserslist": [
|
|
53
|
+
"> 1%",
|
|
54
|
+
"last 2 versions",
|
|
55
|
+
"not ie <= 10"
|
|
56
|
+
],
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@lobehub/chat-plugin-sdk": "^1",
|
|
59
|
+
"@lobehub/chat-plugins-gateway": "^1",
|
|
60
|
+
"@lobehub/ui": "latest",
|
|
61
|
+
"antd": "^5",
|
|
62
|
+
"antd-style": "^3",
|
|
63
|
+
"dayjs": "^1",
|
|
64
|
+
"next": "13.4.7",
|
|
65
|
+
"react": "^18",
|
|
66
|
+
"react-dom": "^18",
|
|
67
|
+
"react-layout-kit": "^1"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@commitlint/cli": "^18",
|
|
71
|
+
"@lobehub/lint": "latest",
|
|
72
|
+
"@types/react": "18",
|
|
73
|
+
"@vercel/node": "^2",
|
|
74
|
+
"@vitest/coverage-v8": "latest",
|
|
75
|
+
"commitlint": "^18",
|
|
76
|
+
"cross-env": "^7",
|
|
77
|
+
"eslint": "^8",
|
|
78
|
+
"father": "4.3.1",
|
|
79
|
+
"lint-staged": "^15",
|
|
80
|
+
"prettier": "^3",
|
|
81
|
+
"remark": "^14",
|
|
82
|
+
"remark-cli": "^11",
|
|
83
|
+
"semantic-release": "^21",
|
|
84
|
+
"stylelint": "^15",
|
|
85
|
+
"typescript": "^5",
|
|
86
|
+
"vitest": "latest"
|
|
87
|
+
},
|
|
88
|
+
"peerDependencies": {
|
|
89
|
+
"react": ">=18",
|
|
90
|
+
"react-dom": ">=18"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/@lobehub/chat-plugin-sdk/schema.json",
|
|
3
|
+
"identifier": "gitlab-openapi-mcp",
|
|
4
|
+
"api": [],
|
|
5
|
+
"openapi": "http://localhost:9200/openapi.json",
|
|
6
|
+
"meta": {
|
|
7
|
+
"title": "GitLab Open API MCP",
|
|
8
|
+
"description": "이 플러그인은 GitLab OpenAPI 스펙을 기반으로 동작하는 MCP Agent입니다. GitLab의 다양한 기능을 OpenAPI를 통해 사용할 수 있도록 지원합니다.",
|
|
9
|
+
"avatar": "🦊"
|
|
10
|
+
},
|
|
11
|
+
"ui": {
|
|
12
|
+
"mode": "iframe",
|
|
13
|
+
"url": "http://localhost:9200/plugin-ui"
|
|
14
|
+
},
|
|
15
|
+
"settings": {
|
|
16
|
+
"properties": {
|
|
17
|
+
"Private-Token": {
|
|
18
|
+
"title": "GitLab Access Token",
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "GitLab Personal/Project Access Token"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"type": "object"
|
|
24
|
+
},
|
|
25
|
+
"gateway": "http://localhost:9200/api/gateway",
|
|
26
|
+
"version": "1.0.0"
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/@lobehub/chat-plugin-sdk/schema.json",
|
|
3
|
+
"identifier": "gitlab-openapi-mcp",
|
|
4
|
+
"api": [],
|
|
5
|
+
"openapi": "http://localhost:9200/gitlab-openapi-mcp/openapi.json",
|
|
6
|
+
"meta": {
|
|
7
|
+
"title": "GitLab Open API MCP",
|
|
8
|
+
"description": "이 플러그인은 GitLab OpenAPI 스펙을 기반으로 동작하는 MCP Agent입니다. GitLab의 다양한 기능을 OpenAPI를 통해 사용할 수 있도록 지원합니다.",
|
|
9
|
+
"avatar": "🦊"
|
|
10
|
+
},
|
|
11
|
+
"ui": {
|
|
12
|
+
"mode": "iframe",
|
|
13
|
+
"url": "http://localhost:9200/gitlab-openapi-mcp/plugin-ui"
|
|
14
|
+
},
|
|
15
|
+
"settings": {
|
|
16
|
+
"properties": {
|
|
17
|
+
"Private-Token": {
|
|
18
|
+
"title": "GitLab Access Token",
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "GitLab Personal/Project Access Token"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"type": "object"
|
|
24
|
+
},
|
|
25
|
+
"gateway": "http://localhost:9200/gitlab-openapi-mcp/api/gateway",
|
|
26
|
+
"version": "1.0.0"
|
|
27
|
+
}
|