This project showcases how to use the MCP protocol with OpenAI. It provides a simple example to interact with OpenAI's API seamlessly via an MCP server and client.
To get started with this project, follow the steps below:
- Node.js (version 22 or higher)
- npm
- OpenAI API key
-
Clone the repository:
git clone https://github.com/manekinekko/openai-mcp-example.git cd openai-mcp-example
-
Install the dependencies:
npm install
- Create a
.env
file in the root directory and add your OpenAI API key:OPENAI_API_KEY=your_openai_api_key
-
Run the MCP server:
npm run start:server
-
Run the MCP client:
npm run start:client
This project is licensed under the MIT License. See the LICENSE file for details.