Overview SMS Airtime Data Electricity Balance Network Lookup AI & Codex OpenAPI

AI and Codex Integration

Simply paste this page into your AI agent. It is designed so tools like Codex, Claude, and ChatGPT can understand how SIMcloud works and how to connect to it.

SIMcloud can be connected to ChatGPT, Codex, and other MCP-compatible tools so that users can work with their own SIMcloud account through AI-assisted workflows.

This integration uses OAuth for user sign-in and an MCP endpoint for tool calls.

What This Enables

Connection Endpoints

Component URL
MCP endpoint https://simcloud.co.za/api/mcp.php
Protected resource metadata https://simcloud.co.za/.well-known/oauth-protected-resource
Authorization server metadata https://simcloud.co.za/.well-known/oauth-authorization-server
Dynamic client registration https://simcloud.co.za/oauth/register.php
Authorization endpoint https://simcloud.co.za/oauth/authorize.php
Token endpoint https://simcloud.co.za/oauth/token.php
OpenAPI specification https://simcloud.co.za/api/openapi.yaml

Integration Brief For Codex And Similar Tools

This section is intended for AI coding tools that need exact integration context.

  1. SIMcloud exposes an OAuth-protected MCP server at https://simcloud.co.za/api/mcp.php.
  2. The MCP server is the preferred entry point for AI assistants that support MCP and OAuth.
  3. The OAuth metadata endpoints are:
  4. The dynamic client registration endpoint is https://simcloud.co.za/oauth/register.php.
  5. The machine-readable REST contract is https://simcloud.co.za/api/openapi.yaml.
  6. Users authenticate with their own SIMcloud account. Do not assume a shared API token.
  7. After OAuth sign-in, the MCP server maps the OAuth access token to the connected user's SIMcloud API token internally.
  8. The current documented SIMcloud capabilities are wallet balance, network lookup, SMS, airtime, data, and prepaid electricity.

Authentication Model

Users do not share a single SIMcloud token with everyone. Each user authenticates with their own SIMcloud account.

PKCE is required. Use code_challenge_method=S256.

  1. The AI tool registers or uses an OAuth client.
  2. The user signs in to SIMcloud and approves access.
  3. SIMcloud issues an OAuth access token.
  4. The AI tool sends that token to the SIMcloud MCP endpoint.
  5. The MCP endpoint maps that OAuth token to the user's SIMcloud API token internally.
This means tool calls run against the connected user's own SIMcloud account, wallet, and permissions.

MCP Transport

The SIMcloud MCP endpoint uses HTTPS JSON-RPC requests over standard HTTP POST.

It does not use Server-Sent Events (SSE). Tools should connect to https://simcloud.co.za/api/mcp.php as an HTTP MCP endpoint.

OAuth Scope

The current OAuth integration uses a single scope:

api

This scope gives the connected tool access to the SIMcloud capabilities exposed through the MCP server and documented API surface, including balance checks, network lookup, SMS, airtime, data, and prepaid electricity actions.

There are not currently separate public scopes such as balance:read or sms:send. Assistants and developers should assume the integration uses the single api scope unless SIMcloud publishes narrower scopes in future.

OAuth Response Example

A successful token exchange returns JSON in this shape:

{
  "access_token": "YOUR_ACCESS_TOKEN",
  "refresh_token": "YOUR_REFRESH_TOKEN",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "api"
}

Access tokens currently expire after 3600 seconds. Refresh tokens are supported and should be used to continue an existing connection without asking the user to sign in again.

MCP Tools

The SIMcloud MCP server currently exposes these tool names and arguments:

Tool Required arguments Optional arguments
get_wallet_balance None None
lookup_network msisdn None
send_sms recipient, message None
get_sms_status sms_id None
create_airtime_order msisdn, network, amount, reference None
get_airtime_order None request_id, orderno
create_data_order msisdn, network, amount, reference None
get_data_order None request_id, orderno
create_electricity_order meter_number, amount, client_reference, recipient None
get_electricity_order None order_id, client_reference, order_reference_id

MCP Response Shape

A successful MCP tool call returns JSON-RPC with a tool result and structured content. A typical success shape looks like this:

{
  "jsonrpc": "2.0",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "SIMcloud returned HTTP 200."
      }
    ],
    "structuredContent": {
      "ok": true,
      "status": 200,
      "data": {}
    }
  },
  "id": 1
}

Auth or validation failures still return JSON-RPC, but the tool result contains a non-success structuredContent.status such as 401, 400, 409, or 503 depending on the request outcome.

Using SIMcloud In Codex, Claude, And ChatGPT

If you want an AI assistant to work with your SIMcloud account, start by sharing this guide page:

https://simcloud.co.za/api/ai.html

You can paste that link into Codex, Claude, or ChatGPT and ask the assistant to help you connect SIMcloud or build against the SIMcloud API.

Copy-Paste Prompt For AI Assistants

Please read https://simcloud.co.za/api/ai.html first.

Then use these SIMcloud integration rules:
- Prefer the MCP endpoint at https://simcloud.co.za/api/mcp.php when MCP tool access is supported.
- Use the OAuth metadata endpoints linked on the AI guide page to understand sign-in and token handling.
- Use https://simcloud.co.za/api/openapi.yaml as the source of truth for the REST API contract.
- Assume each user must authenticate with their own SIMcloud account.
- Do not assume shared credentials.
- The available SIMcloud capabilities are balance, network lookup, SMS, airtime, data, and prepaid electricity.

Help me connect or integrate SIMcloud based on those rules.

You can use that prompt in Codex, Claude, or ChatGPT.

What To Send

Example Prompts

Codex

Please read https://simcloud.co.za/api/ai.html and help me connect my SIMcloud account.

Claude

Use https://simcloud.co.za/api/ai.html to understand the SIMcloud API and show me how to use it.

ChatGPT

Read https://simcloud.co.za/api/ai.html and help me set up SIMcloud for balance checks, SMS, and recharges.

What The Assistant Can Help With

Failure And Error Handling Notes

SIMcloud Request Rules

Recommended Links To Share

Using SIMcloud With AI

SIMcloud can be used with Codex, Claude, and ChatGPT so that the assistant can help you work with your own SIMcloud account.

Share this guide page with the assistant, then ask it to help you connect SIMcloud or build a workflow around balance checks, SMS sending, airtime, data, or electricity orders.

Related Documentation