This project implements an independently-developed CipherTrust MCP (Model Context Protocol) server that allows AI Assistants like Claude or Cursor to interact with CipherTrust Manager resources using the ksctl CLI. - Important Notice - Prerequisites - Installation - Configuration - Integration with AI Assistants - Environment Variables - Troubleshooting - Project Structure - Contributing This is a
Add this skill
npx mdskills install sanyambassi/ciphertrust-manager-mcp-serverComprehensive MCP server with excellent setup docs and extensive CipherTrust Manager tool coverage
1# CipherTrust Manager MCP Server23This project implements an independently-developed CipherTrust MCP (Model Context Protocol) server that allows AI Assistants like Claude or Cursor to interact with CipherTrust Manager resources using the ksctl CLI.45## Table of Contents67- [Important Notice](#important-notice)8- [Features](#features)9- [Prerequisites](#prerequisites)10- [Installation](#installation)11- [Configuration](#configuration)12- [Usage](#usage)13- [Testing](#testing)14- [Integration with AI Assistants](#integration-with-ai-assistants)15- [Environment Variables](#environment-variables)16- [Troubleshooting](#troubleshooting)17- [Project Structure](#project-structure)18- [Contributing](#contributing)19- [Legal](#legal)20- [License](#license)2122## Important Notice2324This is an **independent, open-source project**. Please note:2526- ⚠️ **Not officially supported** by Thales27- ✅ **Uses public APIs** and documented interfaces28- 🔧 **Independently maintained**29- 📝 **Use at your own risk** - test thoroughly in your environment30- 💼 **No warranty** - see license for full terms3132For official CipherTrust Manager support, please contact Thales directly.3334## Features3536The MCP server exposes a set of tools and endpoints for clients (such as Claude Desktop and Cursor) to interact with CipherTrust resources. Supported operations include:3738- Key management39- CTE client management40- User management41- Connection management42- And more4344**Benefits:**45- Unified interface for AI assistants to interact with CipherTrust Manager46- Support for key management, connection management, CTE client management, and more47- JSON-RPC communication over stdin/stdout48- Configurable via environment variables4950## Prerequisites5152- **Git**53- **Python 3.11 or higher**54- **uv** for dependency management55- **Access to a CipherTrust Manager instance**5657### Installing Git (Windows)5859If you don't have Git installed on Windows, follow these steps:6061- **Download and install Git for Windows**: [https://git-scm.com/download/win](https://git-scm.com/download/win)62- **Or install via winget**:63 ```bash64 winget install --id Git.Git -e --source winget65 ```66- **Verify installation** - Open PowerShell and execute:67 ```bash68 git --version69 ```70 You should see the installed Git version.7172## Installing Python and uv7374### Method 1: Manual Installation7576#### 1. Download Python77```powershell78# Open PowerShell as Administrator (optional)79cd $env:USERPROFILE\Downloads80Invoke-WebRequest -Uri "https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe" -OutFile "python-installer.exe"81```8283#### 2. Run the Installer84```powershell85.\python-installer.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=086```8788#### 3. Verify Installation89Open a new terminal and run:90```bash91python --version92pip --version93```9495#### 4. Install uv96```bash97pip install uv98uv --version99```100101#### 5. Clone the Repository102```bash103git clone https://github.com/sanyambassi/ciphertrust-manager-mcp-server.git104cd ciphertrust-manager-mcp-server105```106107#### 6. Create a Virtual Environment and Install Dependencies108```bash109uv venv110.venv\Scripts\activate111uv pip install -e .112```113114### Method 2: Using winget (Windows)115116#### 1. Install Python with winget117```bash118winget install --id Python.Python.3.12 --source winget --accept-package-agreements --accept-source-agreements119```120121#### 2. Close and Reopen PowerShell122This ensures Python is available in your PATH.123124#### 3. Verify Installation125```bash126python --version127pip --version128```129130#### 4. Install uv131```bash132pip install uv133uv --version134```135136#### 5. Clone the Repository137```bash138git clone https://github.com/sanyambassi/ciphertrust-manager-mcp-server.git139cd ciphertrust-manager-mcp-server140```141142#### 6. Create a Virtual Environment and Install Dependencies143```bash144uv venv145.venv\Scripts\activate146uv pip install -e .147```148149## Configuration150151### (Optional) Copy and Edit the Example Environment File152153**Example `.env`:**154```bash155cp .env.example .env156# Edit .env with your CipherTrust Manager details157```158159You can also set these as environment variables directly instead of using a `.env` file.160161**Example `.env` content:**162```163CIPHERTRUST_URL=https://your-ciphertrust-manager.example.com164CIPHERTRUST_USER=admin165CIPHERTRUST_PASSWORD=your-password-here166CIPHERTRUST_NOSSLVERIFY=true167```168169## Usage170171**⚠️ Important:** Before starting, either the environment variable or .env should contain a valid CipherTrust Manager URL.172173You have two main ways to run the CipherTrust MCP Server:174175### Method 1: Direct Execution176```bash177uv run ciphertrust-mcp-server178```179This runs the `main()` function in `ciphertrust_mcp_server/__main__.py`.180181### Method 2: Module Execution182```bash183uv run python -m ciphertrust_mcp_server.__main__184```185186## Testing187188This project includes comprehensive testing capabilities using the Model Context Protocol Inspector and Python unit tests.189190### Quick Testing191192```bash193# Manual JSON-RPC testing (direct stdin/stdout)194uv run ciphertrust-mcp-server195# Then send JSON-RPC commands (see TESTING.md for details)196197# Interactive UI testing (opens browser interface)198npx @modelcontextprotocol/inspector uv run ciphertrust-mcp-server199200# Quick CLI testing201# Get tools202npx @modelcontextprotocol/inspector --cli --config tests/mcp_inspector_config.json --server ciphertrust-local --method tools/list203# Get system information204npx @modelcontextprotocol/inspector --cli --config tests/mcp_inspector_config.json --server ciphertrust-local --method tools/call --tool-name system_information --tool-arg action=get205# Get 2 keys206npx @modelcontextprotocol/inspector --cli --config tests/mcp_inspector_config.json --server ciphertrust-local --method tools/call --tool-name key_management --tool-arg action=list --tool-arg limit=2207```208209### Available Testing Methods210211- **🔧 Manual JSON-RPC Testing**: Direct stdin/stdout communication for debugging and development212- **🖥️ Interactive UI Testing**: Visual web interface for manual testing and debugging213- **⚡ CLI Automated Testing**: Command-line automation for CI/CD integration214- **🧪 Python Unit Tests**: Comprehensive unit testing for server components215- **🔗 Integration Tests**: End-to-end testing with real CipherTrust Manager instances216217### NPM Scripts218219After creating a `package.json` file:220221```bash222npm run test:inspector:ui # Open interactive testing interface223npm run test:inspector:cli # Run automated CLI tests224npm run test:python # Run Python unit tests225npm run test:full # Run complete test suite226```227228### Comprehensive Testing Guide229230📖 **For detailed testing instructions, see [TESTING.md](docs/TESTING.md)**231232🔧 **For example AI assistant prompts, see [EXAMPLE_PROMPTS.md](docs/EXAMPLE_PROMPTS.md)**233234The testing guide covers:235- Complete setup and configuration236- Advanced testing scenarios237238239The example prompts include:240- Key management operations241- User and group management242- System and service management243- Cluster management244- License management245- CTE operations246- Crypto operations247- And more practical scenarios248249## Integration with AI Assistants250251### Using with Cursor252253#### 1. Configure Cursor254- Go to **Settings > MCP Tools > Add Custom MCP**255- Add the following contents in the config file (e.g., `mcp.json`):256257```json258{259 "mcpServers": {260 "ciphertrust": {261 "command": "Path to your project folder/ciphertrust-manager-mcp-server/.venv/bin/ciphertrust-mcp-server",262 "args": [],263 "env": {264 "CIPHERTRUST_URL": "https://your-ciphertrust.example.com",265 "CIPHERTRUST_USER": "admin",266 "CIPHERTRUST_PASSWORD": "your-password-here"267 }268 }269 }270}271```272273On Windows, use the `.venv\Scripts\ciphertrust-mcp-server.exe` path and double backslashes:274275```json276{277 "mcpServers": {278 "ciphertrust": {279 "command": "C:\\path\\to\\ciphertrust-manager-mcp-server\\.venv\\Scripts\\ciphertrust-mcp-server",280 "args": [],281 "env": {282 "CIPHERTRUST_URL": "https://your-ciphertrust.example.com",283 "CIPHERTRUST_USER": "admin",284 "CIPHERTRUST_PASSWORD": "your-password-here"285 }286 }287 }288}289```290291#### 2. Apply Configuration292Disable and Re-enable the CipherTrust MCP server in Cursor to apply the changes.293294### Using with Claude Desktop295296#### 1. Locate or create the Claude Desktop config file:297- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`298- **Windows**: `%APPDATA%\Roaming\Claude\claude_desktop_config.json`299300#### 2. Add or update the MCP server configuration:301302**macOS/Linux Example:**303```json304{305 "mcpServers": {306 "ciphertrust": {307 "command": "/absolute/path/to/ciphertrust-manager-mcp-server/.venv/bin/ciphertrust-mcp-server",308 "env": {309 "CIPHERTRUST_URL": "https://your-ciphertrust.example.com",310 "CIPHERTRUST_USER": "admin",311 "CIPHERTRUST_PASSWORD": "your-password-here"312 }313 }314 }315}316```317318**Windows Example:**319```json320{321 "mcpServers": {322 "ciphertrust": {323 "command": "C:\\absolute\\path\\to\\ciphertrust-manager-mcp-server\\.venv\\Scripts\\ciphertrust-mcp-server",324 "env": {325 "CIPHERTRUST_URL": "https://your-ciphertrust.example.com",326 "CIPHERTRUST_USER": "admin",327 "CIPHERTRUST_PASSWORD": "your-password-here"328 }329 }330 }331}332```333334Adjust the path to match your actual project location and environment.335336#### 3. Restart Claude Desktop337Restart Claude Desktop to apply the changes.338339## Environment Variables340341Set these in your shell or in a `.env` file in the project root:342343| Variable Name | Description | Required/Default |344|---|---|---|345| `CIPHERTRUST_URL` | CipherTrust Manager URL (http/https) | Required |346| `CIPHERTRUST_USER` | CipherTrust Manager username | Required |347| `CIPHERTRUST_PASSWORD` | CipherTrust Manager password | Required |348| `CIPHERTRUST_NOSSLVERIFY` | Disable SSL verification (true/false) | `false` |349| `CIPHERTRUST_TIMEOUT` | Timeout for CipherTrust requests (seconds) | `30` |350| `CIPHERTRUST_DOMAIN` | Default CipherTrust domain | `root` |351| `CIPHERTRUST_AUTH_DOMAIN` | Authentication domain | `root` |352| `KSCTL_PATH` | Path to ksctl binary | `~/.ciphertrust-mcp/ksctl` |353| `KSCTL_CONFIG_PATH` | Path to ksctl config file | `~/.ksctl/config.yaml` |354| `LOG_LEVEL` | Logging level (DEBUG, INFO) | `INFO` |355356**Example `.env` file:**357```bash358CIPHERTRUST_URL=https://your-ciphertrust.example.com359CIPHERTRUST_USER=admin360CIPHERTRUST_PASSWORD=yourpassword361CIPHERTRUST_NOSSLVERIFY=false362CIPHERTRUST_TIMEOUT=30363CIPHERTRUST_DOMAIN=root364CIPHERTRUST_AUTH_DOMAIN=root365KSCTL_PATH=366KSCTL_CONFIG_PATH=367LOG_LEVEL=INFO368```369370## Troubleshooting371372### Successful startup logs:373374- The server is designed to be run as a subprocess by MCP clients (like Claude Desktop or Cursor) and communicates via JSON-RPC over stdin/stdout.375- You'll see log output like in the AI assistant's MCP log:376377```3782025-06-16 02:22:30,462 - ciphertrust_mcp_server.server - INFO - Starting ciphertrust-manager v0.1.03792025-06-16 02:22:30,838 - ciphertrust_mcp_server.server - INFO - Successfully connected to CipherTrust Manager3802025-06-16 02:22:30,838 - ciphertrust_mcp_server.server - INFO - MCP server ready and waiting for JSON-RPC messages on stdin...381```382383### Dependencies384385The `pyproject.toml` file includes these dependencies:386- `mcp>=1.0.0`387- `pydantic>=2.0.0`388- `pydantic-settings>=2.0.0`389- `httpx>=0.27.0`390- `python-dotenv>=1.0.0`391392If you encounter issues, ensure all dependencies are installed and up-to-date.393394## Project Structure395396```397ciphertrust-manager-mcp-server/398├── src399│ ├── ciphertrust_mcp_server/ # Main server code400├── tests/ # Testing configuration and unit tests401│ ├── mcp_inspector_config.json402│ ├── test_scenarios.json403│ ├── test_server.py404│ └── test_integration_simple.py405├── scripts/ # Testing and utility scripts406│ ├── test_with_inspector.bat407│ ├── test_with_inspector.sh408│ └── run_tests.py409├── docs/ # Additional documentation410│ ├── TESTING.md411│ ├── EXAMPLE_PROMPTS.md412│ └── TOOLS.md413├── README.md # This file414├── pyproject.toml # Python dependencies415└── package.json # Node.js dependencies for testing416```417418## Contributing419420Contributions are welcome! Please feel free to submit a Pull Request. While this started as a personal project, contributions help make it better for everyone.421422## Legal423424### Trademark Notice425CipherTrust® and related trademarks are the property of Thales Group and its subsidiaries. This project is not affiliated with, endorsed by, or sponsored by Thales Group.426427### No Warranty428This software is provided "as is" without warranty of any kind. Use at your own risk.429430### Support431This is an independent project. For official CipherTrust Manager support, please contact Thales directly. For issues with this unofficial MCP server, please use the GitHub issue tracker.432433## License434435This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.436437---
Full transparency — inspect the skill content before installing.