tiny-mcp-client

This repository provides a client implementation for the Model Context Protocol (MCP) using the OpenAI API, offering real-time communication with MCP servers through a simple interface. This repository provides a

0
0

Tiny Mcp Client

This client implementation is based on the Model Context Protocol (MCP), rewriting the original Anthropic SDK example using the OpenAI SDK. It facilitates communication with MCP servers using the OpenAI API.

Features

  • Leverages the OpenAI API instead of Anthropic's.
  • Fully compliant with the MCP protocol.
  • Enables real-time communication with an MCP server.
  • Provides a straightforward and user-friendly interface.

Requirements

  • Node.js version 16.x or later.
  • pnpm package manager.

Installation

  1. Clone the repository using git clone <repository-url> and navigate into it with cd tiny-mcp-client.
  2. Install the necessary dependencies using pnpm install.
  3. Build the project using pnpm run build.

Configuration

  1. Create a .env file in the project root directory: echo "OPENAI_API_KEY=<your-key>" > .env.
  2. Replace <your-key> with your actual OpenAI API key.

Usage

Execute the client using: node build/index.js <path-to-mcp-server>. Replace <path-to-mcp-server> with the address of your MCP server.

Contributing

Contributions via Pull Requests and Issues are encouraged.

License

MIT License

Repository

GN
gnosis23

gnosis23/tiny-mcp-client

Created

March 22, 2025

Updated

March 23, 2025

Language

TypeScript

Category

AI