How to convert a local MCP server to a remote MCP server

How to convert a local MCP server to a remote MCP server
Photo by Alex Knight / Unsplash

[DRAFT]

One that works with the Claude web app

As I've written about this before, MCP is a mess.

Two of the big problem areas are bad documentation and messy authentication setup.

In this guide, we'll tackle both.

Introduction

MemoryPlugin already has an MCP server. It's a local one, based on stdio. The problem is that these aren't supported in most cases on web apps or mobile apps. We want to get MemoryPlugin working on Claude on the web and mobile apps via MCP.

This means we will need to set up a remote MCP server.

Claude refers to these as "Connectors".

Requirements

So, what do we need to do to be compatible with this "Connectors" feature in Claude?

  • We need to host a remote MCP server. We could use both SSE or Streamable HTTP, but per Claude, SSE is set to be deprecated anytime.
  • We need to set up OAuth authentication.
  • We need to set up Dynamic Client Registration.

Reference:

Building Custom Connectors via Remote MCP Servers | Anthropic Help Center

Remote Server

Let's start with a basic, authless remote MCP server, as that's the simplest way to get this up and running.

GitHub - vercel/mcp-handler: Easily spin up an MCP Server on Next.js, Nuxt, Svelte, and more
Easily spin up an MCP Server on Next.js, Nuxt, Svelte, and more - vercel/mcp-handler

Set up basic route etc.

Try connecting via inspector

Want SSE? Set up redis.

Streamable HTTP works without SSE too.

/api/mcp/mcp for Streamable HTTP

At this stage we can already connect to Claude web app and give it a shot with the roll the dice tool, and yes, it works!

MCP inspector has a guided auth setup which can be helpful