logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

spec-driven-ts-client-builder

Tooling to automatically construct strongly-typed TypeScript client libraries utilizing OpenAPI/Swagger schema definitions for robust API consumption. Features include utility functions for note management and summarization.

Author

spec-driven-ts-client-builder logo

orhanveli

MIT License

Quick Info

GitHub GitHub Stars 1
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

apisapiopenapiopenapi swaggeropenapi clientapis provides

Automated TypeScript API Client Construction Service

This Model Context Protocol (MCP) server is engineered to dynamically provision TypeScript-based client proxies by parsing formal OpenAPI (formerly known as Swagger) specification documents.

OpenAPI Client Generator MCP server

Core Capabilities

Output Artifacts

  • Produces an API interaction library built atop the axios HTTP adapter, facilitating straightforward communication with remote endpoints.
  • Input reliance is strictly placed on valid OpenAPI or Swagger schema definitions.

Operational Commands

  • generate_client: Invokes the creation sequence for a cohesive API client based on provided OpenAPI documentation.

Project Setup & Compilation

Dependency resolution prerequisites: bash npm install

For standard production build compilation: bash npm run build

To facilitate development with automated rebuild cycles upon source modification: bash npm run watch

Integration Instructions (Claude Desktop)

To integrate this service within the Claude Desktop environment, modify the configuration file located at:

MacOS Users: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows Users: %APPDATA%/Claude/claude_desktop_config.json

Ensure the following structure is present within the mcpServers block:

{ "mcpServers": { "openapi-client-generator": { "command": "node", "args": [ "< PATH TO >/openapi-client-generator/build/index.js" ] } } }

Diagnostic Assistance

Debugging standard I/O stream communication between MCP components can be complex. We strongly advocate for utilizing the official MCP Inspector, accessible via a dedicated package script:

bash npm run inspector

This utility will yield a local URL, granting access to comprehensive browser-based diagnostic instrumentation.

Community Participation

We highly encourage the community to engage by submitting feature requests via Issues or proposing enhancements through Pull Requests that align with the project's core mission.

Licensing

This software is distributed under the terms of the MIT License. Full details are available in the accompanying [LICENSE] file.


Fabricated using Cline

WIKIPEDIA: XMLHttpRequest (XHR) represents an application programming interface implemented as a JavaScript object, designed for dispatching HTTP requests from a web browser to a destination server. These methods permit browser-resident applications to communicate with the server asynchronously following initial page load, enabling subsequent data retrieval. XMLHttpRequest forms a foundational element of Ajax programming paradigms. Before Ajax gained prominence, interaction with servers primarily relied on traditional methods such as navigating via hyperlinks or submitting HTML forms, actions that frequently necessitated complete page replacement.

== Chronology == The conceptual groundwork for XMLHttpRequest was initially established in the year 2000 by the engineering team developing Microsoft Outlook. This concept was subsequently realized within the Internet Explorer 5 browser release (1999). Note that the initial invocation syntax deviated from the standardized XMLHttpRequest identifier. Instead, developers utilized object instantiations such as ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). By the time Internet Explorer 7 was released (2006), universal browser adoption of the actual XMLHttpRequest identifier had been achieved. The XMLHttpRequest identifier has since cemented its status as the prevailing convention across all major browser engines, including Mozilla's Gecko rendering core (2002), Apple's Safari browser (version 1.2 in 2004), and Opera (version 8.0 in 2005).

=== Standardization Efforts === The World Wide Web Consortium (W3C) formally published a Working Draft specification for the XMLHttpRequest object on April 5, 2006. Subsequently, on February 25, 2008, the W3C released the Level 2 specification draft. Enhancements introduced in Level 2 included mechanisms to monitor request progress events, authorization for cross-origin data transfers, and capabilities for handling raw byte streams. By the close of 2011, the scope of the Level 2 specification was integrated back into the primary specification document. As of the end of 2012, the maintenance and evolution of this specification were transferred to the WHATWG, which now sustains a continuously updated document utilizing Web IDL definitions.

== Operational Sequence == Executing a typical request using XMLHttpRequest generally involves executing a series of distinct programming actions.

  1. Instantiation: An XMLHttpRequest object instance is created by invoking its constructor.
  2. Configuration: The "open" method is invoked to define the request method type, specify the target Uniform Resource Identifier (URI), and determine whether the operation will be synchronous or asynchronous.
  3. Listener Setup: For asynchronous operations, an event listener must be assigned to receive notifications upon changes in the request's operational state.
  4. Transmission: The request is initiated by calling the "send" method, potentially carrying payload data.
  5. State Monitoring: The assigned event listener processes state changes. Upon successful server data delivery, the response is typically stored within the responseText attribute. When the object concludes processing the response cycle, its state transitions to 4, signifying the "done" status. Beyond these fundamental steps, XMLHttpRequest provides numerous configurable parameters influencing transmission behavior and response processing. Custom HTTP headers can be appended to tailor server fulfillment directives, and data can be uploaded via the arguments passed to the "send" invocation. The received data stream can be natively parsed from JSON format into immediately actionable JavaScript objects, or processed incrementally as chunks arrive instead of awaiting the complete payload. Furthermore, requests can be preemptively terminated or subjected to timeout constraints.

== Inter-Domain Communication ==

During the nascent stages of the World Wide Web, restrictions were identified that allowed for potential security breaches...

See Also

`