Posts

Springing into AI - Part 17: MCP Server - Security Playground

Image
About In MCP Server, Security plays an extremly crucial part in securing access to different capabilities offered by it for only authenticated and authorized users. Currently, there are two ways in which this can be accomplished. OAuth2 is the industry de facto recommended approcah, and the other being a token or API key exchange. For this playground, we will be focussing on OAuth2 authorization.   Project In Hobbits Inc, we will be having our custom hobbit  Authorization Server  that will comprise of hobbit credentials stored in memory. Our Hobbit MCP Server will be providing the relevant Resource capability information in form of profile and mugshot only for the logged in hobbit as we do not want Sauron the dark lord accessing that information else Middle Earth and Hobbits Inc would be in deep jeopardy with lawsuits from Elrond. Please note that this can be extended to other MCP capabilities like tools, prompts etc as well. Architecture overview is shown below: ...

Springing into AI - Part 16: MCP Server - Prompts Playground

Image
About In MCP Server, server side Prompts  refers to the ability of the server providing some pre-configured prompt templates that an end user can choose to use by default to obtain certain type of information. Typical example of this can be providing prompt templates to query for certain type of entity, generic prompt to know about what the tool offers, support prompt that can aid for self help, etc.   Project In Hobbits Inc, we will create pre-defined prompts to aid end users that they can use directly to query with the LLM. Since we do not have our own MCP Client yet, we will be testing the prompt capabilities that we provide using MCP Inspector.  An architecture overview of our tools playground is shown below: Setup Our project setup encompasses the following: Java:                     17 Spring AI :           1.1.2 Spring Boot:        4.0.3 Testing tool :...

Springing into AI - Part 15: MCP Server - Tools Playground ( Notifications )

Image
About In MCP Server, Notifications  refers to the process of providing period updates to an end user for a long running task. This is extremly useful as it helps provide a better experience instead of leaving the end user hanging awaiting output. Typical example of this can be a long running task involving lot of external interaction be it third party API invocation, database queries. As the task works it way, it can provide periodic updates to end user at certain checkpoints.  Project In Hobbits Inc, we will create a  dumb hobbit food party planner tool that emulates a long running task and provides notification to user in terms of overall percentage completed for a task at certain checkpoints. The notification that we generate will be seen in the MCP Inspector. An architecture overview of our tools playground is shown below: Setup Our project setup encompasses the following: Java:                     17 Spring AI :...

Springing into AI - Part 14: MCP Server - Tools Playground ( Sampling )

Image
About In MCP Server, Sampling refers to the process where the server itself may ask LLM on the client side to analyze information it gathered. Through means of system prompts we can instruct LLM from the server side to operate in defined boundaries. A typical example of this can be text summarization where we have our fetched database records and would like to have LLM summarize its observation about it.    Project In Hobbits Inc, we will create a  dumb hobbit food recipe analyzer tool simulating interaction between MCP Server and the LLM. Since we do not have a MCP Client for it with a LLM, MCP Inspector will be used to simulate real world LLM interaction with ability to add desired content and propagate back to MCP Server where the tool will obtain data and respond back.  An architecture overview of our tools playground is shown below: Setup Our project setup encompasses the following: Java:                    ...

Springing into AI - Part 13: MCP Server - Tools Playground ( Elicitation )

Image
About In MCP Server, Elicitation  refers to the process of involving an end user for obtaining their input on a task so that it may reach completion. Typical examples of this in real world could be getting user chosen dates for a travel iternary, confirmation of seat tickets for a sporting/musical event amongst many other. Project Our company Hobbits Inc, will be creating a  dumb hobbit travel planner tool where a hobbit can chose the source and destination for their travels in Middle Earth, The MCP Server will then present the hobbit a choice of two options for a desired route. This will demonstrate end user involvment in task fullfillment process so the task can reach completion.  A rchitecture overview is shown below: Setup Our project setup encompasses the following: Java:                     17 Spring AI :           1.1.2 Spring Boot:        4.0.3 Testing tool :...