OpenAPI Client

v1.0.0APIsstable

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.

agentic-aicsharpdotnetdotnet-toolmcp
Share:
18
Stars
0
Downloads
0
Weekly
0/5

What is OpenAPI Client?

OpenAPI Client is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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...

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.

This server falls under the APIs and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • OpenAPI Client is a toolkit that helps you create HTTP clien

Use Cases

Create HTTP clients from OpenAPI specifications automatically.
Simplify consumption and interaction with external web services.
lepoco

Maintainer

LicenseMIT
Languagec#
Versionv1.0.0
UpdatedFeb 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx openapi-client

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use OpenAPI Client

OpenAPI Client is a .NET toolkit and MCP server that helps AI assistants and developers generate HTTP clients from OpenAPI and Swagger specifications. It exposes five MCP tools for listing operations, retrieving response schemas, validating OpenAPI documents, generating cURL commands, and producing C# HTTP client snippets — making it easy to explore and consume any REST API from within an AI coding workflow. It ships as both a NuGet source generator package and a global dotnet CLI tool.

Prerequisites

  • C# 8.0 or later with nullable reference types enabled
  • .NET runtime installed (for the CLI tool method)
  • Docker installed (for the Docker method, no .NET SDK needed on the host)
  • An OpenAPI or Swagger JSON specification file or URL
  • An MCP-enabled client such as Claude Desktop or VS Code with Copilot
1

Choose your installation method: dotnet CLI tool or Docker

The dotnet CLI tool requires .NET SDK. The Docker image requires only Docker and has no local .NET dependency.

2

Install the CLI tool (dotnet method)

Install the OpenApiClient.Cli tool globally so it is available as a dotnet tool command.

dotnet tool install --global OpenApiClient.Cli
3

Configure the MCP server (dotnet method)

Add the server to your MCP client configuration file using the dotnet openapi command.

{
  "mcpServers": {
    "openapi": {
      "command": "dotnet",
      "args": ["openapi", "mcp"]
    }
  }
}
4

Configure the MCP server (Docker method)

Alternatively, use the Docker image — no .NET installation required. The MODE environment variable selects stdio (default) or HTTP transport.

{
  "mcpServers": {
    "openapi": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp/openapi"]
    }
  }
}
5

Restart your MCP client and explore an API

Restart your client. The server exposes five tools: get_list_of_operations, get_known_responses, validate_document, generate_curl_command, and create_csharp_snippet. Point any tool at an OpenAPI JSON URL or local file path.

6

Optional: use the source generator in a .NET project

Add the NuGet source generator package to automatically generate typed HTTP clients from an OpenAPI spec at build time.

dotnet add package OpenApiClient

OpenAPI Client Examples

Client configuration

Docker-based MCP config for claude_desktop_config.json — works without a local .NET installation.

{
  "mcpServers": {
    "openapi": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp/openapi"]
    }
  }
}

Prompts to try

Example prompts using the five MCP tools to explore and interact with an OpenAPI-described REST API.

- "List all operations in the OpenAPI spec at https://petstore.swagger.io/v2/swagger.json"
- "Validate the OpenAPI document at ./api/openapi.json and report any errors"
- "Generate a cURL command for the createUser operation in the Petstore API"
- "Create a C# HTTP snippet for the getPetById operation"
- "Show me the expected response schema for the listPets operation"

Troubleshooting OpenAPI Client

dotnet openapi command not found after installation

Ensure the global dotnet tools directory is on your PATH. Run 'dotnet tool list -g' to verify OpenApiClient.Cli is installed. On macOS/Linux, add '$HOME/.dotnet/tools' to your PATH in .bashrc or .zshrc.

validate_document returns errors for a valid OpenAPI file

The tool expects OpenAPI JSON format (not YAML). Convert your YAML spec to JSON first using a tool like 'npx js-yaml spec.yaml > spec.json' or an online converter, then point the tool at the JSON file.

Docker image 'mcp/openapi' not found

Check the GitHub repository at https://github.com/lepoco/openapi.client for the correct published Docker image name and tag. You may need to build the image locally: 'docker build -t mcp/openapi .' from the cloned repository.

Frequently Asked Questions about OpenAPI Client

What is OpenAPI Client?

OpenAPI Client is a Model Context Protocol (MCP) server that 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. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install OpenAPI Client?

Follow the installation instructions on the OpenAPI Client GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with OpenAPI Client?

OpenAPI Client works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is OpenAPI Client free to use?

Yes, OpenAPI Client is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "openapi-client": { "command": "npx", "args": ["-y", "openapi-client"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use OpenAPI Client?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides