Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use the official lightweight Node.js image
FROM node:20-alpine AS base

# Set working directory
WORKDIR /app

# Copy pnpm-lock.yaml and .npmrc (if exists)
COPY pnpm-lock.yaml ./

# Install pnpm
RUN npm install -g pnpm

# Copy package.json and tsconfig.json
COPY examples/simple-server/package.json examples/simple-server/tsconfig.json ./

# Install dependencies
RUN pnpm install --frozen-lockfile

# Copy the source files
COPY examples/simple-server/index.ts ./

# Use tsx to run the server
CMD ["pnpm", "run", "start"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Remote-MCP: Remote Model Context Protocol

[![smithery badge](https://smithery.ai/badge/@remote-mcp/server)](https://smithery.ai/server/@remote-mcp/protocol)

A **type-safe, bidirectional and simple** solution for **remote MCP communication**, allowing remote access and centralized management of model contexts.

![preview](https://github.com/user-attachments/assets/a16804b9-8378-493c-8ca8-f61839458cde)
Expand Down Expand Up @@ -114,6 +116,14 @@ You can see some examples in the `examples` directory.
- [Cloudflare Workers](examples/cloudflare-workers)
- [Standalone Node.js](examples/simple-server)

### Installing via Smithery

To install Remote MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/protocol):

```bash
npx -y @smithery/cli install @remote-mcp/protocol --client claude
```

### Code Your Own Remote MCP Server

After `npm install @remote-mcp/server`, you can your own remote MCP server like the following:
Expand Down
23 changes: 23 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml

build:
dockerBuildPath: examples/simple-server
startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required:
- remoteMcpUrl
- authorizationToken
properties:
remoteMcpUrl:
type: string
description: The URL of the remote MCP server.
authorizationToken:
type: string
description: The authorization token for accessing the remote MCP server.
commandFunction:
# A function that produces the CLI command to start the MCP on stdio.
|-
(config) => ({ command: 'pnpm', args: ['run', 'start'], env: { REMOTE_MCP_URL: config.remoteMcpUrl, HTTP_HEADER__Authorization: `Bearer ${config.authorizationToken}` } })