Back to Home
LeanMCP icon

leanmcp-sdk

Verified Safe

by LeanMCP

Overview

Building production-ready Model Context Protocol (MCP) servers with TypeScript, supporting features like authentication, elicitation, and UI integration for AI agents.

Installation

Run Command
npm start

Environment Variables

  • PUBLIC_URL
  • PORT
  • GITHUB_CLIENT_ID
  • GITHUB_CLIENT_SECRET
  • GITHUB_TOKEN
  • OPENAI_API_KEY
  • SESSION_SECRET
  • JWT_SIGNING_SECRET
  • JWT_ENCRYPTION_SECRET
  • REDDIT_CLIENT_ID
  • REDDIT_CLIENT_SECRET
  • REDDIT_USERNAME
  • REDDIT_PASSWORD
  • HN_USERNAME
  • AWS_REGION
  • COGNITO_USER_POOL_ID
  • COGNITO_CLIENT_ID
  • COGNITO_CLIENT_SECRET
  • SLACK_BOT_TOKEN
  • SLACK_SIGNING_SECRET
  • AUTH0_DOMAIN
  • AUTH0_CLIENT_ID
  • AUTH0_CLIENT_SECRET
  • AUTH0_AUDIENCE
  • CLERK_FRONTEND_API
  • CLERK_SECRET_KEY

Security Notes

The SDK demonstrates robust security practices for authentication, including OAuth 2.0 flows, PKCE, JWT signing and encryption (using `crypto` module), and explicit handling of sensitive environment variables. Secrets are managed via `process.env` and the `@leanmcp/env-injection` package supports user-scoped environment variables, preventing cross-user data leakage. Dynamic module loading of services from the `mcp` directory is a core design feature; this is secure assuming the build/deployment pipeline is trusted and the `mcp` directory is not exposed to untrusted code injection. The system relies on proper management of API keys and secrets by the user.

Similar Servers

Stats

Interest Score40
Security Score9
Cost ClassMedium
Avg Tokens500
Stars10
Forks0
Last Update2026-01-17

Tags

Model Context ProtocolTypeScript SDKAI AgentsServer DevelopmentAuthenticationElicitationUI FrameworkGenerative AI