Skip to main content

MCP server for CloudTruth configuration and secrets management

Reason this release was yanked:

Update README.md

Project description

CloudTruth MCP Server

Model Context Protocol server for CloudTruth configuration and secrets management

Version 1.0.0


Overview

The CloudTruth MCP Server provides AI agents and coding assistants with secure, context-aware access to CloudTruth's centralized configuration and secrets management platform. By implementing the Model Context Protocol (MCP), this server enables any MCP-compatible AI tool (Claude Code, VS Code extensions, Cursor, etc.) to seamlessly retrieve parameters, templates, and secrets needed for development workflowsโ€”without manual credential copying or context switching.

Key Features

  • ๐Ÿ” Secure by Default: Secrets masked unless explicitly requested
  • ๐ŸŒ Universal Compatibility: Works with any MCP-compatible AI client
  • โ˜๏ธ Flexible Deployment: Supports both CloudTruth Cloud and self-hosted instances
  • โšก High Performance: Intelligent caching with sub-second response times
  • ๐Ÿ“‹ Complete Coverage: 10 tools, 5 resources, 4 prompts for full CloudTruth functionality
  • ๐Ÿ” Point-in-Time Queries: Access configuration snapshots via tags
  • ๐Ÿ“ค Multiple Export Formats: JSON, .env, YAML exports

Quick Start

Prerequisites

  • Python 3.11 or higher
  • CloudTruth account with API key
  • MCP-compatible client (e.g., Claude Code)

Installation

# Clone repository (or install from PyPI when published)
git clone https://github.com/cloudtruth/mcp-server.git
cd mcp-server

# Install with pip
pip install -e .

# Or use poetry/pipenv
poetry install

Configuration

Create configuration file:

mkdir -p ~/.config/cloudtruth
cat > ~/.config/cloudtruth/mcp-config.json << EOF
{
  "api_key": "ct-YOUR-API-KEY-HERE",
  "api_base_url": "https://api.cloudtruth.io",
  "default_project": "my-application",
  "default_environment": "development"
}
EOF

# Secure the configuration file
chmod 600 ~/.config/cloudtruth/mcp-config.json

Configure MCP Client

Add to your MCP client configuration (e.g., Claude Code):

{
  "mcpServers": {
    "cloudtruth": {
      "command": "python",
      "args": ["-m", "cloudtruth_mcp.server"],
      "env": {}
    }
  }
}

Test Installation

# Test with MCP Inspector
npx @modelcontextprotocol/inspector python -m cloudtruth_mcp.server

Documentation

Complete documentation is available in the docs/ directory:


Usage Examples

Retrieve Database Credentials

{
  "tool": "get_parameter",
  "arguments": {
    "project": "my-app",
    "parameter_name": "DATABASE_URL",
    "environment": "staging",
    "include_secrets": true
  }
}

Get All Configuration for Environment

{
  "tool": "export_parameters",
  "arguments": {
    "project": "my-app",
    "environment": "production",
    "format": "dotenv",
    "include_secrets": true
  }
}

Preview Configuration Template

{
  "tool": "preview_template",
  "arguments": {
    "project": "my-app",
    "environment": "production",
    "template_body": "DATABASE_URL={{DATABASE_URL}}\nAPI_KEY={{API_KEY}}"
  }
}

Compare Environments

{
  "prompt": "compare-environments",
  "arguments": {
    "project": "my-app",
    "environment1": "staging",
    "environment2": "production"
  }
}

Available Tools

Tool Description
list_projects List all accessible projects
list_environments List all environments with hierarchy
get_parameter Get single parameter value
get_parameters Get all parameters for project/environment
set_parameter Set or update parameter value
create_parameter Create new parameter
delete_parameter Delete parameter
preview_template Render template with parameters
create_tag Create point-in-time snapshot
export_parameters Export parameters in various formats

See API_SPECIFICATION.md for complete details.


Security

This server implements defense-in-depth security:

  • โœ… API keys stored in secured configuration file (permissions 600)
  • โœ… Secrets masked by default in all responses
  • โœ… All API communication over HTTPS with certificate validation
  • โœ… Secret access logging for audit trail
  • โœ… Input validation on all parameters
  • โœ… Rate limiting to prevent API abuse
  • โœ… Log sanitization to prevent credential leakage

See SECURITY_SPECIFICATION.md for details.


Development

Setup Development Environment

# Clone repository
git clone https://github.com/cloudtruth/mcp-server.git
cd mcp-server

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run linting
black src/ tests/
ruff check src/ tests/
mypy src/

# Generate coverage report
pytest --cov --cov-report=html

Project Structure

cloudtruth-mcp-server/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ cloudtruth_mcp/
โ”‚       โ”œโ”€โ”€ server.py          # Main MCP server
โ”‚       โ”œโ”€โ”€ client.py          # CloudTruth API client
โ”‚       โ”œโ”€โ”€ config.py          # Configuration management
โ”‚       โ”œโ”€โ”€ tools.py           # Tool implementations
โ”‚       โ”œโ”€โ”€ resources.py       # Resource handlers
โ”‚       โ”œโ”€โ”€ prompts.py         # Prompt templates
โ”‚       โ”œโ”€โ”€ cache.py           # Caching layer
โ”‚       โ”œโ”€โ”€ models.py          # Data models
โ”‚       โ”œโ”€โ”€ errors.py          # Error handling
โ”‚       โ””โ”€โ”€ utils.py           # Utilities
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ docs/
โ”œโ”€โ”€ config/
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

Troubleshooting

Server Won't Start

Problem: Configuration file not found

Solution: Create ~/.config/cloudtruth/mcp-config.json with your API key

Problem: Authentication failed

Solution: Verify your API key is correct and has not been revoked

Cannot Retrieve Parameters

Problem: Parameter not found

Solution: Verify the parameter exists in CloudTruth and you have access to the project

Problem: Permission denied

Solution: Check that your API key has appropriate permissions for the resource

Performance Issues

Problem: Slow responses

Solution:

  • Check cache_ttl_seconds configuration
  • Verify network connectivity to CloudTruth API
  • Review CloudTruth API rate limits

Contributing

We welcome contributions! Please see our contributing guidelines.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Submit a pull request

License

MIT License - see LICENSE file for details


Support


Changelog

Version 1.0.0 (2025-10-23)

  • Initial release
  • 10 tools for parameter management
  • 5 resource types
  • 4 workflow prompts
  • Full CloudTruth Cloud and self-hosted support
  • Comprehensive security features

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloudtruth_mcp_server-1.0.0rc2.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloudtruth_mcp_server-1.0.0rc2-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file cloudtruth_mcp_server-1.0.0rc2.tar.gz.

File metadata

  • Download URL: cloudtruth_mcp_server-1.0.0rc2.tar.gz
  • Upload date:
  • Size: 32.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for cloudtruth_mcp_server-1.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 f1097b69beebcdb94bbafa6c916bdfbd8b7608753afa75306a0b54b31029746e
MD5 6bb38e1b6df6f89aacaa444d960d0ab8
BLAKE2b-256 b18e695f304e082ad56af0d41324f40f8f9344677d3a1e47a4bfac9d95f06d79

See more details on using hashes here.

File details

Details for the file cloudtruth_mcp_server-1.0.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudtruth_mcp_server-1.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 590b0ccec6733492e185f43db7e0fcf7bb5e3a6fa15e4f06330035380084dfaf
MD5 dc1f8cbe30fd38117e5ee66897a15939
BLAKE2b-256 a96837c88ad09d6f64f765bd10516a71172962afe9ceba3226b0823ed8b83a0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page