This project demonstrates the implementation of an MCP server that integrates with a basic AI chatbot client. The MCP server consumes a dummy API and exposes it in a standardized way to MCP clients, enabling seamless communication between the chatbot and the backend service. The project is built using Node.js with TypeScript support, requiring Node.js 23.x or higher.
To set up the project, follow these steps:
Add a .env
file inside the client
folder with the following content:
plaintext
OPENAI_API_KEY=<your-open-ai-key>
Dependencies:
service
, server
, client
) and run npm install
to install the required dependencies.Navigate to the service
folder and run:
bash
npm run dev
Start the MCP Server:
Navigate to the server
folder and run:
bash
npm run dev
Start the MCP Client:
client
folder and run:bash
npm run dev
The AI chatbot client will now be able to interact with the backend service via the MCP server, storing and retrieving custom information as needed.
This project is a basic demo implementation of an MCP server and client, showcasing how an AI chatbot can leverage MCP protocols to communicate with backend services. It is designed for educational purposes and may contain bugs.
This project is licensed under the MIT License.