leanmcp-sdk
Verified Safeby LeanMCP
Overview
Building production-ready Model Context Protocol (MCP) servers with TypeScript, supporting features like authentication, elicitation, and UI integration for AI agents.
Installation
npm startEnvironment 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
mcp-use
A comprehensive framework for building full-stack Model Context Protocol (MCP) applications, including AI agents, MCP servers with UI widgets, and integrated debugging tools in both Python and TypeScript.
mcp-typescript-sdk
The TypeScript SDK facilitates the implementation of Model Context Protocol (MCP) over MQTT for creating AI-integrable servers and clients, enabling LLMs to discover and interact with external services and tools.
boilerplate-mcp-server
Provides a production-ready foundation for developing custom Model Context Protocol (MCP) servers in TypeScript to connect AI assistants with external APIs and data sources, exemplified by an IP geolocation tool.
mcp
An MCP server providing a set of mathematical tools (calculator functions) for remote execution via the Model Context Protocol.