Robust and scalable Model Context Protocol server built with NestJS offering JWT authentication, modular REST APIs for file management, users, and posts, with seamless extensibility and integrated Swagger API documentation.
Unlock the full potential of MCP Server NestJS through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.
Free tier available • No credit card required
A robust, scalable, and extensible server-side application built with NestJS. This project provides a Model Context Protocol (MCP) server implementation, file management, authentication, and modular REST APIs for posts and users.
# Clone the repository $ git clone https://github.com/Cstannahill/mcp-server-nestjs.git $ cd nestjs-mcp-server # Install dependencies $ npm install
Create a .env
file in the root directory for any secrets or configuration overrides (optional).
# Start in development mode (with hot reload) $ npm run start:dev # Start in production mode $ npm run start:prod
# Compile TypeScript $ npm run build # Lint code $ npm run lint
$ npm run test
$ npm run test:e2e
$ npm run test:cov
$ npm run build
$ npm run start:prod
/api
when the server is running.POST /auth/login
— Authenticate and receive JWTPOST /files/upload
— Upload a fileGET /files/:id
— Download a fileDELETE /files/:id
— Delete a fileGET /files
— List filesPOST /users
— Create a userPOST /posts
— Create a postSee controller files in src/
for more details.
src/
app.module.ts # Root module
main.ts # Entry point
auth/ # Authentication (JWT, guards, strategies)
file/ # File management (upload, download, delete)
mcps/ # Model Context Protocol integration
posts/ # Posts module
users/ # Users module
database/ # Database connection (if used)
uploads/ # Uploaded files (local dev)
git checkout -b feature/YourFeature
)git commit -am 'Add some feature'
)git push origin feature/YourFeature
)This project uses Git for version control. The remote origin is set to:
https://github.com/Cstannahill/mcp-server-nestjs.git
Nest is MIT licensed.
For any questions, issues, or feature requests, please open an issue or contact the maintainer.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!