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(notmcpServers) and the transport type isremote(nothttp). Server names go directly undermcp— noserverswrapper.
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
| Problem | Solution |
|---|---|
Auth required or 401 | Check your x-api-key value. Keys can be managed in the dashboard. |
Connection refused | Verify the URL is https://mcp.docpenny.com/mcp. |
Unsupported transport | Ensure you’re using "type": "remote" — OpenCode does not use "type": "http". |