Skip to main content

MCP Server for CloudNex - Bridge between AI assistants and CloudNex cloud security data

Project description

CloudNex MCP Server

Enterprise MCP server exposing CloudNex cloud security data to AI assistants via the Model Context Protocol.

Features

  • 21 read-only tools for scans, findings, providers, compliance, overviews, users, roles, and resources
  • Hub catalog tools for compliance frameworks and security check metadata (no auth)
  • 2 MCP resources for quick scan and findings summaries
  • stdio mode for Cursor / Claude Desktop
  • HTTP mode with per-request API key override via headers
  • JSON:API backend with Authorization: Api-Key {prefix.key} authentication

Quick Start

cd cloudnex_mcp
cp .env.example .env
# Edit .env with your CLOUDNEX_API_URL and CLOUDNEX_API_KEY

pip install -e ".[dev]"
python run_server.py          # stdio MCP
python run_http_server.py     # HTTP on port 8001

Docker

docker compose up --build
curl http://localhost:8001/health

Cursor Configuration

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "cloudnex": {
      "command": "mcp-cloudnex",
      "env": {
        "CLOUDNEX_API_URL": "https://your-instance.com/api/v1",
        "CLOUDNEX_API_KEY": "cn_your-prefix.your-key"
      }
    }
  }
}

Or using the run script:

{
  "mcpServers": {
    "cloudnex": {
      "command": "python",
      "args": ["/path/to/cloudnex_mcp/run_server.py"],
      "env": {
        "CLOUDNEX_API_URL": "https://your-instance.com/api/v1",
        "CLOUDNEX_API_KEY": "cn_your-prefix.your-key"
      }
    }
  }
}

Claude Desktop Configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "cloudnex": {
      "command": "mcp-cloudnex",
      "env": {
        "CLOUDNEX_API_URL": "https://your-instance.com/api/v1",
        "CLOUDNEX_API_KEY": "cn_your-prefix.your-key",
        "CLOUDNEX_HUB_URL": "https://hub.cloudnex.com"
      }
    }
  }
}

HTTP API

Endpoint Method Description
/health GET Health check
/mcp/tools GET List tools
/mcp/tools/call POST Execute a tool
/mcp/resources GET List resources
/mcp/resources/read POST Read a resource

Pass API key per request:

X-API-Key: cn_prefix.key
# or
Authorization: Api-Key cn_prefix.key

Environment Variables

Variable Default Description
CLOUDNEX_API_URL "" CloudNex JSON:API base URL
CLOUDNEX_API_KEY "" Tenant API key (prefix.key)
CLOUDNEX_HUB_URL https://hub.cloudnex.com Public check catalog
CLOUDNEX_MCP_SERVER_PORT 8001 HTTP server port
CLOUDNEX_LOG_LEVEL INFO Log level
CLOUDNEX_CORS_ORIGINS * Comma-separated CORS origins

Testing

pip install -e ".[dev]"
pytest tests/ -q

# Include integration tests (live backend):
pytest tests/ -m integration

Full end-to-end guide (API key, Cursor, Claude Desktop, NEXA chat): docs/TESTING.md

RBAC

All backend tools respect CloudNex tenant RBAC. API keys are tenant-scoped; data visibility depends on role permissions and provider group assignments. Use get_my_profile to verify the authenticated context.

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

mcp_cloudnex-1.0.0.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

mcp_cloudnex-1.0.0-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_cloudnex-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for mcp_cloudnex-1.0.0.tar.gz
Algorithm Hash digest
SHA256 84a843dc6f4afe010932c29bc36cd3d2c3ac847fa9bc921681adc1f5b0626eb2
MD5 d44c500c1c4595460a79f2cfedd63cbd
BLAKE2b-256 c144a02c695e18451284a1a77f03f09afc73e3237bf06f4192966418a5e08474

See more details on using hashes here.

File details

Details for the file mcp_cloudnex-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_cloudnex-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for mcp_cloudnex-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 239175b1e2b655f97901880ad6f4e645005fe676982e524ce95c6ee4b5c84a98
MD5 0f978c8bd2b07bde30abab22c28dd15f
BLAKE2b-256 92859413099969dea05e8e099aa9f39e2b3ec9d5c4b97b13da3792395c53ba4c

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