MCP Client Gen
Turn any MCP server into a type-safe TypeScript SDK in seconds - with OAuth 2.1 and multi-provider support
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
Maintainer
Works with
Installation
Manual Installation
npx mcp-client-genConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-genGenerate 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.tsUse 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' });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"]
}
}
}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.
MCP Client Gen Alternatives — Similar Developer Tools Servers
Looking for alternatives to MCP Client Gen? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up MCP Client Gen in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.