MCP-Linker Backend API with Supabase Authentication integration.
-
Clone the repository
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up Supabase:
- Create a new project on Supabase
- Copy your Supabase URL and anon key
- Set up a JWT secret
- Create an
.envfile based on.env.exampleand add your Supabase credentials
-
Run the application:
uvicorn app.main:app --reload
POST /api/v1/auth/signup- Register a new userPOST /api/v1/auth/login- Login with email and passwordPOST /api/v1/auth/logout- Logout (requires authentication)GET /api/v1/auth/me- Get current user information (requires authentication)
GET /api/v1/servers- Get all servers (public)GET /api/v1/servers/{id}- Get server by ID (public)POST /api/v1/servers- Create a new server (requires authentication)PUT /api/v1/servers/{id}- Update a server (requires admin)DELETE /api/v1/servers/{id}- Delete a server (requires admin)
- Users register or login using Supabase authentication
- The backend receives and validates JWT tokens
- Protected routes check for valid tokens and user roles
- Admin routes require admin role
PROJECT_NAME- API project nameAPI_VERSION- API versionCORS_ORIGINS- List of allowed origins for CORSDATABASE_URL- Database connection URLSUPABASE_JWT_SECRET- JWT secret for token validation
API documentation is available at:
- Swagger UI:
/api/docs - ReDoc:
/api/redoc