Home›Developer Center›MYAI168 MCP CLI

MYAI168 MCP CLI

API DocumentationOpenAI ChatGPT APIAnthropic (Claude) APIGoogle Gemini APIGoogle Search APIGoogle News APIOpenRouter APIAPI Pricing
CLI & Agent Guidescc-switch macOScc-switch Windowscc-switch LinuxOpenCode macOSOpenCode WindowsOpenCode LinuxOpenClaw macOSOpenClaw WindowsOpenClaw LinuxHermes Agent macOSHermes Agent WindowsHermes Agent LinuxClaude Code CLI macOSClaude Code CLI WindowsClaude Code CLI LinuxCodex CLI macOSCodex CLI WindowsCodex CLI Linux
MYAI168 API & MCPMYAI168 MCP CLIMYAI168 MCP Web & App
No matching questions on this page.Search the whole site
MYAI168 MCP CLI (command line / programmatic, developer key)

MYAI168 MCP CLI

MYAI168 MCP wraps this site's chat models as an MCP (Model Context Protocol) server, so MCP-capable clients can call the models as "tools" without a browser. This page covers connecting from the command line or your own program using a developer key (dev_key) (Claude Code, mcp-remote, or custom code); the transport is Streamable HTTP (JSON-RPC 2.0). Each successful call deducts points automatically; no points are charged on any error.

If you use a web or desktop app client such as Claude.ai that only accepts a URL and uses OAuth, see the "MYAI168 MCP Web & App" page instead (no developer key needed).

Get a developer key at: https://www.myai168.com/en/ai/user/developer

Endpoint and authentication

  • Endpoint: https://www.myai168.com/en/mcp/ (keep the trailing slash).
  • Transport: MCP Streamable HTTP. Every request is a POST with a JSON-RPC 2.0 body.
  • Auth: HTTP header Authorization: Bearer YOUR_DEV_KEY (required on every request).

Available tools

Every AI module this site shares over MCP is exposed as a tool (chat, image, video, voice, utilities, etc.). Query tools/list for the full set — it is returned dynamically based on this site's MCP sharing settings. Common arguments: input (required, the prompt / instruction / content), search_internet (optional, set true to search the web first when the module supports it), reasoning_effort (optional, thinking-model effort level) and session_id (optional, pass the _meta.session_id from a prior result to continue a multi-turn conversation).

Common examples:

  • claude_opus_4_8 — Anthropic Claude Opus 4.8
  • gpt_5_6_sol — OpenAI GPT-5.6 Sol
  • gemini_3_5_flash — Google Gemini 3.5 Flash

A tool name is the module code (dots replaced by underscores, e.g. qwen3.5_397b_a17b → qwen3_5_397b_a17b). Modules that need files (image-to-prompt, PDF chat, speech-to-text, etc.) take their media through dedicated arguments: images (array; each item is a base64 string or a public URL), documents (pdf / txt / md / csv / docx / xlsx / pptx) and audio_base64 or audio_url (audio). Tools missing their required media return an error immediately — the model is not called and nothing is charged (the tool descriptions in tools/list end with a "Requires: ..." hint). The GPTs tool additionally requires gpts_sn. Which modules are available depends on this site's configuration.

Configure your MCP client

Using the Claude Code CLI (single line):

claude mcp add --transport http myai168 https://www.myai168.com/en/mcp/ --header "Authorization: Bearer YOUR_DEV_KEY"

Or in an MCP client config file (mcp-remote):

{
  "mcpServers": {
    "myai168": {
      "command": "npx",
      "args": ["mcp-remote", "https://www.myai168.com/en/mcp/", "--header", "Authorization: Bearer YOUR_DEV_KEY"]
    }
  }
}

curl examples

The standard MCP connection lifecycle sends initialize first, then a notifications/initialized notification, before calling tools/list / tools/call; the Streamable HTTP spec also requires every request to carry an Accept: application/json, text/event-stream header, and after the initialize handshake every subsequent request must carry the negotiated MCP-Protocol-Version: 2025-06-18 header. This server is stateless and accepts direct tools/list / tools/call calls, but to stay spec-compliant and compatible with strict implementations, follow the standard flow:

# 1. initialize (protocol handshake)
curl -s https://www.myai168.com/en/mcp/ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "Authorization: Bearer YOUR_DEV_KEY" -d '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0"}}}'

# 2. initialized notification (server replies 202, no body; from here on, carry the negotiated version header on every request)
curl -s https://www.myai168.com/en/mcp/ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "MCP-Protocol-Version: 2025-06-18" -H "Authorization: Bearer YOUR_DEV_KEY" -d '{"jsonrpc":"2.0","method":"notifications/initialized"}'

List the available tools (developer key required):

curl -s https://www.myai168.com/en/mcp/ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "MCP-Protocol-Version: 2025-06-18" -H "Authorization: Bearer YOUR_DEV_KEY" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Call a model (developer key required):

curl -s https://www.myai168.com/en/mcp/ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -H "MCP-Protocol-Version: 2025-06-18" -H "Authorization: Bearer YOUR_DEV_KEY" -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"claude_opus_4_8","arguments":{"input":"Hello, please introduce yourself."}}}'

Python example

List the available tools (developer key required):

import requests

url = "https://www.myai168.com/en/mcp/"
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json, text/event-stream",
    "MCP-Protocol-Version": "2025-06-18",
    "Authorization": "Bearer YOUR_DEV_KEY",
}
payload = {"jsonrpc": "2.0", "id": 1, "method": "tools/list"}
r = requests.post(url, headers=headers, json=payload)
for tool in r.json()["result"]["tools"]:
    print(tool["name"], "-", tool.get("description", ""))

Call a model (developer key required):

import requests

url = "https://www.myai168.com/en/mcp/"
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json, text/event-stream",
    "MCP-Protocol-Version": "2025-06-18",
    "Authorization": "Bearer YOUR_DEV_KEY",
}
payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "claude_opus_4_8",
        "arguments": {"input": "Hello, please introduce yourself."},
    },
}
r = requests.post(url, headers=headers, json=payload)
data = r.json()
print(data["result"]["content"][0]["text"])

Response format

The response is a single JSON-RPC result (Content-Type: application/json). The model's answer is in result.content[0].text; the points charged and remaining balance are in result._meta. On a model error, result.isError is true.

Billing: each successful call deducts points based on the model's price; no points are charged on any error. If your balance is insufficient, the call returns a notice and the model is not invoked.

‹ Previous page: Codex CLI LinuxNext page: MYAI168 MCP Web & App ›
↑
Question link copied.

Other FAQ pages

API Documentation

  • OpenAI ChatGPT API
  • Anthropic (Claude) API
  • Google Gemini API
  • Google Search API
  • Google News API
  • OpenRouter API
  • API Pricing

CLI & Agent Guides

  • cc-switch macOS
  • cc-switch Windows
  • cc-switch Linux
  • OpenCode macOS
  • OpenCode Windows
  • OpenCode Linux
  • OpenClaw macOS
  • OpenClaw Windows
  • OpenClaw Linux
  • Hermes Agent macOS
  • Hermes Agent Windows
  • Hermes Agent Linux
  • Claude Code CLI macOS
  • Claude Code CLI Windows
  • Claude Code CLI Linux
  • Codex CLI macOS
  • Codex CLI Windows
  • Codex CLI Linux

MYAI168 API & MCP

  • MYAI168 MCP Web & App