Skip to main content
Glama
remote-mcp-server

remote-mcp-server

by CasterShell

remote-mcp-server

A production-ready Remote Model Context Protocol (MCP) server over Streamable HTTP with a built-in OAuth 2.1 Authorization Server, strict Zod output schemas, SSRF-hardened fetching, gzipped file uploads, and on-host Whisper speech-to-text.

Highlights

  • Modern MCP Protocol: Implements MCP 2026-07-28 Streamable HTTP with stateless 2025-11-25 compatibility via @modelcontextprotocol/server.

  • Built-in OAuth 2.1 Authorization Server (src/oauth.js):

    • RFC 9728 Protected Resource Metadata (/.well-known/oauth-protected-resource) with resource_documentation

    • OAuth Authorization Server Metadata (/.well-known/oauth-authorization-server)

    • Client ID Metadata Documents (CIMD) & Dynamic Client Registration (DCR)

    • Mandatory PKCE S256, resource parameter audience binding, iss response validation, and owner-passphrase consent gating

    • Rotating opaque refresh tokens (stored hashed) and HMAC-signed short-lived access tokens

  • Schema-First Tools (src/mcp.js):

    • memo_write — stores structured notes with compact JSON output matching declared outputSchema

    • memo_search — searches stored notes within a strict 1,024-byte response budget

    • upload — accepts raw or gzip-compressed payloads (handling multi-MB files cleanly over serverless request limits) and returns verified byte-length download URLs

    • transcribe — runs quantized onnx-community/whisper-base.en via @huggingface/transformers, splitting long audio at silence pauses to prevent skipped speech segments

  • SSRF Defense (src/safefetch.js): Validates schemes (http/https), ports (80/443), DNS resolution, and blocks loopback/private/link-local IPv4 and IPv6 ranges (ipaddr.js) before following fetches.

  • Pluggable Storage (src/store.js): Local filesystem backend (STORE_DIR) for local dev & CI, or @vercel/blob for serverless deployment.

Related MCP server: memos-mcp-server

Quick Start

npm install
npm test

Run locally:

cp .env.example .env
node scripts/local.mjs

CLI memo client (uses OAuth 2.1 DCR + PKCE):

MCP_SERVER_URL=http://127.0.0.1:3000 node scripts/memo.mjs --help

Architecture

See ARCHITECTURE.md for the OAuth 2.1 + MCP request flow, storage abstraction, and security boundaries.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI clients to manage a self-hosted Memos instance, providing tools for memos, attachments, comments, reactions, shares, and user metadata, with optional OAuth for remote access.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to read and write Memos notes through a Personal Access Token, with task-oriented search, precise editing, todo and tag management, attachment handling, exports, prompts, and resources. It supports both local stdio and multi-user Streamable HTTP transports, with safety switches such as read-only mode and restricted file access.
      20
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes a remote Streamable HTTP MCP endpoint that lets an AI client save, search, and retrieve structured memories, archived conversations, social-account notes, and knowledge documents. Access is scoped by per-client API keys with configurable read/write permission levels, collections, and operations.
      ISC
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables local ingestion, querying, consolidation, keyword search, and statistics of agent memories through upstream Google ADK memory agents backed by SQLite, exposed over Streamable HTTP.
      MIT