Get the FREE Ultimate OpenClaw Setup Guide →

openapi.client

OpenAPI Client is a toolkit that helps you create HTTP clients for external APIs based on their OpenAPI specifications. It simplifies the process of consuming and interacting with various web services.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio lepoco-openapi.client docker run -i --rm mcp/openapi

How to use

OpenAPI Client's MCP Server exposes a set of tools to inspect, validate, and generate requests from OpenAPI specifications. It includes capabilities to list operations, enumerate known responses, validate documents, generate curl commands for specific operations, and create simple C# HTTP request snippets. Once the MCP server is running inside your MCP environment, you can invoke these built-in tools to quickly analyze an OpenAPI document and produce ready-to-use HTTP interactions or client code snippets for integration into your projects.

How to install

Prerequisites:

  • Docker installed and running (or a compatible MCP runtime environment that can host a container).
  • Optional: .NET SDK if you plan to build the image from source or publish container artifacts locally.

Install from MCP-ready container (recommended):

  1. Ensure Docker is running.
  2. Start the MCP server using the provided container image in this repository (the example in the README uses the image name mcp/openapi).

If you prefer to build locally from source:

  1. Ensure .NET SDK is installed.
  2. Build the container image:
    • docker buildx build ./ -t mcp/openapi --no-cache
    • or, if you prefer a direct publish: dotnet publish ./src/OpenApi.Client.Mcp/OpenApi.Client.Mcp.csproj -c Release /t:PublishContainer
  3. Run the container:
    • docker run -d -i --rm --name mcp-openapi mcp/openapi
    • or for HTTP mode with port exposure: docker run -d -i --rm --name mcp-openapi mcp/openapi -e MODE=Http -p 64622:8080

Note: The repository README demonstrates a Docker-based workflow; adapt the commands to your MCP orchestration setup if you have a different runtime.

Additional notes

Tips:

  • The MCP server in this project provides utilities for OpenAPI documents: get_list_of_operations, get_known_responses, validate_document, generate_curl_command, and create_csharp_snippet.
  • If you run in HTTP mode, port mappings (e.g., -p 64622:8080) may be required to expose the endpoints to your tooling.
  • Ensure your OpenAPI document is accessible to the container (volume mounts or mounted URLs may be necessary in some environments).
  • When using the code generation features, ensure your OpenAPI spec conforms to the OpenAPI spec version used by the tool to avoid parsing errors.
  • If you encounter networking or permission issues inside containers, verify Docker permissions for your user and that the container has network access to the OpenAPI document source.
  • This MCP server is container-based; for Node.js package naming, there is no npm package in this configuration (null).

Related MCP Servers

Sponsor this space

Reach thousands of developers