MCP Client Template

v1.0.0Developer Toolsstable

A template for building MCP (Model Context Protocol) client applications, featuring a Vite + TypeScript frontend and an Express backend. Includes OAuth2.1 authentication and ready-to-use APIs for managing and interacting with MCP servers. Easily exte

mcp-client-templatemcpai-integration
Share:
8
Stars
0
Downloads
0
Weekly
0/5

What is MCP Client Template?

MCP Client Template is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to template for building mcp (model context protocol) client applications, featuring a vite + typescript frontend and an express backend. includes oauth2.1 authentication and ready-to-use apis for managi...

A template for building MCP (Model Context Protocol) client applications, featuring a Vite + TypeScript frontend and an Express backend. Includes OAuth2.1 authentication and ready-to-use APIs for managing and interacting with MCP servers. Easily exte

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

Features

  • A template for building MCP (Model Context Protocol) client

Use Cases

Template for building MCP client applications with Vite and Express.
Include OAuth2.1 authentication for production apps.
andrea9293

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedSep 22, 2025
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-client-template

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 Template

MCP Client Template is a full-stack starter project for building custom MCP client applications. It combines a Vite and TypeScript frontend with an Express.js backend, and includes built-in OAuth 2.1 authentication support and ready-to-use REST APIs for managing connections to multiple MCP servers. It is designed to be extended rather than used as a standalone tool.

Prerequisites

  • Node.js 18 or later
  • npm (bundled with Node.js)
  • Git to clone the repository
  • Basic familiarity with TypeScript, Vite, and Express.js
  • An MCP server to connect to for testing (any publicly available MCP server will work)
1

Clone the repository

Download the template to your local machine using Git.

git clone https://github.com/andrea9293/mcp-client-template.git
cd mcp-client-template
2

Install dependencies

Install all frontend and backend dependencies from the project root.

npm install
3

Start the development servers

Run the Vite frontend and Express backend concurrently. The frontend runs on the Vite default port (5173) and the backend on its configured Express port.

# Start the frontend
npm run dev

# In a separate terminal, start the backend
npm run dev:server
4

Connect an MCP server via the web interface

Open your browser to http://localhost:5173, use the UI to add an MCP server URL, and the backend will manage the connection. For servers requiring OAuth 2.1, copy the authentication link provided by the interface and complete the flow in a new browser tab.

5

Customize the template for your use case

Extend the frontend in the src/ directory and backend logic in the server/ directory. The data/ folder stores runtime tokens and connection state — do not edit it manually.

MCP Client Template Examples

Client configuration

This template acts as an MCP client itself. There is no claude_desktop_config.json entry — instead, configure MCP servers through the web interface or directly in the Express backend configuration.

{
  "mcpServers": {
    "example-server": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
    }
  }
}

Prompts to try

Actions to perform through the template's web interface after setup.

- Add an MCP server URL through the UI and verify the connection status
- Connect to a server requiring OAuth 2.1 and complete the authentication flow
- Send a tool call to a connected MCP server and inspect the JSON response
- Review the token store at server/authTokensStore.ts to customize token persistence

Troubleshooting MCP Client Template

Frontend cannot reach the Express backend

Ensure both 'npm run dev' and 'npm run dev:server' are running simultaneously in separate terminals. Check that the frontend's API base URL in the Vite config matches the port the Express server is listening on.

OAuth 2.1 authentication loop or redirect failure

The OAuth flow requires completing the redirect in a full browser tab, not the embedded interface. When the interface presents an authentication link, open it in a new tab, complete authorization, and return to the app. Do not block third-party cookies in your browser during this flow.

data/ folder causes errors after manual edits

The data/ directory stores runtime state managed by the backend. Do not manually edit files inside it. If the state becomes corrupted, delete the contents of data/ and restart the backend server to reinitialize.

Frequently Asked Questions about MCP Client Template

What is MCP Client Template?

MCP Client Template is a Model Context Protocol (MCP) server that template for building mcp (model context protocol) client applications, featuring a vite + typescript frontend and an express backend. includes oauth2.1 authentication and ready-to-use apis for managing and interacting with mcp servers. easily exte It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Client Template?

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

Which AI clients work with MCP Client Template?

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

Is MCP Client Template free to use?

Yes, MCP Client Template 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-template": { "command": "npx", "args": ["-y", "mcp-client-template"] } } }

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

Read the full setup guide →

Ready to use MCP Client Template?

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