About the Project
The full and intentionally ridiculous name of this project is:
“Major-Blood-Vessel-About-to-Burst Coughing Fit of the Phlegm-Spitting Old Man You Meet on the Way Home from School Impression Generator”
Yes, that is the actual name.
This project is a deliberately absurd WebMCP experiment based on one extremely specific situation: encountering an old man on the way home from school who is coughing so violently that it looks like an important blood vessel might burst at any moment.
Despite the ridiculous premise, the project explores a serious interaction idea: allowing a human and an AI agent to control the same web application through a shared application state.
What It Does
The app generates a fictional coughing-fit impression using several adjustable parameters, including:
- Cough Intensity
- Major Blood Vessel Danger
- Encounter Distance
- Throat Congestion
- Cough Burst Count
- Phlegm Event Chance
A human can control these settings directly through the interface.
With WebMCP, ChatGPT can also control the same application by calling tools exposed by the website. For example, ChatGPT can change the cough intensity, adjust the encounter distance, modify other parameters, and generate the coughing fit.
The important part is that the human interface and the AI tools are not separate experiences. They operate on the same application state.
A human can change a slider, then an AI can change it again, and the interface immediately reflects the result.
The Audio
All original cough sounds used in this project were recorded by me.
No elderly men were recorded for this project.
Instead of using stock audio or third-party cough samples, I performed and recorded the coughing sounds myself. The recordings are then dynamically processed by JavaScript to create variations in the final coughing fits.
The application uses browser audio processing to alter characteristics of the recordings and combine them into different sequences depending on the current settings.
In other words:
The creator provided the cough. JavaScript provided the old man.
WebMCP
The application exposes its controls as WebMCP tools using document.modelContext.registerTool.
This allows an AI agent such as ChatGPT to understand the actions available on the website without having to guess how to interact with the visual interface.
The WebMCP tools connect directly to the same underlying state and functions used by the human-facing controls.
For example, an agent can receive an instruction such as:
“Set the cough intensity to 10, set the major blood vessel danger to 95, set the encounter distance to 1 meter, and generate the coughing fit.”
The application then updates the corresponding controls and generates the result.
This creates a simple demonstration of human-agent collaboration in which both sides can operate the same web application.
How It Was Built
The project was built with:
- JavaScript
- Vite
- Web Audio API
- WebMCP
- HTML and CSS
- Vercel
The coughing audio is based on creator-recorded samples and is processed dynamically in the browser.
The project does not require an external AI API for the website itself. Instead, it exposes capabilities through WebMCP so compatible AI agents can interact with the application.
Why This Project?
I wanted to build something that demonstrated WebMCP clearly without hiding the interaction behind a complicated application.
The interface intentionally makes it obvious when a human changes a value and when an AI agent changes the same value.
The absurd premise also makes the demonstration easy to remember.
Many agent demos focus on productivity.
This one focuses on a fictional phlegm-spitting old man coughing on the way home from school.
Someone had to.
Development
This project was built under a tight hackathon deadline, so I intentionally kept the interface focused and relatively minimal in order to prioritize WebMCP interaction, reliability, and a working public demonstration.
The final application is deployed publicly and can be controlled manually or through WebMCP in a compatible browser environment.
What began as an extremely unnecessary coughing simulator became an experiment in giving humans and AI agents equal access to the same interactive web application.
Built With
- chatgpt
- codex
- css
- html
- javascript
- openai
- vercel
- vite
- webmcp
Log in or sign up for Devpost to join the conversation.