Command Palette

Search for a command to run...

UnylyUnyly
Browse all

JavaScript Auth Server

FreeNot checked

Demonstrates MCP remote authentication boundary with OAuth 2.0, Keycloak token introspection, audience and scope validation, and protected tools.

GitHubEmbed

About

Demonstrates MCP remote authentication boundary with OAuth 2.0, Keycloak token introspection, audience and scope validation, and protected tools.

README

This package shows the remote MCP auth boundary in JavaScript:

  • Express HTTP server
  • MCP Streamable HTTP transport at /mcp
  • Protected Resource Metadata
  • Bearer token middleware
  • Keycloak token introspection
  • audience validation
  • mcp:tools scope enforcement
  • protected add_numbers and server_status tools

Run

pnpm mcp-auth-server-js install
cp .env.example .env
pnpm mcp-auth-server-js demo:keycloak
pnpm mcp-auth-server-js start

For the demo, configure Keycloak with:

  • client scope: mcp:tools
  • MCP server confidential client: mcp-server
  • demo client/user for obtaining an access token
  • token audience: http://localhost:3000/mcp

Demo Scripts

pnpm mcp-auth-server-js demo:no-token
pnpm mcp-auth-server-js demo:metadata
pnpm mcp-auth-server-js demo:get-token
pnpm mcp-auth-server-js demo:call-tool
pnpm mcp-auth-server-js demo:bad-scope

The important point is the failure order:

  1. no token returns 401 with WWW-Authenticate
  2. metadata tells the client where auth lives
  3. token introspection rejects inactive tokens
  4. audience validation rejects tokens for another API
  5. scope validation rejects tokens without mcp:tools

from github.com/kabirrajsingh/mcp-server-auth-js

Installing JavaScript Auth Server

This server has no published package — it is built from source. Open the repository and follow its README.

▸ github.com/kabirrajsingh/mcp-server-auth-js

FAQ

Is JavaScript Auth Server MCP free?

Yes, JavaScript Auth Server MCP is free — one-click install via Unyly at no cost.

Does JavaScript Auth Server need an API key?

No, JavaScript Auth Server runs without API keys or environment variables.

Is JavaScript Auth Server hosted or self-hosted?

A hosted option is available: Unyly runs the server in the cloud, no local setup required.

How do I install JavaScript Auth Server in Claude Desktop, Claude Code or Cursor?

Open JavaScript Auth Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare JavaScript Auth Server with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All development MCPs