Skip to main content
Glama
README.md
# MCP-CLIO

A Model Context Protocol (MCP) server that exposes CLIO (Creatio CLI) commands as tools for AI agents.

## Features

- **Stateless HTTP MCP Server** - Streamable HTTP transport for reliable communication
- **Environment Management** - `clio-environment` tool for ping and restart operations
- **Raw Command Escape Hatch** - `clio-raw` tool for executing any CLIO command
- **Extensible Architecture** - Modular tool structure ready for additional CLIO commands

## Prerequisites

- Node.js >= 18
- [CLIO](https://github.com/Advance-Technologies-Foundation/clio) installed globally:
  ```bash
  dotnet tool install clio -g
  ```
- Registered Creatio environments (via `clio reg-web-app`)

## Installation

```bash
npm install
npm run build
```

## Usage

Start the server:

```bash
npm start
```

The server will listen on `http://localhost:3000/mcp` (configurable via `PORT` environment variable).

## Available Tools

### clio-environment

Manage Creatio environments:
- **ping** - Check environment health
- **restart** - Restart web application

Parameters:
- `command`: `"ping"` | `"restart"`
- `environment`: Environment name (registered via `clio reg-web-app`)

### clio-raw

Execute any CLIO command with custom arguments:

Parameters:
- `command`: Full command string (e.g., `"get-pkg-list -e myenv"`)

## Project Structure

```
mcp-clio/
├── src/
│   ├── index.ts              # Express server entry point
│   ├── server.ts             # MCP server factory
│   ├── clio/
│   │   └── executor.ts       # CLIO command executor
│   └── tools/
│       ├── environment.ts    # Environment management tools
│       ├── raw.ts            # Raw command escape hatch
│       └── *.ts              # Placeholder tool modules
├── package.json
├── tsconfig.json
└── PLAN.md                   # Implementation plan
```

## Testing with MCP Client

The project includes an `mcp.json` configuration for local testing. To use it:

1. Start the server in one terminal:
   ```bash
   npm start
   ```

2. In another application (Claude Desktop, etc.), reference this server using the `mcp.json` configuration:
   ```json
   {
     "mcpServers": {
       "mcp-clio": {
         "url": "http://localhost:3000/mcp"
       }
     }
   }
   ```

## Development

```bash
# Build TypeScript
npm run build

# Run after building
npm start

# Build and run
npm run dev
```

## License

MIT