Tiny Mcp Client logo

Tiny Mcp Client

by gnosis23

A client implementation based on the Model Context Protocol (MCP) that rewrites the original Anthropic SDK example to OpenAI SDK. It enables real-time communication with an MCP server using the OpenAI API.

View on GitHub

Last updated: N/A

Tiny Mcp Client

This is a client implementation based on the Model Context Protocol (MCP), which rewrites the original example from Anthropic SDK to OpenAI SDK.

Features

  • Uses OpenAI API instead of Anthropic API
  • Fully compatible with MCP protocol
  • Supports real-time communication with MCP server
  • Simple and easy-to-use interface

Requirements

  • Node.js 16.x or higher
  • pnpm package manager

Installation

  1. Clone the repository:
git clone <repository-url>
cd tiny-mcp-client
  1. Install dependencies:
pnpm install
  1. Build the project:
pnpm run build

Configuration

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

Usage

Run the client:

node build/index.js <path-to-mcp-server>

Where <path-to-mcp-server> is the address of your MCP server.

Contributing

Pull Requests and Issues are welcome!

License

MIT License