Pure-ESM Node.js MCP server with automatic tool discovery, Streamable HTTP and stdio transports, TLS, Zod schemas, injectable context, bearer authentication, and generic OAuth2 support.
- Features
- Requirements
- Setup
- Usage
- Development
- Testing
- Troubleshooting
- Security
- API
- Packaging
- Examples
- Support
- Links
- License
Create MCP servers with Streamable HTTP or stdio, discovered tool modules, Zod input schemas, shared context, and optional authentication.
Use Node.js 26 or later. Use an MCP client that supports protocol revision 2026-07-28 and the selected transport.
Install the package with npm install @eliware/mcp-server. Read the setup guide before you create a server.
Create a server with mcpServer() and add tool modules in tools/. Read the usage guide, configuration guide, and authentication guide.
Browse the documentation index, specifications index, and release notes.
Add one .mjs module for each tool in tools/. Read the tool guide for registration and context details.
The package does not scan resource files. Add resources to the SDK server inside a tool module. Read the tool guide.
The package does not scan prompt files. Add prompts to the SDK server inside a tool module. Read the tool guide.
Use Streamable HTTP or stdio. The package does not support HTTP with SSE. Read the protocol requirements.
Select no authentication, a static bearer token, bearer passthrough, or OAuth2 introspection. Use HTTPS for OAuth endpoints. Read the authentication guide.
Import z from @eliware/mcp-server to define tool input schemas. Read the tool guide.
Run npm ci to install locked dependencies. Run npm run format to format files. Run npm run format:check to check file formatting.
Run npm run lint for lint checks. Run npm run audit for dependency checks. Run npm run typecheck to check TypeScript declarations.
Run npm test for aggregate validation. Run npm run pack to check package contents.
Read the troubleshooting guide for setup and runtime issues.
Keep tokens, OAuth client secrets, and TLS keys in environment variables or secret files. Use HTTPS and explicit authentication for remote access.
Read the API reference for exports, options, and result types.
The npm package includes src/, docs/, README.md, AGENTS.md, LICENSE, RELEASE_NOTES.md, examples/, specs/, and .env.example.
Use numeric MAJOR.MINOR.PATCH versions and a v<version> tag for each release. Run npm run pack to check package contents. The npm workflow publishes approved tagged releases.
Read examples/README.md for server and tool examples.
For help, questions, or to chat with the author and community, visit:


