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
https://www.myai168.com/en/mcp/ (keep the trailing slash).POST with a JSON-RPC 2.0 body.Authorization: Bearer YOUR_DEV_KEY (required on every request).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.8gpt_5_6_sol — OpenAI GPT-5.6 Solgemini_3_5_flash — Google Gemini 3.5 FlashA 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.
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"]
}
}
}
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."}}}'
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"])
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.