โšก

SingaNow MCP & OpenAI Gateway

Model Context Protocol & OpenAI Native Function Calling for Real-Time Singapore Intelligence

โ† SingaNow Home โšก UTCP Direct Suite ๐Ÿ“– API Docs
Online • Protocol 2024-11-05 • OpenAI Tools Ready

Singapore Real-Time AI Intelligence Hub

Connect Claude Desktop, Cursor, Windsurf, OpenAI (GPT-4o / GPT-4o-mini), and ChatGPT Custom GPT Actions directly to official Singapore public transport, bus arrival countdowns, weather nowcasts, air quality metrics (PSI/PM2.5), expressway CCTV cameras, carparks, EV charging, and ACRA corporate registers.

23
Production AI Tools
14
Knowledge Resources
18
Pre-Engineered Prompts
MCP + OpenAI
Dual Engine Support
๐Ÿงช Live Tool Tester & Playground

Execute any of the 13 Singapore tools live via MCP JSON-RPC or OpenAI tool call format.

Live Execution Output
// Live execution output will appear here...
โš™๏ธ Client Configurations & Integrations

Custom GPT ChatGPT Actions (OpenAPI 3.1.0)

Import this OpenAPI Schema directly in the ChatGPT Custom GPT builder (Configure → Actions → Create new action):

https://singanow.com/mcp/openapi.json
View Schema JSON

OpenAI SDK Python & Node.js Tool Calling

Fetch real-time tools directly via GET /mcp/openai/tools:

https://singanow.com/mcp/openai/tools
View Python Example (gpt-4o)
import json
import requests
from openai import OpenAI

client = OpenAI()

# 1. Fetch live Singapore MCP tools from SingaNow
tools_url = "https://singanow.com/mcp/openai/tools"
tools = requests.get(tools_url).json()["tools"]

# 2. Ask GPT-4o with tool calling
messages = [
    {"role": "system", "content": "You are an expert Singapore Assistant. Use SingaNow tools for real-time answers."},
    {"role": "user", "content": "Check the next buses arriving at bus stop 01012 and current weather in Victoria."}
]

response = client.chat.completions.create(
    model="gpt-4o",
    messages=messages,
    tools=tools,
    tool_choice="auto"
)

# 3. Handle tool calls
msg = response.choices[0].message
if msg.tool_calls:
    for tool_call in msg.tool_calls:
        fn_name = tool_call.function.name
        fn_args = json.loads(tool_call.function.arguments)
        
        # Execute tool via SingaNow execution endpoint
        exec_res = requests.post(
            f"https://singanow.com/mcp/tools/{fn_name}",
            json=fn_args
        ).json()
        
        print(f"Tool [{fn_name}] Output:", json.dumps(exec_res, indent=2))
View Node.js Example
import OpenAI from "openai";

const openai = new OpenAI();
const BASE_URL = "https://singanow.com";

// 1. Fetch live SingaNow tools formatted for OpenAI
const res = await fetch(`${BASE_URL}/mcp/openai/tools`);
const { tools } = await res.json();

// 2. Send prompt to gpt-4o
const completion = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [
    { role: "system", content: "You are an expert Singapore local guide." },
    { role: "user", content: "Plan a bus journey from 01012 to 09048 and check live arrivals." }
  ],
  tools
});

// 3. Inspect and execute returned tool calls
const toolCalls = completion.choices[0].message.tool_calls;
if (toolCalls) {
  for (const call of toolCalls) {
    const fnName = call.function.name;
    const fnArgs = JSON.parse(call.function.arguments);

    const toolResult = await fetch(`${BASE_URL}/mcp/tools/${fnName}`, {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify(fnArgs)
    }).then(r => r.json());

    console.log(`Executed ${fnName}:`, toolResult);
  }
}

Plugin ChatGPT Plugin Manifest (ai-plugin.json)

https://singanow.com/mcp/ai-plugin.json

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "singanow": {
      "command": "node",
      "args": ["path/to/mcp-bridge.mjs"],
      "env": {
        "MCP_URL": "https://singanow.com/mcp/"
      }
    }
  }
}

Add to .cursor/mcp.json or Cursor Settings → MCP:

{
  "mcpServers": {
    "singanow": {
      "url": "https://singanow.com/mcp/sse"
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "singanow": {
      "serverUrl": "https://singanow.com/mcp/sse"
    }
  }
}

Direct JSON-RPC 2.0 invocation via cURL:

curl -X POST https://singanow.com/mcp/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "get_singapore_bus_arrivals",
      "arguments": { "bus_stop_code": "01012" }
    }
  }'

UTCP 1.0.1 Universal Tool Calling Protocol (Direct-to-Native)

Bypass proxy wrappers and middleware tax. Load the declarative UTCP Manual into any UTCP-compliant client or call tools directly via native HTTP:

https://singanow.com/utcp
Direct Native HTTP One-Liner (No Wrapper):
curl -s -X POST "https://singanow.com/utcp/tools/get_singapore_bus_arrivals" \
  -H "Content-Type: application/json" \
  -d '{"bus_stop_code": "01012"}'
โœจ Interactive Prompts Explorer & Runner (18 Prompts)

Pre-engineered prompts covering all 13 tools plus multi-tool workflows. Select any prompt to inspect its arguments and generate model-ready prompt messages.

Prompt description here...
Generated Prompt Messages (MCP / LLM Ready)
// Generated prompt messages will appear here...
๐Ÿ“š Interactive Knowledge Resources Explorer (14 Resources)

Contextual knowledge assets, guidelines, and real-time live data snapshots accessible via MCP resources/read.

Resource description here...
Resource Content View
// Click "Read Resource Content" to load...
๐Ÿ› ๏ธ 13 Production Singapore Real-Time Tools

Click any tool chip below to quickly populate the live tester and argument templates.

get_singapore_bus_arrivals
plan_singapore_bus_journey
find_nearby_singapore_bus_stops
search_singapore_bus_stops
get_singapore_bus_service_details
get_singapore_bus_route_stops
get_singapore_planned_bus_changes
get_singapore_weather
get_singapore_environment_air_quality
get_singapore_traffic_cameras
get_singapore_carpark_availability
get_singapore_ev_charging_points
search_singapore_acra_entity
get_singapore_train_service_alerts
get_singapore_station_crowd_forecast
get_singapore_station_crowd_density
get_singapore_expressway_travel_times
get_singapore_vms_traffic_advisories
get_singapore_traffic_speed_bands
get_singapore_traffic_incidents
get_singapore_faulty_traffic_lights
get_singapore_planned_road_openings
get_singapore_approved_road_works