Project Info
In the age of AI, the human touch still matters! Since childhood, I have always learned best through handwritten notes, but writing them out simply takes too much time. Finding a way to automate this is incredibly difficult. Genuine handwriting has natural variations, and no two characters ever look exactly the same. I searched everywhere for a solution. There were no GitHub repositories or paid SaaS tools that could convert digital text into truly natural handwriting. That does not even include the massive challenge of generating handwritten math equations and graphs. The challenge was huge, but I knew people desperately needed a way to create authentic handwritten notes quickly. After a year of relentless hacking and testing to solve this exact problem, the solution is finally here.
What it does
Aipen for ChatGPT is a native ChatGPT app. Ask it for study notes, a worked math solution, a letter, or a report, and it renders the answer as a highly realistic, handwritten page right inside your conversation. Proper math instead of screenshots using real MathJax rendered by hand. Accurate hand drawn graphs and pie charts. GPT-5.6 computes the data with Python first so they are actually correct. Humanized handwriting. Every repeated letter is drawn a little differently so it reads like a real person wrote it rather than a font. A print ready vector PDF you can download and hand in. One prompt, under a minute, without ever leaving ChatGPT. We built this for study, revision, and accessibility to help people who learn best by writing.
How we built it
The core engine handles handwritten math, graphs, pagination, and glyph humanization. We built it using Codex and GPT-5.6: An MCP server (OpenAI Apps SDK) exposing a make_handwriting tool. A headless Playwright pipeline that opens the render URL for Aipen, waits for the page to truly finish drawing, and captures per page previews plus a true vector PDF via Chromium's page.pdf(). An inline ChatGPT UI card featuring previews, page thumbnails, style controls, and a download button. Cloud Run and private Google Cloud Storage for durable artifacts, complete with per IP rate limits and spoof proof asset origins. The tool guidance instructs GPT-5.6 to calculate numeric results with Python before rendering. This means graphs and worked answers are based on real values rather than guessed numbers.
Challenges we ran into
We ran into quite a few walls, but each one taught me something valuable: The renderer draws in the browser, so I built a headless render mode and had to make it signal exactly when the ink was really on the paper. My first captures came back totally blank! Math renders asynchronously. The capture kept firing before MathJax finished, leaving grey placeholders behind. A video embed step in the trailer quietly corrupted the audio timeline. Late narration silently vanished until I logged the exact placement times and moved the mix into ffmpeg. The recurring lesson was simple: measure, do not guess.
Accomplishments we're proud of
It genuinely works end to end and it is fully deployed. A judge can paste one URL into ChatGPT and be using it in under a minute. Real handwritten math, graphs, and pie charts. It is not just a wrapper around a screenshot. A hardened, public ready service rather than just a demo. It features per IP limits, private artifact storage, and single source rendering. We built the entire integration with Codex, taking it from an empty folder all the way to a live Cloud Run service.
What we learned
Codex is genuinely good at diagnosing issues, beyond just writing code. It measured the blank page bug frame by frame instead of guessing and caught a stateless transport issue I would have missed for hours. I learned that the truly hard part of an AI app is getting perfect timing, capture, storage, and concurrency. Because it is built on MCP, the same server that runs in ChatGPT can later run in Claude with almost no extra work.
What's next
for Aipen for ChatGPT Account linking and credits so subscribers can upload and use their own handwriting from all around the world. Major European languages are already supported! More templates for letters, flashcards, lab reports, branded stationery and more.. Adapting the core MCP for other clients like Claude. Making the whole experience feel totally instant.
Aipen for ChatGPT
Turn any ChatGPT answer into hyper realistic handwritten, print-ready notes without leaving the chat.
Aipen for ChatGPT is an OpenAI Apps SDK application built on MCP. Ask ChatGPT for notes, a worked solution, a letter, or a report, and Aipen renders it as a paginated A4 handwritten document with an inline preview and a downloadable vector PDF that stays crisp when printed or zoomed in.
This repository intentionally contains only the standalone MCP server and its inline ChatGPT component. The proprietary Aipen editor and render engine remain separate. Its humanization layer can select from up to 20 glyph variations per character, which helps long documents avoid a mechanically repeated look.
The images above are real Aipen renders: handwritten layout, ruled A4 paper, humanized letterforms, rendered mathematics, and an accurate hand-drawn graph.
Judge Quick Start: No Rebuild Needed
The live MCP endpoint is:
https://aipen-mcp-511200400258.us-central1.run.app/mcp
To test it in ChatGPT Developer Mode:
-
Open ChatGPT and enable Developer Mode.
-
Create or add a custom app/connector.
-
Paste the live endpoint above as the MCP server URL.
-
Start a new chat and ask, for example:
Create two pages of handwritten calculus revision notes with worked examples. -
ChatGPT calls
make_handwriting. Wait for the inline Aipen card, preview the handwritten page, change style options if desired, and select Download PDF.
The demo accepts up to 6,500 characters, renders up to five pages per request, and allows 40 renders per IP per hour.
Demo Video
Watch the full 4K trailer and product walkthrough on YouTube:
https://www.youtube.com/watch?v=SdR5WnF-BUk
Architecture
ChatGPT
-> MCP server on Cloud Run
-> Playwright / headless Chromium
-> private Aipen render engine
-> per-page JPEG previews + vector PDF
-> private Google Cloud Storage artifacts
-> inline Aipen card in ChatGPT
Under the hood, the MCP receives structured note text and appearance options,
opens Aipen in a headless browser, waits for Aipen to finish rendering, captures
each Paged.js page as a modest JPEG preview, and produces the final PDF with
Chromium page.pdf(). The PDF is not assembled from preview images.
Artifacts are placed in a private Google Cloud Storage bucket and served through
the MCP's /assets/:id proxy. The app enforces a one-hour artifact expiry;
bucket lifecycle cleanup removes leftover objects later.
Features
- Inline ChatGPT UI with A4 paper preview and PDF download
- True vector PDF output from Chromium: text and paths stay crisp at any zoom
- Per-page JPEG thumbnails for fast previews
- Accurate hand-drawn graphs and charts when explicitly requested
- Four Aipen handwriting styles: Classic, Clean, Script, Casual
- Ink, paper, and humanization controls
- Markdown and LaTex-style math support through the Aipen render engine
- Hard demo protections: 6,500 characters, five pages, 40 renders/IP/hour
- Private, temporary artifact storage with no browser-exposed cloud credentials
Study Materials
Aipen turns AI explanations into printable, annotatable study materials. Learners can review, highlight, and work through them by hand. It does not claim that viewing generated handwriting has the same learning effect as personally writing notes by hand.
Language Support
Native handwriting currently supports English and languages using the standard English alphabet, including Afrikaans, Albanian, Catalan, Croatian, Czech, Danish, Dutch, Estonian, Finnish, French, German, Icelandic, Irish, Italian, Latvian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Slovak, Slovenian, Spanish, Swedish, Turkish, and Welsh. More languages are planned.
Future Possibilities
Aipen is designed to grow beyond study notes. Planned directions include:
- Letter and email automation with handwritten, print-ready output
- Branded stationery, business documents, and personalized card templates
- Real-estate packs, lab reports, finance notes, and subject-specific layouts
Local Development
Requirements:
- Node.js 20+
- A Chromium-capable machine
- An Aipen render URL
- Google Cloud Application Default Credentials for local artifact storage
npm ci
npx playwright install chromium
gcloud auth application-default login
$env:AIPEN_RENDER_BASE = "https://aipen-render-511200400258.us-central1.run.app"
$env:GCS_ARTIFACT_BUCKET = "aipen-mcp-artifacts"
$env:PORT = "3001"
npm run check
npm run build
node dist/index.js
For local Aipen engine development, replace AIPEN_RENDER_BASE with your local
render server, such as http://localhost:3000.
The local MCP endpoint is http://localhost:3001/mcp.
Deployment Checklist
- Confirm
PUBLIC_BASE_URLis set to the canonical public Cloud Run URL. - Confirm production traffic targets only the intended revision.
- After any tagged test revision, remove its tag and verify the traffic output
has no
tagor taggedurlentries before considering the deployment complete.
Environment Variables
| Variable | Required | Purpose |
|---|---|---|
PORT | No | HTTP port. Defaults to 3000. |
AIPEN_RENDER_BASE | Yes in production | Base URL for the Aipen render engine. |
GCS_ARTIFACT_BUCKET | No | Private artifact bucket. Defaults to aipen-mcp-artifacts. |
PUBLIC_BASE_URL | No | Overrides the externally visible MCP origin for artifact URLs. |
MAX_ANONYMOUS_RENDERS_PER_HOUR | No | Per-IP demo allowance. Defaults to 40. |
On Cloud Run, the attached service account receives bucket-only
roles/storage.objectAdmin; no JSON key, API key, or Secret Manager value is
required for artifact access.
Built With Codex and GPT-5.6
OpenAI Codex and GPT-5.6 assisted with the MCP server, Apps SDK integration, Playwright render pipeline, inline ChatGPT UI, Cloud Run containerization, Google Cloud Storage artifact persistence, tests, and documentation. Aipen provides the independent handwriting render engine, page design, fonts, math rendering, paper styles, and glyph humanization.
License
MIT. See LICENSE.
Analysis
View
Metric
- 13
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- ExpressIn code
- TypeScriptIn code
2 of 2 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
56 KB
Source files
3
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
MunBohora/aipen-chatgpt-app
14 files · 1.0 MB · @ a115775
Structure
Application logic
4 files · 29%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript89%
- Markdown11%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 10- @google-cloud/storage
- @modelcontextprotocol/ext-apps
- @modelcontextprotocol/sdk
- express
- playwright
- zod
- +4 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.