For the complete documentation index, see llms.txt. This page is also available as Markdown.

OpenCode

OpenCode is an open-source terminal-based AI coding agent that supports 75+ model providers and local MCP servers. It is designed for developers who work primarily in the terminal and want AI assistance without leaving the command line.

Prerequisites

  • OpenCode installed. For more information, see opencode.ai/docs/#install

  • The ionoscloud-mcp binary on your PATH. For more information, see Quick Start

  • An IONOS CLOUD API token. For least-privilege access, see Authentication to scope the token to only the tools you need.

Add the MCP server

OpenCode uses "type": "local" with a command array and an environment key rather than env. The type field is OpenCode's own config schema; it maps to a local stdio subprocess internally, not an MCP transport type. The config file is opencode.json or opencode.jsonc, not mcp.json.

Add the following to your OpenCode config:

  • Global config: ~/.config/opencode/opencode.jsonc

  • Project config: opencode.json or opencode.jsonc in your project root (takes precedence over global)

{
  "mcp": {
    "ionoscloud": {
      "type": "local",
      "command": ["/usr/local/bin/ionoscloud-mcp"],
      "environment": {
        "IONOS_TOKEN": "your-api-token"
      }
    }
  }
}

Replace your-api-token with your IONOS CLOUD API token. On Windows, use the full path: C:\\bin\\ionoscloud-mcp.exe.

To also enable Object Storage tools, add the Object Storage credentials:

Tip: A project-level opencode.json at your repository root lets teammates share the MCP server definition. Share the server name and command, but not the credentials. Each team member sets IONOS_TOKEN in their local environment (for example, in a .env file that is gitignored) rather than in the shared config file.

Verify the connection

1

Start OpenCode

Run opencode in your terminal. On startup, OpenCode loads MCP servers defined in the config. A confirmation message in the startup output confirms the ionoscloud server connected.

2

Test a tool call

In the OpenCode prompt, type: List my IONOS CLOUD data centers.

Note: If the ionoscloud-mcp binary is not in /usr/local/bin, update the command array to use the correct path. Run which ionoscloud-mcp to confirm.

If no confirmation appears on startup, see Troubleshooting.

For full OpenCode MCP documentation, see opencode.ai/docs/mcp-servers.

Last updated

Was this helpful?