Build PDF features with Codex and DocSpring
With DocSpring's MCP server, Codex can work in your DocSpring account as well as your code. It sets up a template from a PDF, writes the code that fills it with one of DocSpring's API clients, and makes a test PDF to check the result. The Codex CLI, its IDE extension and the ChatGPT desktop app share the connection.
What you can do with Codex
While it builds your integration
- Templates from your PDFs
- Create a template from a PDF in your repository and set up its fields.
- Types for your data
- Generate types for a template's data in your project's language, for code that calls the API.
- Test PDFs to check its work
- Validate data against a template and make free test PDFs, then look at the pages to see where the data landed.
- Template changes
- Rename or move fields, see what changed since the last version, and publish a new one.
You stay in control
- You choose the access
- When you sign in, choose whether Codex can only read your templates and PDFs or also make changes.
- Its own connection
- Codex signs in with OAuth, so there's no API token to copy into your project.
- Disconnect at any time
- Each connected app is listed on the Integrations page in DocSpring, where anyone in the account can disconnect it.
Set up the Codex integration
Read the setup guide- Run codex mcp add docspring --url https://mcp.docspring.com/mcp (accounts in the EU use https://mcp-eu.docspring.com/mcp).
- Run codex mcp login docspring and sign in to DocSpring.
- Ask Codex to work with your templates, or to write the code that fills one.
Example workflows
A new integration
Give Codex a PDF form and ask for the template, typed models and the code that fills it from your data.
A template that matches your data
Ask it to compare your app's data with the template's fields and fix the names that don't match.
Checks in your pull request
Have it make test PDFs from your fixtures and look at each page before you merge.
Try DocSpring with Codex
Upload a PDF or a Word document, design a page, or write HTML, then connect Codex. No credit card needed.

