Authenticating an MCP Server with Okta

Authenticating an MCP Server with Okta

In this post, we will look at how to use Okta to authenticate and authorize requests to an MCP server. We will use the FastMCP library to build both the server and client. The MCP server we will build will be a wrapper around a simple FastAPI app that’s protected using Okta. First, we will build a Hello World API using FastAPI and protect its endpoints using Okta. We will create a Okta client for the API and test it with Postman. ...

October 7, 2025 · 10 min
Auto-generate MongoDB Queries with OpenAI Assistants API

Auto-generate MongoDB Queries with OpenAI Assistants API

This is a continuation to the previous article on generating MongoDB Queries using OpenAI Chat Completion API. In this article, we will look at how to construct MongoDB Queries using OpenAI Assistants API given an input and an expected output. In this article, we will cover the following: Create an assistant using Assistants API and use it to generate MongoDB queries. Use custom function tool to format the output in JSON format. Use custom function tool to verify that the generated query is accurate. We will mock up the verification step to keep the example simple. ...

January 31, 2024 · 13 min
Mastering MongoDB Queries with OpenAI: A Guide to Generating Queries for Desired Outputs

Mastering MongoDB Queries with OpenAI: A Guide to Generating Queries for Desired Outputs

I’m a big fan of mongoplayground.net as it is one of the most useful and widely used tools for swiftly testing various MongoDB queries while working on a problem. Although this tool is really handy and convenient to use, I have always wondered if there is a way to automatically generate the query for a given input and an expected output, rather than having to manually construct these queries. Thanks to Generative AI tools, this is now possible! ...

January 8, 2024 · 12 min
Run Jupyter Notebook in a virtual environment

Run Jupyter Notebook in a virtual environment

It is always best practice to use virtual environments while working on Python projects. This article lists the steps to run Jupyter Notebook within a virtual environment. In a nutshell, these are the steps required to run Jupyter Notebook in a virtual environment. Install Jupyter Create a virtual environment and activate it Install ipykernel package Install a new Jupyter Kernel Run Jupyter Notebook Change the Kernel in Jupyter Notebook to the one we installed in the virtual environment in Step 4 ...

October 11, 2023 · 3 min
How to use Cognito User Pool with custom OAuth scopes as authorizer for REST API

How to use Cognito User Pool with custom OAuth scopes as authorizer for REST API

In this blog post, we will look at how to configure OAuth authentication for a REST API using AWS Cognito user Pool. We will create a REST API using AWS Lambda and API Gateway, integrate it with Cognito User Pool and create custom OAuth scopes to authenticate and authorize the REST API endpoints. Overview At a high level, below are the steps to be performed to setup the REST API and OAuth authentication using Cognito ...

April 13, 2023 · 9 min

TensorFlow.js - Remove or restore segments of an image in the browser using DeepLab model

This article is a continuation of the previous article on Semantic Image Segmentation in the browser using TensorFlow.js pre-trained DeepLab model. Here, we will use the DeepLab model’s output to manipulate specific parts of the image based on user selection. Essentially, we will allow the user to remove or restore a specific segment of an image that corresponds to an object class identified by the model. Image Segmentation using DeepLab - Demo ...

December 11, 2021 · 5 min

TensorFlow.js - Semantic Image Segmentation in browser using DeepLab model

In Computer Vision, one of the main challenges is to understand an image at a higher level like the way we humans do, i.e., to identify the objects, their location and their surroundings to make sense of the scene captured in the image. Semantic Image Segmentation is the process of identifying the objects present in the image and labelling each pixel by associating it to an identified object class. Semantic Image Segmentation can be applied to a wide variety of use cases such as human body segmentation, separating the background from foreground in an image, and understanding the surroundings for self-driving cars, just to name a few. ...

December 5, 2021 · 7 min

Face Landmarks Detection using MediaPipe Face Mesh in TensorFlow.js - Part 3

This article is the continuation of the previous article on MediaPipe Face Mesh model in TensorFlow.js, where we looked at creating the triangle mesh of the face using the model’s output. Here, we will look at detecting and tracking iris within the eyes using the MediaPipe Iris model. 1. Iris Detection MediaPipe Iris model accurately estimates the iris landmarks within the eye and tracks it. Iris detection & tracking can be used in augmented reality to create avatars and also to determine the distance of the camera to the user. ...

November 28, 2021 · 5 min

Facial Landmarks Detection using MediaPipe Face Mesh in TensorFlow.js - Part 2

This article is the continuation of the previous article on MediaPipe Face Mesh model in TensorFlow.js, where we looked at the basic usage of this model. Here, we will look at how to connect the 468 3D facial landmark predictions as multiple triangles to create a triangle mesh of the face. 1. Triangle Mesh To create a triangle mesh from the 468 [x,y,z] coordinates, we will need to identify which are the set of points that need to be connected to form triangles. Luckily Google has provided those indexes for us to draw the triangle mesh. It is present in the triangulation.js file located in the Github repo of the pre-trained model. ...

November 21, 2021 · 6 min

Facial Landmarks Detection using MediaPipe Face Mesh in TensorFlow.js

In this article, we will walk through an example to identify facial landmarks using the state of the art MediaPipe Face Mesh model. This model is present in the Face Landmarks Detection package in TensorFlow.js library’s pre-trained model suite. This is part 1 of a series of articles in which we dive into the details of the Face Mesh model and its usage. 1. Overview The MediaPipe Face Mesh model estimates 468 3D facial landmarks in real time covering the overall surface geometry of a human face. It also supports Iris detection that accurately tracks the iris within the eye. Iris detection when enabled provides an additional set of 10 landmarks - 5 points for each eye. ...

November 17, 2021 · 6 min