gen-ai-custom-mcp-server

rbandugula3/gen-ai-custom-mcp-server

3.1

If you are the rightful owner of gen-ai-custom-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This project demonstrates the use of an MCP (Model Context Protocol) server built with Python and integrates with GenAI providers like OpenAI and Gemini.

Tools
2
Resources
0
Prompts
0

Gen AI Custom MCP

This project demonstrates the use of an MCP (Model Context Protocol) server built with Python and integrates with GenAI providers like OpenAI, Gemini. It includes tools like date difference calculation and a simple calculator, and provides sample client scripts for different LLM backends.


🧰 Features

  • MCP server with STDIO/SSE transport
  • Tools exposed via MCP:
    • days_between_days: calculates number of days between two dates
    • calculator: adds two integers
  • Sample clients for:
    • OpenAI
    • Gemini
  • Managed with Poetry for dependency and environment management

⚙️ Setup Instructions

1. Install Poetry (if not already installed)

pip install poetry

poetry config virtualenvs.in-project true

poetry install

Create a .env file in the project root with the following environment variables: See Example file

OPENAI_API_KEY=your-openai-api-key
GEMINI_API_KEY=your-gemini-api-key

Run the MCP server STDIO transport:

mcp dev mcp_server.py

Run GenAI client scripts

poetry run python client_gemini.py or poetry run python client_openai.py