Get the FREE Ultimate OpenClaw Setup Guide →

mcp-auth-demos

Model Context Protocol authentication demos - AI assistant integration examples

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio scalekit-inc-mcp-auth-demos node greeting-mcp-node/dist/server.js \
  --env PORT="3000" \
  --env SCALYKIT_AUTH_URL="" \
  --env SCALYKIT_CLIENT_ID="" \
  --env SCALYKIT_CLIENT_SECRET=""

How to use

This MCP server suite provides two implementations of the Model Context Protocol (MCP) servers: one in Node.js (TypeScript) and one in Python (FastAPI + FastMCP). Both integrate with Scalekit for OAuth 2.1 authentication, dynamic client registration, and tool-based permissioning. The Node.js version exposes MCP endpoints through a compiled server bundle (dist/server.js) and can be started with a standard Node.js command. The Python version runs via uvx (or uvicorn-equivalent) and serves the FastAPI application where MCP endpoints and tools are defined. After starting, the servers will validate requests using Scalekit credentials and enforce permissions per tool access defined in the configuration. Typical workflows include authenticating with Scalekit, registering the MCP server as a client, and invoking authenticated MCP tool calls from registered clients.

How to install

Prerequisites:

  • Node.js (for the Node.js MCP server) and npm/yarn
  • Python 3.9+ (for the Python MCP server) and pip
  • Basic understanding of Scalekit authentication and MCP concepts

Node.js MCP server (greeting-mcp-node):

  1. Navigate to the Node.js subproject: cd greeting-mcp-node
  2. Install dependencies: npm install
  3. Build the TypeScript sources (if applicable): npm run build
  4. Start the server (example): npm run start This will typically emit the server at dist/server.js or an equivalent entrypoint.

Python MCP server (greeting-mcp-python):

  1. Navigate to the Python subproject: cd greeting-mcp-python
  2. Create a Python virtual environment (optional but recommended): python -m venv venv source venv/bin/activate
  3. Install dependencies: pip install -r requirements.txt
  4. Run the FastAPI/FastMCP server (example): uvx greeting_mcp_python.main:app or if using uvicorn directly: uvicorn greeting_mcp_python.main:app --reload --port 8000

Configure environment variables as needed (see mcp_config.env).

Additional notes

Tips and common considerations:

  • Ensure Scalekit OAuth 2.1 credentials (client_id and client_secret) are kept secure and loaded via environment variables.
  • Use dynamic client registration in Scalekit to authorize MCP servers before making MCP calls.
  • If you use the Node.js server, ensure the built dist/server.js path matches your build output; adjust the mcp_config accordingly.
  • If you run both servers locally, consider distinct ports (e.g., 3000 for Node.js and 8000 for Python) and proper CORS settings if accessed from browsers.
  • Tool permissions can be customized per server to restrict access to sensitive operations; leverage the Scalekit integration to enforce least privilege.
  • Monitor logs and set appropriate log levels for production stability (I/O, authentication failures, and tool access attempts).
  • Ensure your environment provides the necessary network access for Scalekit to perform OAuth flows and dynamic client registrations.

Related MCP Servers

Sponsor this space

Reach thousands of developers