opencode icon indicating copy to clipboard operation
opencode copied to clipboard

bug: MCP - Invalid JSON Schema when using Docker MCP Gateway

Open coeur-de-loup opened this issue 6 months ago • 3 comments

Description

When attempting to run the Docker MCP gateway, an ⁠AI_APICallError is thrown.

Error

AI_APICallError: Invalid JSON Schema when using Docker MCP Gateway

To Reproduce

opencode.json

{
    "$schema": "https://opencode.ai/config.json",
    "mcp": {
        "MCP_DOCKER": {
            "type": "local",
            "command": ["docker","mcp","gateway","run"],
            "enabled": true
        }
    }
}

coeur-de-loup avatar Jul 03 '25 14:07 coeur-de-loup

After recent updates (1.0.62 worked few days ago) I start receiving error on any request when Docker MCP Toolkit is enabled. Not sure if it is related to docker update or opencode.

Invalid schema for function 'MCP_DOCKER_mcp-config-set': In context=('properties', 'value', 'type', '4'), array schema missing items.

                {
                    "type": "function",
                    "function": {
                        "name": "MCP_DOCKER_mcp-config-set",
                        "description": "Set configuration values for MCP servers. Creates or updates server configuration with the specified key-value pairs. Supports strings, numbers, booleans, objects, and arrays.",
                        "parameters": {
                            "type": "object",
                            "properties": {
                                "key": {
                                    "type": "string",
                                    "description": "Configuration key to set. This is not to be prefixed by the server name."
                                },
                                "server": {
                                    "type": "string",
                                    "description": "Name of the MCP server to configure"
                                },
                                "value": {
                                    "type": [
                                        "string",
                                        "number",
                                        "boolean",
                                        "object",
                                        "array"
                                    ],
                                    "description": "Configuration value to set (can be string, number, boolean, object, or array)"
                                }
                            },
                            "required": [
                                "server",
                                "key",
                                "value"
                            ],
                            "additionalProperties": false
                        }
                    }
                },

Kirow avatar Nov 21 '25 20:11 Kirow

Hm im not really sure, probably the docker mcp I don't think we have updated mcp stuff lately

rekram1-node avatar Nov 24 '25 02:11 rekram1-node

Maybe related to https://github.com/docker/mcp-gateway/issues/275

fiuzagr avatar Dec 14 '25 11:12 fiuzagr