Skip to content

ryanconley1/tanzuplatform-mcp-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CF-MCP-Client: Agentic AI Chat Client for Tanzu Platform

Overview

TANZUPLATFORM-MCP-Client is a Spring application that can be deployed to Cloud Foundry and consume the platform's AI services. It's built with the AI Framework Spring AI, leveraging the Model Context Protocol (MCP) and memGPT, to provide advanced memory service capabilities:

Prerequisites

  • Java 21 or higher
  • Maven 3.8+
  • Access to a Cloud Foundry Foundation with the GenAI tile or other LLM services
  • Developer access to your Cloud Foundry environment

Deploying to Tanzu Platform

Preparing the Application

  1. Build the application package:
mvn clean package
  1. Push the application to Tanzu Platform:
cf push

Binding to Large Language Models (LLM's)

  1. Create a service instance that provides chat LLM capabilities:
cf create-service genai ryan-chat chat-llm
  1. Bind the service to your application:
cf bind-service ryan-chat chat-llm
  1. Restart your application to apply the binding:
cf restart ryan-chat

Now your chatbot will use the LLM to respond to chat requests.

Binding to Models

Binding to Vector Databases

  1. Create a service instance that provides embedding LLM capabilities
cf create-service genai ryan-chat embedding-llm 
  1. Create a Postgres service instance to use as a vector database
cf create-service postgres on-demand-postgres-db vector-db
  1. Bind the services to your application
cf bind-service ryan-chat embedding-llm 
cf bind-service ryan-chat vector-db
  1. Restart your application to apply the binding:
cf restart ryan-chat
  1. Click on the document tool on the right-side of the screen, and upload a .PDF File Upload File

Now your chatbot will respond to queries about the uploaded document

Vector DBs

Binding to MCP Agents

Model Context Protocol (MCP) servers are lightweight programs that expose specific capabilities to AI models through a standardized interface. These servers act as bridges between LLMs and external tools, data sources, or services, allowing your AI application to perform actions like searching databases, accessing files, or calling external APIs without complex custom integrations.

  1. Create a user-provided service that provides the URL for an existing MCP server:
cf cups mcp-server -p '{"mcpServiceURL":"https://your-mcp-server.example.com"}'
  1. Bind the MCP service to your application:
cf bind-service ryan-chat mcp-server
  1. Restart your application:
cf restart ryan-chat

Your chatbot will now register with the MCP agent, and the LLM will be able to invoke the agent's capabilities when responding to chat requests.

Binding to Agents

Binding to memGPT for Extended Memory

If you have access to a compatible memGPT implementation service:

  1. Create a user-provided service for the memGPT service:
cf cups memGPT -p '{"memGPTUrl":"https://your-memgpt-service.example.com"}'
  1. Bind the memGPT service to your application:
cf bind-service ryan-chat memGPT
  1. Restart your application:
cf restart ryan-chat

Binding to Memory

About

Demo client with Agentic AI workflow with SpringBoot + Spring AI applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 46.2%
  • TypeScript 26.8%
  • HTML 12.0%
  • CSS 11.6%
  • SCSS 3.4%