OpenCode

Configure OpenCode to use docpenny’s MCP tools for PDF generation.

Note: OpenCode uses a different config structure than most harnesses. The root key is mcp (not mcpServers) and the transport type is remote (not http). Server names go directly under mcp — no servers wrapper.

Prerequisites

  • A docpenny API key (create one in Settings → API Keys in the dashboard)

Configuration

Add the following to your project’s opencode.json:

{
  "mcp": {
    "docpenny": {
      "type": "remote",
      "url": "https://mcp.docpenny.com/mcp",
      "headers": {
        "x-api-key": "YOUR_API_KEY"
      }
    }
  }
}

Replace YOUR_API_KEY with your actual docpenny API key.

Troubleshooting

ProblemSolution
Auth required or 401Check your x-api-key value. Keys can be managed in the dashboard.
Connection refusedVerify the URL is https://mcp.docpenny.com/mcp.
Unsupported transportEnsure you’re using "type": "remote" — OpenCode does not use "type": "http".
en