We built Context Plugins: given an OpenAPI spec, we generate SDKs and an MCP server that exposes structured API context to AI coding assistants.
This gives tools like Cursor access to comprehensive, up-to-date API context (including SDK documentation and API integration patterns), instead of relying on outdated training data or code scraped from GitHub.
We've just launched a pilot with PayPal, it's live on the PayPal Developer Portal https://developer.paypal.com/serversdk/java/getting-started/....
In our benchmarks for the PayPal API, Cursor generated integration code 2x faster with 65% lower token usage compared to baseline Cursor without the plugin.
The problem we kept seeing was AI coding assistants generating incorrect API integration code. We asked Cursor to integrate the PayPal API into an e-commerce application across multiple runs:
- 13% of runs pulled in a deprecated SDK.
- 87% generated HTTP calls based on deprecated documentation.
API providers maintain API and SDK docs, but AI assistants don’t always use them. They use a combination of web search, training data and hallucinations to write API integration code.
As a result, developers end up debugging and rewriting AI-generated code.
We've been generating SDKs from API specs for 10+ years at APIMatic. When AI coding assistants started generating the exact kind of broken integration code we'd spent a decade fixing, we asked: what if we could take our code generation pipeline and add AI context generation to it?
MCP gave us the transport layer. Our API spec parsing and SDK generation engine gave us the context. The combination meant we could deliver deterministic API context, derived from the canonical spec, directly into the developer's IDE.
Here's how it works:
1. An API provider uploads their OpenAPI spec to APIMatic.
2. We generate and publish high quality SDKs in multiple languages.
3. We generate an MCP server containing tools and prompts that expose language-specific SDK context, optimized for LLMs.
4. Developers wanting to integrate with the API install the MCP server in Cursor, Claude Code, or GitHub Copilot.
When a developer asks to integrate auth, the coding assistant queries the MCP server, retrieves the required context (auth flows, integration patterns, latest SDK version, SDK interfaces etc.), and generates code using the official SDK.
Getting started:
- We've published Context Plugins for ten APIs. The URL in this post takes you to our public showcase, which is the quickest way to try them out without signing up.
- If you want to generate Context Plugins from your own API, you can sign up for a free trial on the APIMatic website (2-week all-access trial, no credit card required).
Feedback:
We'd love for you to try out Context Plugins and give us your feedback and suggestions. Two questions for the HN community:
- What's the worst AI-generated API integration bug you've encountered? We're collecting failure patterns to improve our context coverage.
- What context do you think coding assistants need to generate accurate API integration code, in addition to API or SDK contracts?