Machine Internet turns hidden web APIs into MCP servers
Machine Internet a tool developed by chetanty transforms web applications with hidden APIs into MCP servers. The system operates without requiring an official API specification. Instead it watches the hidden API calls a page makes and turns them into clean tools that Claude Cursor or any MCP client can call directly.
How the wrap process works
The core functionality lives in the wrap command. Machine Internet opens a site in a headless browser watches the hidden API calls the page makes and turns them into a small set of clean tools. The process begins by pointing the wrap command at a URL. For example:
uvx machine-internet wrap https://www.ycombinator.com/companies
This opens Y Combinator's company directory in a headless browser captures the API calls and infers endpoints. The first run downloads headless Chromium automatically about 120 MB. Wrapping takes one to three minutes and costs a few cents of LLM usage or nothing on Gemini's free tier.
Five pre-wrapped sites available immediately
Five sites come pre-wrapped and ready to use. None of these sites have an official public API or MCP server for this data. The tools hit the same endpoints the site's own page uses. The pre-wrapped examples are:
- yc_companies YC company directory
- spotify_podcasts Spotify Podcast Charts
- substack Substack search
- vscode_marketplace VS Code Marketplace
- bundlephobia bundlephobia.com
Each one was made with wrap then tidied by hand. The VS Code request body parameter defaults and for Spotify and Substack merged or renamed tools one broken tool removed and responses trimmed to useful fields.
Adding a wrapped server to your MCP client
To use a wrapped server add it to your Claude Desktop or Cursor config. The configuration block for YC companies appears as:
{ "mcpServers": { "yc": { "command": "uvx", "args": ["machine-internet", "serve", "yc_companies"] } }
Restart your client and ask: "Which YC companies from the last two batches are building robotics and what do they do?" The tool search_companies searches every YC company by keyword batch industry status team size.
Requirements and setup
You need uv for uvx. Or install machine-internet once with pip install machine-internet (or straight from GitHub pip install git+https://github.com/chetanty/machine_internet) and use machine-internet as the command. A Gemini API key works as the easiest option get one free at aistudio.google.com/apikey free tier no credit card. Anthropic and OpenAI keys work too. Set the environment variable export GEMINI_API_KEY=your-key then point at a page that loads data as you use it.
uvx machine-internet wrap https://www.ycombinator.com/companies --name ycWrapping https://www.ycombinator.com/companies
The first run downloads headless Chromium automatically one time about 120 MB. Wrapping takes one to three minutes and costs a few cents of LLM usage or nothing on Gemini's free tier. Serving afterwards needs no LLM at all. Gemini's free tier has a small daily quota per model enough for roughly 20 wraps a day in testing. When it runs out Machine Internet falls back to Gemini Flash-Lite automatically if that is out too wait a day or add an Anthropic or OpenAI key.
What types of sites work best
Machine Internet works on sites whose pages load their data with API calls from the browser. This includes most single-page apps search pages dashboards and developer tools. It does not work on sites that render pages on the server or that block headless browsers.
Results from pointing wrap at 51 sites show about one in three arbitrary sites work fully. Developer tools directories and search pages built as single-page apps do much better. Big retail sites and Google products rarely work.
The table below shows the breakdown of results:
- Works YC company directory Spotify Podcast Charts Substack search Fontshare OpenRouter rankings Luma crates.io deps.dev Hugging Face archive.org HN Search OSS Insight bundlephobia npm trends regex101
- Works after a hand fix VS Code Marketplace (nested request body) caniuse (form-encoded body)
- Wrong data found IKEA only the category tree search runs on another domain Raycast Store and Rotten Tomatoes only session or layout calls Nike Target and Coursera only privacy store-picker or cart calls mostly locked
- Search key locked to the site Michelin Guide its Algolia key only works from guide.michelin.com so it is left alone
- Partly works Open Library 1 of 2 tools ESPN side data only scores server-rendered Steam search works but returns ready-made HTML
- No data API found server-rendered Docker Hub IMDb Reddit GitHub Trending npmjs.com Metacritic Resident Advisor HowLongToBeat JSR Figma Community
- Data on another service a16z portfolio Google and LinkedIn embeds Sequoia served by Framer
- Blocked by bot protection Devpost LMArena Printables Product Hunt lichess packagephobia Bandcamp Kickstarter Goodreads
- Unusable internal format Google Fonts Google's batchexecute RPC dev.to only a session-token call Chrome Web Store same Google format
How the inference process works
The wrap command follows several steps. Traffic sniffing otherwise launches headless Chromium loads the page scrolls and clicks through it and records every same-site JSON request. Analytics and ad trackers are filtered out. Inference an LLM reads the captured requests and responses and infers each endpoint's path parameters and types. Condensation an LLM collapses the endpoints into at most 15 verb_noun tools with descriptions written so an agent knows when to use each one. Serving the result is a small JSON file. machine-internet serve exposes it as a standard MCP server stdio by default SSE with --sse that makes real calls to the real site.
Technical details and limitations
Wrapped servers are saved to ~/.machine-internet/schemas/. APIs that need auth credentials are read from the environment when the server runs MI_TOKEN bearer MI_API_KEY plus MI_API_KEY_NAME MI_API_KEY_IN header|query MI_USERNAME MI_PASSWORD or MI_TOKEN_URL MI_CLIENT_ID MI_CLIENT_SECRET for OAuth2 client credentials. Put them in the env block of your MCP client config.
Read-only by design wrap leaves out anything that would change data on the site carts logins posting tracking even if the page made such a call while it was being sniffed. Internal APIs change without notice a wrapped site can break when it ships a new frontend. Re-run wrap to refresh it. It only sees what the page does while loading and being clicked. Actions behind logins multi-step forms or heavy anti-bot protection usually are not captured. LLM output varies if the tools look wrong run wrap again or narrow the page you point it at.
Undocumented APIs are still someone else's service. Check the site's terms before wrapping it keep request volume reasonable and do not use this to get around access controls or rate limits.
Comparison with other approaches
| Machine Internet | OpenAPI-to-MCP converters | Browser agents | |
|---|---|---|---|
| Works without an API spec | Yes | No | Yes |
| Agent calls the API directly fast cheap per call | Yes | Yes | No drives a browser every time |
| One command from URL to MCP server | Yes | Needs a spec | No |
Related work worth knowing: Integuru generates integration code from captured traffic and mitmproxy2swagger builds OpenAPI specs from recorded traffic. Machine Internet's focus is going straight from a URL to a running MCP server.
Getting started with the source code
git clone https://github.com/chetanty/machine_internet
cd machine_internet
pip install -e ".[dev]"
pytest
python evals/score.py # condensation quality evals (needs an LLM key)
License Apache 2.0.