Demo MCP Basic Server
by bertrandgressier
This project demonstrates a fundamental client-server interaction using the Model Context Protocol (MCP). It shows how to extend AI model capabilities by giving them access to custom functionalities hosted on an MCP server.
Last updated: N/A
What is Demo MCP Basic Server?
This is a demo MCP server that provides simple calculation tools (addition, subtraction, etc.) to AI models. It acts as an MCP provider, allowing AI models to securely discover and utilize external tools or resources.
How to use Demo MCP Basic Server?
- Clone the repository. 2. Install dependencies using
npm install
. 3. Create a.env
file with your Google AI API key or Vertex AI credentials. 4. Build the project usingnpm run build
. 5. Start the server usingnpm run start:server
and the client usingnpm run start:client
. You can also use the development mode scripts for faster iteration.
Key features of Demo MCP Basic Server
Provides calculation tools to AI models
Demonstrates MCP client-server interaction
Supports Google Gemini and Vertex AI
Includes example client and server implementations
Uses TypeScript
Use cases of Demo MCP Basic Server
Extending AI model capabilities with custom tools
Integrating AI models with external services
Building AI-powered applications that require specific functionalities
Demonstrating the use of the Model Context Protocol
Enabling AI models to perform calculations or other tasks using external resources
FAQ from Demo MCP Basic Server
What is MCP?
What is MCP?
MCP stands for Model Context Protocol. It allows AI models to securely discover and utilize external tools or resources provided by a separate server process.
What is the purpose of this demo?
What is the purpose of this demo?
This demo illustrates how you can extend the capabilities of AI models by giving them access to custom functionalities hosted on an MCP server.
What are the prerequisites for running this demo?
What are the prerequisites for running this demo?
You need Node.js (Version >=23.0.0), npm, and a Google AI (Gemini) API Key or Vertex AI credentials.
How do I configure the API keys?
How do I configure the API keys?
You need to create a .env
file and add your Google AI API key or Vertex AI credentials to it.
How do I run the server and client?
How do I run the server and client?
You can use the npm run start:server
and npm run start:client
commands to run the production server and client, or the npm run dev:server
and npm run dev:client
commands to run them in development mode.