MCP Client Gen

v1.0.0Developer Toolsstable

Turn any MCP server into a type-safe TypeScript SDK in seconds - with OAuth 2.1 and multi-provider support

aiai-agentanthropicbunclaude
Share:
16
Stars
0
Downloads
0
Weekly
0/5

What is MCP Client Gen?

MCP Client Gen is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to turn any mcp server into a type-safe typescript sdk in seconds - with oauth 2.1 and multi-provider support

Turn any MCP server into a type-safe TypeScript SDK in seconds - with OAuth 2.1 and multi-provider support

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

Features

  • Turn any MCP server into a type-safe TypeScript SDK in secon

Use Cases

Auto-generate TypeScript SDK from MCP
OAuth 2.1 and multi-provider support
kriasoft

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMar 5, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-client-gen

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 MCP Client Gen

MCP Client Gen is a code generation tool that introspects any MCP server's schema and produces a fully type-safe TypeScript SDK for it in seconds. It handles OAuth 2.1 authentication automatically via Dynamic Client Registration and PKCE, supports multiple MCP providers, and outputs a typed client factory you can import directly into your TypeScript application. Developers use it to avoid writing boilerplate MCP client code and to get autocomplete and type checking when calling MCP server tools programmatically.

Prerequisites

  • Node.js 18 or later, or Bun runtime installed
  • npx or bun available in your PATH
  • The URL of an MCP server whose SDK you want to generate
  • An MCP-compatible client (Claude Desktop, Cursor) for using the generator as an MCP tool itself
1

Install mcp-client-gen globally

Install the package globally with npm or bun for convenient command-line use.

npm install -g mcp-client-gen
# Or with bun:
bun add -g mcp-client-gen
2

Generate a TypeScript SDK from an MCP server URL

Point the generator at an MCP server URL. It introspects the server's tool schema and generates a typed TypeScript file. The -o flag sets the output file path.

npx mcp-client-gen https://mcp.notion.com/mcp -o ./src/notion-client.ts
3

Use the generated client in your application

Import the generated factory function and create a typed connection. The client methods map directly to the MCP server's tools with full TypeScript type inference.

import { createMcpConnection } from './notion-client';

const connection = await createMcpConnection({
  url: 'https://mcp.notion.com/mcp'
});
const notion = createNotionClient(connection);
const pages = await notion.notionSearch({ query: 'Meeting Notes' });
4

Configure for use as an MCP tool in Claude Desktop

You can also run mcp-client-gen as an MCP server itself, allowing Claude to generate SDKs on your behalf. Add it to your Claude Desktop configuration.

{
  "mcpServers": {
    "mcp-client-gen": {
      "command": "npx",
      "args": ["-y", "mcp-client-gen"]
    }
  }
}
5

Handle OAuth-protected servers

For MCP servers that require OAuth, mcp-client-gen automatically triggers browser-based authentication using Dynamic Client Registration and PKCE. No manual credential configuration is needed — the browser will open for you to log in.

MCP Client Gen Examples

Client configuration

Claude Desktop config to run mcp-client-gen as an MCP server, enabling Claude to generate SDKs for other servers.

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

Prompts to try

Example prompts when using mcp-client-gen as an MCP tool inside Claude Desktop.

- "Generate a TypeScript SDK for the Notion MCP server at https://mcp.notion.com/mcp"
- "Create a type-safe client for the MCP server at https://api.example.com/mcp and save it to ./clients/example.ts"
- "Introspect the MCP server at https://mcp.linear.app/mcp and list all the tools it exposes before generating the SDK"

Troubleshooting MCP Client Gen

Generation fails with 'Cannot connect to MCP server' error

Verify the MCP server URL is correct and publicly accessible. Some MCP servers require authentication before exposing their schema — for OAuth-protected servers, ensure you complete the browser login flow when prompted.

Generated TypeScript file has type errors in your project

Ensure your project's TypeScript version is 4.9 or later. The generated SDK uses modern TypeScript features including template literal types and const assertions. Run 'npx tsc --version' to check and upgrade if needed.

OAuth browser authentication does not open automatically

On headless or SSH environments, the browser cannot open automatically. Copy the authentication URL printed to the console and open it manually in a browser on a machine with a display. Complete the OAuth flow and the token will be stored for future use.

Frequently Asked Questions about MCP Client Gen

What is MCP Client Gen?

MCP Client Gen is a Model Context Protocol (MCP) server that turn any mcp server into a type-safe typescript sdk in seconds - with oauth 2.1 and multi-provider support It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Client Gen?

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

Which AI clients work with MCP Client Gen?

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

Is MCP Client Gen free to use?

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

Browse More Developer Tools MCP Servers

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

Quick Config Preview

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

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

Read the full setup guide →

Ready to use MCP Client Gen?

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