Claude Code
Configure Anthropic’s Claude Code CLI to use docpenny’s MCP tools for generating PDFs directly from your terminal.
Prerequisites
- A docpenny account with an active API key
- Claude Code installed
If you don’t have an API key yet, create one in Settings → API Keys in the docpenny dashboard.
Configuration
Claude Code reads MCP server configuration from a .mcp.json file. You can place it at the project level (.mcp.json in your project root) or the user level (~/.mcp.json on your machine).
Project-level config applies only to the current project and can be committed to version control. User-level config applies globally to all Claude Code sessions.
Create a .mcp.json file with the following content:
{
"mcpServers": {
"docpenny": {
"type": "http",
"url": "https://mcp.docpenny.com/mcp",
"headers": {
"x-api-key": "<your_api_key>"
}
}
}
} Replace <your_api_key> with the key you created in the dashboard.
Using the CLI
You can also add docpenny as an MCP server using the Claude Code CLI:
claude mcp add --transport http docpenny https://mcp.docpenny.com/mcp --header "x-api-key: YOUR_KEY" Scopes
- Project scope: Place
.mcp.jsonin your project directory. The server is available only when working in that project. - User scope: Place the config in
~/.mcp.json. The server is available across all Claude Code sessions on your machine.
Testing the Connection
Once configured, start Claude Code and ask it to list your available templates:
List my docpenny templates If everything is set up correctly, Claude Code will call the list_templates tool and return your templates.
Troubleshooting
Authentication failures
If you see 401 Unauthorized errors, your API key is missing or incorrect. Verify the key in your .mcp.json and ensure it matches the key in your dashboard.
Connection refused
A connection refused error means the URL is wrong. Confirm you’re using https://mcp.docpenny.com/mcp. Double-check the spelling and that there’s no trailing slash.
Session timeouts
If Claude Code reports session timeouts, check your network connectivity and ensure the docpenny MCP endpoint is reachable from your environment. Firewalls or VPNs may block outbound connections to app.docpenny.com.