The Mia-Platform Console MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with Mia-Platform Console APIs, enabling advanced automation and interaction capabilities for developers and tools.
- To run the server in a container, you will need to have Docker installed.
- Once Docker is installed, you will also need to ensure Docker is running.
- Lastly you will need to a way ot authenticate to your Mia-Platform Console installation, you either have to:
- Create a Mia-Platform Service Account with
Client Secret Basic
authorization mode (the only one supported at this time) theClient Secret Basic
one. - Use miactl authentication: if you have
miactl
installed you can run any command to login, the same session will then be used by the mcp server to authenticate.
- Create a Mia-Platform Service Account with
Warning
When using miactl session, auto-refresh by the MCP Server is not currently supported, once the session created with miactl expires you have to refresh it with miactl again.
Important
When using miactl session, the host you provide to the MCP Server MUST be the exact same as the one you have logged in with miactl, including scheme and any possible trailing slash.
To run the MCP server on your machine you can follow the instructions in the Setup Documentation
If you don't have Docker installed, you can use NPM and Node.js for running it locally. Once you have cloned the project you can run the commands:
npm ci
npm run build
These commands will install all the dependencies and then transpile the typescript code in the build
folder.
Once these steps are completed you can setup the MCP server using the node
command like the following:
{
"mcp": {
"servers": {
"mia-platform-console": {
"command": "node",
"args": [
"${workspaceFolder}/mcp-server",
"start",
"--stdio",
"--host=https://console.cloud.mia-platform.eu"
],
"env": {
"MIA_PLATFORM_CLIENT_ID": "<YOUR_CLIENT_ID>",
"MIA_PLATFORM_CLIENT_SECRET": "<YOUR_CLIEND_SECRET>"
}
}
}
}
}
To help with the development of the server you need Node.js installed on your machine.
The recommended way is to use a version manager like nvm or mise.
Once you have setup your environment with the correct Node.js version declared inside the .nvmrc
file you can run the
following command:
npm ci
Once has finished you will have all the dependencies installed on the project, then you have to prepare an environent file by copying the default.env file and edit it accordingly.
cp default.env .env
Finally to verify everything works, run:
set -a && source .env
npm run local:test
If you are not targeting the Console Cloud installation you can use the --host
flag and specify your own host
npm run local:test -- --host https://CONSOLE_HOST
This command will download and launch the MCP inspector on http://localhost:6274
where you can test if the
implementation will work correctly testing the tools discovery and calls without the needs of a working llm environment.
To run tests for new implementations you can use:
npm test
Or running a test for a single file run:
node --test --import tsx <FILE_PATH>