Skip to content

Commit 5dbc3d1

Browse files
author
demetrio.marino
committed
Merge branch 'main' into feat/dotenv-support
2 parents 3d90747 + 6602d1e commit 5dbc3d1

File tree

25 files changed

+2688
-708
lines changed

25 files changed

+2688
-708
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "Node.js",
3-
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:3-22-bookworm",
44
"features": {
55
"ghcr.io/devcontainers/features/docker-in-docker:2": {
6-
"moby": true,
6+
"moby": false,
77
"installDockerComposeSwitch": false
88
}
99
},

.github/workflows/build-and-test.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,18 @@ jobs:
7878
with:
7979
show-progress: false
8080
- name: Docker Login to GitHub Repository
81-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
81+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
8282
with:
8383
registry: ghcr.io
8484
username: ${{ github.actor }}
8585
password: ${{ secrets.GITHUB_TOKEN }}
8686
- name: Docker Login to DockerHub
87-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
87+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
8888
with:
8989
username: ${{ secrets.BOT_DOCKER_USERNAME }}
9090
password: ${{ secrets.BOT_DOCKER_TOKEN }}
9191
- name: Docker Login to Mia registry
92-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
92+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
9393
with:
9494
registry: nexus.mia-platform.eu
9595
username: ${{ secrets.NEXUS_USER }}
@@ -100,7 +100,7 @@ jobs:
100100
platforms: amd64,arm64
101101
- name: Configure Docker Metadata
102102
id: meta
103-
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
103+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
104104
env:
105105
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
106106
with:
@@ -139,7 +139,7 @@ jobs:
139139
cache-from: type=gha
140140
cache-to: type=gha,mode=max
141141
- name: Install Cosign
142-
uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac # v3.9.1
142+
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
143143
if: github.ref_type == 'tag'
144144
- name: GCP Auth
145145
uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10
@@ -149,7 +149,7 @@ jobs:
149149
workload_identity_provider: ${{ secrets.MIA_PLATFORM_WIF }}
150150
create_credentials_file: true
151151
- name: Generate SBOM
152-
uses: anchore/sbom-action@cee1b8e05ae5b2593a75e197229729eabaa9f8ec # v0.20.2
152+
uses: anchore/sbom-action@da167eac915b4e86f08b264dbdbc867b61be6f0c # v0.20.5
153153
if: github.ref_type == 'tag'
154154
with:
155155
artifact-name: mcp-server-sbom.spdx.json

.github/workflows/codeql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
with:
2828
show-progress: false
2929
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
30+
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
3131
with:
3232
languages: javascript-typescript
3333
- name: Perform CodeQL Analysis
34-
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
34+
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0

.github/workflows/depedency-review.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
show-progress: false
2323
- name: Dependency Review
24-
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
24+
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3
2525
with:
2626
fail-on-severity: high
2727
fail-on-scopes: development,runtime,unknown

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:22.17.1-alpine@sha256:5539840ce9d013fa13e3b9814c9353024be7ac75aca5db6d039504a56c04ea59 AS builder
1+
FROM node:22.19.0-alpine@sha256:67bb653363ee5f3aa8b132cb3f800f202bb5fb244f7cf0669225737ee84d30cd AS builder
22

33
WORKDIR /app
44

@@ -13,7 +13,7 @@ RUN npm run build
1313
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev --ignore-scripts
1414
RUN rm -fr src tsconfig.* package-lock.json
1515

16-
FROM node:22.17.1-alpine@sha256:5539840ce9d013fa13e3b9814c9353024be7ac75aca5db6d039504a56c04ea59
16+
FROM node:22.19.0-alpine@sha256:67bb653363ee5f3aa8b132cb3f800f202bb5fb244f7cf0669225737ee84d30cd
1717

1818
WORKDIR /app
1919

docs/20_setup.md

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,24 @@
55
### Prerequisites
66

77
1. To run the server in a container, you will need to have [Docker] installed.
8-
2. Once Docker is installed, you will also need to ensure Docker is running.
9-
3. Pull the docker image `docker pull ghcr.io/mia-platform/console-mcp-server`
10-
4. Login to Mia-Platform. You have two options:
11-
- (a) *User Authentication* - Use miactl authentication: if you have [`miactl`][miactl] installed you can login and
12-
the same session will then be used by the mcp server to authenticate. To login just type `miactl company list`, or any other miactl command, the browser will be opened and you can use your credentatials to login. You will be able to access to all companies and projects that have been granted to your user.
13-
- (b) *Service Account* - [Create a Mia-Platform Service Account] with `Client Secret Basic` authorization mode (the only one supported at this time) the `Client Secret Basic` one. In that case you can access to just one company at a time.
14-
8+
1. Once Docker is installed, you will also need to ensure Docker is running.
9+
1. Pull the docker image `docker pull ghcr.io/mia-platform/console-mcp-server`
10+
1. Login to Mia-Platform. You have two options:
11+
- (a) *User Authentication* - Use miactl authentication: if you have [`miactl`][miactl] installed you can login and
12+
the same session will then be used by the mcp server to authenticate. To login just type `miactl company list`,
13+
or any other miactl command, the browser will be opened and you can use your credentials to login. You will be
14+
able to access to all companies and projects that have been granted to your user.
15+
- (b) *Service Account* - [Create a Mia-Platform Service Account] with `Client Secret Basic` authorization mode
16+
(the only one supported at this time) the `Client Secret Basic` one. In that case you can access to just one
17+
company at a time.
18+
19+
> [!WARNING]
20+
> When using miactl session, auto-refresh by the MCP Server is not currently supported,
21+
> once the session created with miactl expires you have to refresh it with miactl again.
22+
---
23+
> [!IMPORTANT]
24+
> When using miactl session, the host you provide to the MCP Server **MUST** be the exact same as the one
25+
> you have logged in with miactl, including scheme and any possible trailing slash.
1526
1627
### VS Code
1728

@@ -26,7 +37,7 @@ The `mcp` key is not needed in the `.vscode/mcp.json` file.
2637
Also note that you can change the host of the Console instance to your custom installation
2738
:::
2839

29-
This is the configuration if you are using mictl (a)
40+
This is the configuration if you are using miactl (a)
3041

3142
```json
3243
{
@@ -52,7 +63,6 @@ This is the configuration if you are using mictl (a)
5263
}
5364
```
5465

55-
5666
This is the configuration if you are using Service Account (b)
5767

5868
```json
@@ -139,6 +149,41 @@ More about using MCP server tools in [VS Code's agent mode documentation].
139149
}
140150
```
141151

152+
### Gemini CLI
153+
154+
Add `mia-platform-console` in `mcpServers` in file `~/.gemini/settings.json`.
155+
156+
```json
157+
{
158+
"mcpServers": {
159+
"mia-platform-console": {
160+
"command": "docker",
161+
"args": [
162+
"run",
163+
"-i",
164+
"--rm",
165+
"-e",
166+
"MIA_PLATFORM_CLIENT_ID",
167+
"-e",
168+
"MIA_PLATFORM_CLIENT_SECRET",
169+
"ghcr.io/mia-platform/console-mcp-server",
170+
"mcp-server",
171+
"start",
172+
"--stdio",
173+
"--host=https://console.cloud.mia-platform.eu"
174+
],
175+
"env": {
176+
"MIA_PLATFORM_CLIENT_ID": "<YOUR_CLIENT_ID>",
177+
"MIA_PLATFORM_CLIENT_SECRET": "<YOUR_CLIEND_SECRET>"
178+
}
179+
}
180+
...
181+
}
182+
...
183+
}
184+
```
185+
142186
[Docker]: https://www.docker.com/
143187
[miactl]: https://github.com/mia-platform/miactl
144188
[VS Code's agent mode documentation]: https://code.visualstudio.com/docs/copilot/chat/mcp-servers
189+
[Create a Mia-Platform Service Account]: https://docs.mia-platform.eu/docs/development_suite/identity-and-access-management/manage-service-accounts

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default tseslint.config(
6464
'error',
6565
'single',
6666
{
67-
allowTemplateLiterals: true,
67+
allowTemplateLiterals: "always",
6868
},
6969
],
7070
'@stylistic/quote-props': [

0 commit comments

Comments
 (0)