MCPnD

Mitchel-BT/MCPnD

3.1

If you are the rightful owner of MCPnD and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A FastAPI-based MCP server with PostgreSQL and Google OAuth authentication.

MCP Server with Authentication

A FastAPI-based MCP server with PostgreSQL and Google OAuth authentication.

Setup

  1. Create a virtual environment:
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
   pip install -r requirements.txt
  1. Copy .env.example to .env and fill in your credentials:
   cp .env.example .env
  1. Generate a secret key:
   openssl rand -hex 32
  1. Set up Google OAuth credentials at https://console.cloud.google.com/

  2. Configure your PostgreSQL database in pgAdmin

  3. Run the server:

   python main.py

Testing

Visit http://localhost:8000/docs for the interactive API documentation.

Authentication Flow

  1. GET /auth/login - Get Google OAuth URL
  2. User authenticates with Google
  3. GET /auth/callback - Handles OAuth callback and creates JWT
  4. Use JWT token in Authorization header for protected endpoints