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 Basicauthorization mode (the only one supported at this time) theClient Secret Basicone. - Use miactl authentication: if you have
miactlinstalled 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 buildThese commands will install all the dependencies and then transpile the typescript code in the build folder.
Note
The server automatically loads environment variables from a .env file if present in the project root.
You can create one by copying default.env to .env and updating the values as needed.
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>"
}
}
}
}
}Tip
If you have a .env file configured with your credentials, you can omit the env section from the configuration above as the server will automatically load the environment variables.
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 ciOnce has finished you will have all the dependencies installed on the project, then you have to prepare an environment file by copying the default.env file and edit it accordingly.
cp default.env .envFinally to verify everything works, run:
npm run local:testIf 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_HOSTThis command will download and launch the MCP inspector on http://localhost:6274 where you can test if the
implementation will work correctly testing the discovery of tools and prompts without the needs of a working llm environment.
To run tests for new implementations you can use:
npm testOr running a test for a single file run:
node --test --import tsx <FILE_PATH>