Skip to main content

Connect MCP Express with Client Credentials

Learn how to connect your AI tool to an MCP Express server using Client Credentials (Client ID & Client Secret).

Once connected, your AI tool will have access to every tool on your authorized server.

Prerequisites

Before you begin, ensure you have:

  • An active MCP Express account with at least one server configured
  • An AI tool that supports remote MCP servers
  • Node.js installed on your machine
  • Downloaded the MCP CLI

Step 1: Generate Client Credentials

To configure your AI tool using Client Credentials, you first need to create a client in MCP Express.

  1. Navigate to the MCP Express Clients.

  2. Click Add New Client.

  3. Fill in the Client Name and select the server this client will access.

  4. After creation, your Client ID and Client Secret will be displayed. Copy them for use in the AI tool configuration.

warning

Deleting a client in MCP Express will immediately invalidate its CLIENT_ID and CLIENT_SECRET.

Step 2: Configure Your AI Tool

Claude Desktop

  1. Open your configuration file:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Linux: ~/.config/claude-desktop/claude_desktop_config.json
  2. Add your MCP server configuration:

{
"mcpServers": {
"my-custom-tools": {
"command": "node",
"args": ["<path_to_mcp-express-cli.js>"],
"env": {
"CLIENT_ID": "<your_client_id>",
"CLIENT_SECRET": "<your_client_secret>"
}
}
}
}
  1. Save and restart Claude Desktop
  2. Verify the connection by checking available MCP tools
info

Need more details on setup, commands, and MCP behavior in Claude Desktop? View Claude Desktop docs

Cursor

  1. Open Cursor Settings → MCP → Add new global MCP server
  2. Paste:
{
"mcpServers": {
"my-custom-tools": {
"command": "node",
"args": ["<path_to_mcp-express-cli.js>"],
"env": {
"CLIENT_ID": "<your_client_id>",
"CLIENT_SECRET": "<your_client_secret>"
}
}
}
}
  1. Save and restart Cursor
  2. Trigger any MCP tool to complete the connection
tip

You can share this configuration with your team by adding a .cursor/mcp.json file to your project’s root directory.

info

Need help with Cursor MCP setup or understanding how Cursor manages context? View Cursor MCP docs

VS Code

  1. Create .vscode/mcp.json:
{
"servers": {
"my-custom-tools": {
"type": "node",
"command": "node",
"args": ["<path_to_mcp-express-cli.js>"],
"env": {
"CLIENT_ID": "<your_client_id>",
"CLIENT_SECRET": "<your_client_secret>"
}
}
}
}
  1. Open Command Palette (Ctrl+Shift+P) → MCP: List Servers
  2. Start your MCP server and authorize
tip

You can share this configuration with your team by adding a .vscode/mcp.json file to your project’s root directory.

info

Need more details on VS Code MCP setup and usage? View VS Code MCP docs

Windsurf

  1. Open Settings (Cmd + ,) → Search MCP
  2. Open mcp_config.json and add:
{
"mcpServers": {
"my-custom-tools": {
"command": "node",
"args": ["<path_to_mcp-express-cli.js>"],
"env": {
"CLIENT_ID": "<your_client_id>",
"CLIENT_SECRET": "<your_client_secret>"
}
}
}
}
  1. Save, restart Windsurf, and authorize
info

Need more details on Windsurf MCP setup and usage? View Windsurf MCP docs

Codex

  1. Open your Codex configuration file:
~/.codex/config.toml
  1. Add:
[mcp_servers.my-custom-tools]
command = "node"
args = ["<path_to_mcp-express-cli.js>"]
env.CLIENT_ID = "<your_client_id>"
env.CLIENT_SECRET = "<your_client_secret>"
  1. Run command:
codex mcp login my-custom-tools
  1. Complete authorization
info

Need more details on Codex MCP setup and usage? View Codex MCP docs

Available tools

After authorization, your AI assistant will have access to all tools published on your server.

To view available tools, ask:

What tools do you have access to? Use MCP.

Your AI assistant will list all available tools on your authorized server, along with a brief description of each.

If a tool is missing, ensure you are connected to the correct server and check your MCP Express servers

Troubleshooting

Connection not working
  • Verify your Client ID and Client Secret are correct
  • Ensure the MCP server is running locally or accessible remotely
  • Recheck the args path to your mcp-express-cli.js file
Tools not appearing
  • Make sure the AI tool is connected to the correct MCP server
  • Restart the AI tool after configuration changes
  • Trigger a fresh MCP request
Authorization errors
  • Confirm environment variables are set properly
  • Check your firewall or network settings for blocking the MCP server port
  • Try reconnecting your AI tool

For any issues not covered above, or if you need further assistance, please contact our support team: MCP Express Support

Unsupported Tools

If your AI tool does not natively support connecting to an MCP server using Client Credentials, the recommended approach is:

  • Check for official plugins or extensions: Certain AI clients may offer MCP integration via third-party extensions or official connectors. Consult your tool’s documentation for supported methods.
tip

Check the official documentation of your AI client to confirm whether it supports Model Context Protocol (MCP) and how to configure it properly.