MCP server for Cloudeka CLI (cldkctl) integration with authentication support
Project description
MCP cldkctl Server
This is a Model Context Protocol (MCP) server that provides integration with the Cloudeka CLI (cldkctl) for use in AI assistants like Claude Desktop and Cursor.
Features
The MCP server exposes the following cldkctl commands as tools:
- Authentication: Login and token management
- Balance: View project balances
- Billing: View billing details
- Kubernetes: Manage Kubernetes resources (pods, deployments, services, etc.)
- Organization: Manage organization details and members
- Profile: View and manage user profile
- Project: View and manage projects
- Registry: Manage container registry
- VMs: Manage virtual machines
- Voucher: Manage vouchers and credits
- Notebook: Manage notebooks
- Audit Logs: View activity logs
Prerequisites
Installation
Quick Install
# Clone the repository
git clone <repository-url>
cd mcp_cldkctl
# Run the installation script
# On Windows:
.\install.ps1
# On Unix/Linux/macOS:
./install.sh
Manual Installation
# Clone the repository
git clone <repository-url>
cd mcp_cldkctl
# Install dependencies using uv
uv sync
# Install the package
uv pip install -e .
Usage
Running the MCP Server
# Run with stdio transport (default)
uvx mcp-cldkctl
# Run with SSE transport
uvx mcp-cldkctl --transport sse --port 8000
# Specify custom cldkctl path
uvx mcp-cldkctl --cldkctl-path /path/to/cldkctl
Configuration
The server will use the same configuration as your cldkctl CLI. Make sure you have:
- Authenticated with
cldkctl auth - Set up your default project, organization, and other preferences
- The cldkctl binary available in your PATH
Integration with Cursor
Add this to your Cursor MCP configuration:
{
"mcpServers": {
"cldkctl": {
"command": "uvx",
"args": ["mcp-cldkctl"]
}
}
}
Integration with Claude Desktop
Add this to your Claude Desktop MCP configuration:
{
"mcpServers": {
"cldkctl": {
"command": "uvx",
"args": ["mcp-cldkctl"]
}
}
}
Testing
Run the test script to verify your installation:
python test_server.py
This will:
- Check if cldkctl is available
- Test basic command execution
- Show you the Cursor configuration
Available Tools
Authentication
auth: Authenticate with Cloudeka service using token
Balance & Billing
balance: View balance for each projectbilling: View project billing details
Kubernetes Management
kubernetes: Manage Kubernetes resources (pods, deployments, services, etc.)
Organization & Project Management
organization: Manage organization details, members, and rolesproject: View and manage your projects
Infrastructure Management
vm: Manage virtual machines (VMs)registry: Manage your container registrynotebook: Manage notebooks
User Management
profile: View and manage your profile informationtoken: View and manage your Cloudeka authentication tokens
Financial Management
voucher: Manage project vouchers and credit balances
Monitoring
logs: View and manage activity logs in the organization's cloud
Examples
See examples/usage_examples.md for detailed usage examples.
Development
# Install development dependencies
uv sync --group dev
# Run tests
uv run pytest
# Format code
uv run ruff format .
# Lint code
uv run ruff check .
Troubleshooting
cldkctl not found
Make sure cldkctl is installed and available in your PATH. You can specify a custom path using the --cldkctl-path option.
AttributeError: module 'mcp.types' has no attribute 'ContentBlock'
This means your MCP SDK is outdated or not installed in editable mode. Either:
- Update your MCP SDK (from your local python-sdk if possible):
pip install -e ../python-sdk # or uv pip install -e ../python-sdk
- Or, use the latest version from PyPI:
pip install --upgrade mcp
- Or, use the correct union type in your code (already fixed in this repo):
types.TextContent | types.ImageContent | types.AudioContent | types.ResourceLink | types.EmbeddedResource
Authentication errors
Ensure you're authenticated with cldkctl first:
cldkctl auth your-token
Permission errors
Make sure you have the necessary permissions to execute cldkctl commands and access the required resources.
Connection issues
Check your network connection and ensure you can reach the Cloudeka API endpoints.
PyPI Build/Publish Checklist
- Make sure your
pyproject.tomlhas all required fields (name, version, description, authors, license, etc.) - Make sure your package builds locally:
python -m build
- Make sure you have a valid PyPI token and credentials
- Publish with:
twine upload dist/*
- If using
build_and_publish.py, check its output for errors - If you see missing file errors, ensure
README.md,LICENSE, and all Python files are included in the build
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License
Support
For issues and questions:
- Check the troubleshooting section
- Review the usage examples
- Open an issue on the repository
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_cldkctl-0.1.2.tar.gz.
File metadata
- Download URL: mcp_cldkctl-0.1.2.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1923749ed263d7ec398e6b277067f6b70300fb1c22f0b50eeb105e9c5820e06
|
|
| MD5 |
08c49825e93e994327b2f83b26ce12d8
|
|
| BLAKE2b-256 |
d8c27ef918971650d2871c7f443a75c4e92c98491592271fd8094bdf60bae49b
|
File details
Details for the file mcp_cldkctl-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mcp_cldkctl-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e09c421a41219534aed6b55426bcc406e984c108712a3180c14af8bd39290f4
|
|
| MD5 |
f6d4dda1f6b6cc8c5577c9cd9b351fbd
|
|
| BLAKE2b-256 |
62fc2b37d17444539e27264ecb66daf5491ba2f03517f9068bafc04aada894e6
|