How to configure the Ozeki SMS MCP Server in OpenCode
This guide walks you through integrating the Ozeki SMS MCP Server with OpenCode, a terminal-based AI coding assistant. By following this tutorial, you will learn how to edit the OpenCode configuration file, register the Ozeki SMS Gateway as an MCP server, and confirm the connection using the built-in status command.
What is an MCP server?
An MCP (Model Context Protocol) server exposes tools that an AI model can call during a conversation. In this setup, the Ozeki SMS MCP Server provides SMS tools such as sending messages and listing incoming SMS. OpenCode connects to the MCP server over HTTP and communicates with it directly using the configured URL and API key, making it straightforward to add mobile messaging capabilities to any OpenCode workflow.
OpenCode MCP server configuration
# OpenCode configuration file location:
C:\Users\{Username}\.config\opencode\opencode.json
# Add the following block to opencode.json
# Replace {address} with your Ozeki SMS Gateway host IP or hostname
# Replace the Bearer token with the API key generated for your MCP user account
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"Ozeki": {
"type": "remote",
"url": "http://{address}:9529/mcp",
"headers": {
"Authorization": "Bearer abcd1234"
},
"enabled": true
}
}
}
Steps to follow
We assume Ozeki SMS Gateway is already installed on your system and you have already created an MCP user account with an API key. You will also need OpenCode installed on your system.
How to configure the Ozeki SMS MCP Server in OpenCode video
The following video shows how to add the Ozeki SMS MCP Server to OpenCode step-by-step. The video covers editing the configuration file, launching OpenCode, and verifying the MCP server connection using the status command.
Step 1 - Edit the OpenCode configuration file
Navigate to the OpenCode configuration folder at
C:\Users\{Username}\.config\opencode\ using File Explorer.
Replace {Username} with your Windows username (Figure 1).
Open the opencode.json file in a text editor such as Notepad. This file
stores all OpenCode configuration, including any MCP servers that OpenCode should
connect to on startup (Figure 2).
Add the Ozeki SMS MCP Server entry inside the mcp object as shown below.
Replace the URL with the address of your Ozeki SMS Gateway installation and the Bearer
token with the API key you generated for your MCP user account. Save the file after
making the changes (Figure 3).
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"Ozeki": {
"type": "remote",
"url": "http://{address}:9529/mcp",
"headers": {
"Authorization": "Bearer ozkey-abc123"
},
"enabled": true
}
}
}
Step 2 - Start OpenCode
Open a terminal window and navigate to your working directory. Type opencode
and press Enter to launch OpenCode. It is important to start a fresh session after
editing the configuration file so that OpenCode loads the updated MCP server settings (Figure 4).
opencode
Step 3 - Verify the MCP server connection
Once OpenCode has started, run the /status command to display the
current connection status of all configured MCP servers (Figure 5).
/status
In the status output, verify that the Ozeki MCP server is listed and its status shows as connected. This confirms that OpenCode has successfully reached your Ozeki SMS Gateway using the configured URL and API key (Figure 6).
Summary
You have successfully configured the Ozeki SMS MCP Server in OpenCode. The AI model running in OpenCode can now send and receive SMS messages through your gateway using plain language prompts, making it straightforward to add mobile messaging capabilities to any OpenCode workflow.