Confidential guide on numerology and astrology, based of GG33 Public information

MCP-Server-Remote-Setup-Jwt-Auth
Protocolo de contexto del modelo de implementación de servidor de middleware seguro (MCP) sobre SSE con autenticación JWT. Permite la comunicación estandarizada entre herramientas de IA y clientes con registro de herramientas dinámicas, registro de solicitudes y administración de sesiones. Perfecto para construir sistemas de IA listos para la producción que requieren patrones de acceso seguros.
3 years
Works with Finder
1
Github Watches
0
Github Forks
1
Github Stars
🔐 SSE MCP Server with JWT Authentication
This is a Model Context Protocol (MCP) SSE server with JWT-based authentication.
It allows you to expose multiple AI tools over an SSE transport, protected via secure Bearer Token flow.
Built with:
- 🚀 Node.js + Express
- 🧩 @modelcontextprotocol/sdk
- 🔒 JSON Web Tokens (JWT) for authentication
- ⚙️ Zod for input validation
✅ Fully tested with
@modelcontextprotocol/inspector
📂 Project Structure
server/
├── index.ts # Main Express + MCP server
├── .env # Environment variables
├── package.json # Project metadata & scripts
├── tsconfig.json # TypeScript config
└── README.md # You are here!
✨ Features
- ✅ Secure SSE connection using Bearer JWT token
- ✅ Dynamic Tool registration (echo, time, random number, etc.)
- ✅ Tested with MCP Inspector
- ✅ Logs all request lifecycle events
- ✅ Session management for /message endpoint
- 🚀 Ready to extend for production use
⚙️ Setup
1. Clone the repository
git clone https://github.com/anisirji/mcp-server-remote-setup-with-jwt-auth.git
cd mcp-server-remote-setup-with-jwt-auth
2. Install dependencies
npm install
3. Create .env
file
echo "JWT_SECRET=your-secret-key" > .env
4. Run the server
npm run dev
✅ Server will run on:
http://localhost:3001/sse
🧪 Testing the server with MCP Inspector
Step 1 — Install MCP Inspector
📖 Official Docs: MCP Inspector
npx @modelcontextprotocol/inspector
Step 2 — Generate a token
Use cURL to get your JWT token:
curl "http://localhost:3001/auth/token?username=aniket&scope=mcp:access"
✅ Example response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Step 3 — Connect MCP Inspector
- Open Inspector UI
- Set Transport Type: SSE
- URL:
http://localhost:3001/sse
- Add Authorization Header:
Authorization: Bearer <your-token>
- Click Connect
🎉 Success! Your server is now connected.
Step 4 — Test tools
Go to Tools tab in Inspector and click List Tools.
You will see:
- ✅
test
- ✅
echo
- ✅
get-time
- ✅
random-number
Test them and enjoy!
📖 API Reference
🔑 Generate Token
GET /auth/token?username=<username>&scope=mcp:access
🔌 SSE Endpoint (requires token)
GET /sse
Authorization: Bearer <token>
📩 Send Message to active session
POST /message?sessionId=<sessionId>
Authorization: Bearer <token>
🧩 Tools Reference
Tool Name | Description |
---|---|
test |
Test connection (security check) |
echo |
Echo back provided message |
get-time |
Returns current server time |
random-number |
Returns random number (min/max) |
🗓️ Upcoming Changes
- Token revocation list (blacklist)
- Role-based tool access (scope checks)
- Session heartbeat / keep-alive
- Rate limiting & logging
- Dockerization for deployment
📚 Useful Resources
👨💻 Maintainer
Aniket
📄 License
This project is open-source and free to use.
🚀 Build. Secure. Empower.
相关推荐
Converts Figma frames into front-end code for various mobile frameworks.
Advanced software engineer GPT that excels through nailing the basics.
Take an adjectivised noun, and create images making it progressively more adjective!
Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease
I find academic articles and books for research and literature reviews.
Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.
Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx
Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.
Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)
Puente entre los servidores Ollama y MCP, lo que permite a LLM locales utilizar herramientas de protocolo de contexto del modelo
🔍 Habilitar asistentes de IA para buscar y acceder a la información del paquete PYPI a través de una interfaz MCP simple.
Reviews

user_dw2fwAJ1
I've been using mcp-server-remote-setup-with-jwt-auth for a while now, and it has simplified my server setup process tremendously. The JWT authentication ensures a secure connection, and the documentation on GitHub by anisirji is clear and easy to follow. Highly recommend this for anyone in need of a reliable remote setup solution.