Skip to main content
Connect OpenCode to Gcore MCP Server to manage Gcore resources through natural-language requests. The server runs locally and uses a Gcore API token to access the operations the token is allowed to perform.

Step 1. Install OpenCode

Install the OpenCode CLI, then confirm the command is available.
After installation, restart the terminal so opencode is on PATH.
Verify the installation:

Step 2. Configure Gcore MCP Server

The global config file is opencode.json in the OpenCode config directory. On macOS and Linux the directory is ~/.config/opencode. On Windows it is %USERPROFILE%\.config\opencode. A project can use opencode.json in the project directory instead. Store the API token in a separate file. The config references that file, so the token is not written into opencode.json.
Create the directory, then open the token file and the config file:
On Windows, paste the API token into gcore-api-key and save the file. Add the gcore entry inside the existing servers object under mcp. Keep other entries.
To read the token from the environment instead of a file, replace the GCORE_API_KEY value inside environment with the line below. An unset variable becomes an empty key.
Save the file. A JSON syntax error prevents OpenCode from loading the server.

Step 3. Check the connection

List the configured MCP servers:
The first run can print No MCP servers configured while the server is still starting. Run the command again. The gcore server is listed as connected.

Tools the server exposes

The configuration above leaves GCORE_TOOLS unset, so OpenCode receives search_tools, get_tool_schema, call_read_tool, call_write_tool, call_destructive_tool, and execute_code. OpenCode loads every tool at startup. Do not set GCORE_TOOLS=*. Setting GCORE_TOOLS without GCORE_MCP_MODE selects direct mode and registers one tool per matched operation. Limit the set with Tool filtering. OpenCode does not display approval prompts. A destructive call returns a confirmation token. Repeat the call with that token.