Connect local clients like Claude Desktop to your hosted MCP Servers.
The MCP Kit Local Relay is a command-line tool that acts as a bridge between your local development environment or local applications (like Claude Desktop) and a specific MCP Server hosted remotely (e.g., using the MCP Kit server
project).
It allows applications that communicate using standard input/output (stdio
), such as Claude Desktop’s external tools feature, to interact with a chosen hosted MCP Server as if it were running locally. You do not need Claude Pro to use MCP Kit tools with local relay.
Key Functionality:
stdio
when executed by a client.To use the Local Relay, you need to clone its repository and build it locally. Ensure you have Node.js and git installed.
Clone the Repository:
Open your terminal and clone the local-relay
repository:
Install Dependencies: Install the necessary Node.js packages:
Configure:
Create the required configuration files within the local-relay
directory:
.env
File:
.env
.your_api_key_here
with a valid API key. You can generate one here.mcpconfig.json
File:
mcpconfig.json
.your_target_server_id_here
with the server ID found on the servers page.Build the Project: Compile the TypeScript code into JavaScript:
This creates a dist
directory containing the executable file (dist/index.js
).
To use the Local Relay with Claude Desktop, you need to edit Claude’s configuration file to tell it how to run the relay script.
Locate Claude Desktop Configuration:
claude_desktop_config.json
) in your default text editor and reveal its location:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Edit claude_desktop_config.json
:
local-relay
within the mcpServers
object. If mcpServers
doesn’t exist, create it. Give your relay server a name (e.g., my_remote_server
).command
should be node
.args
array should contain the full, absolute path to the dist/index.js
file within your cloned and built local-relay
directory./Users/yourname/projects/local-relay/dist/index.js
with the actual absolute path on your system.Maximum call stack size exceeded
errors, add the --stack-size=32768
argument before the script path in the args
array:Save and Restart Claude Desktop:
claude_desktop_config.json
.Verify Connection:
local-relay
’s mcpconfig.json
file listed under the server name you chose (e.g., my_remote_server
).Interact: You can now interact with the tools and resources of the configured remote MCP Server directly within Claude Desktop.
dist/index.js
in claude_desktop_config.json
.local-relay
project was built successfully (npm run build
completed without errors)..env
and mcpconfig.json
files exist and are correctly configured inside your local-relay
directory.Local Relay simplifies connecting local stdio
-based clients to your centralized MCP infrastructure by running the proxy directly from its source code.
Connect local clients like Claude Desktop to your hosted MCP Servers.
The MCP Kit Local Relay is a command-line tool that acts as a bridge between your local development environment or local applications (like Claude Desktop) and a specific MCP Server hosted remotely (e.g., using the MCP Kit server
project).
It allows applications that communicate using standard input/output (stdio
), such as Claude Desktop’s external tools feature, to interact with a chosen hosted MCP Server as if it were running locally. You do not need Claude Pro to use MCP Kit tools with local relay.
Key Functionality:
stdio
when executed by a client.To use the Local Relay, you need to clone its repository and build it locally. Ensure you have Node.js and git installed.
Clone the Repository:
Open your terminal and clone the local-relay
repository:
Install Dependencies: Install the necessary Node.js packages:
Configure:
Create the required configuration files within the local-relay
directory:
.env
File:
.env
.your_api_key_here
with a valid API key. You can generate one here.mcpconfig.json
File:
mcpconfig.json
.your_target_server_id_here
with the server ID found on the servers page.Build the Project: Compile the TypeScript code into JavaScript:
This creates a dist
directory containing the executable file (dist/index.js
).
To use the Local Relay with Claude Desktop, you need to edit Claude’s configuration file to tell it how to run the relay script.
Locate Claude Desktop Configuration:
claude_desktop_config.json
) in your default text editor and reveal its location:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Edit claude_desktop_config.json
:
local-relay
within the mcpServers
object. If mcpServers
doesn’t exist, create it. Give your relay server a name (e.g., my_remote_server
).command
should be node
.args
array should contain the full, absolute path to the dist/index.js
file within your cloned and built local-relay
directory./Users/yourname/projects/local-relay/dist/index.js
with the actual absolute path on your system.Maximum call stack size exceeded
errors, add the --stack-size=32768
argument before the script path in the args
array:Save and Restart Claude Desktop:
claude_desktop_config.json
.Verify Connection:
local-relay
’s mcpconfig.json
file listed under the server name you chose (e.g., my_remote_server
).Interact: You can now interact with the tools and resources of the configured remote MCP Server directly within Claude Desktop.
dist/index.js
in claude_desktop_config.json
.local-relay
project was built successfully (npm run build
completed without errors)..env
and mcpconfig.json
files exist and are correctly configured inside your local-relay
directory.Local Relay simplifies connecting local stdio
-based clients to your centralized MCP infrastructure by running the proxy directly from its source code.