Tiny Mcp Client

by gnosis23

MCP Client
  • agent-framework

This is a client implementation based on the Model Context Protocol (MCP)

About

What is Tiny Mcp Client?

Tiny Mcp Client is a lightweight MCP (Model Context Protocol) client implementation that replaces the original Anthropic SDK example with the OpenAI SDK. It runs on Node.js 16+ and is designed for developers who want to connect to MCP servers using OpenAI’s API.

How to use Tiny Mcp Client?

Install dependencies with pnpm, build the project, create a .env file with your OpenAI API key, then run the client with node build/index.js <path-to-mcp-server> where <path-to-mcp-server> is the address of your MCP server.

Key features of Tiny Mcp Client

- 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

Use cases of Tiny Mcp Client

FAQ from Tiny Mcp Client

What is Tiny Mcp Client and how does it differ from the original example?

Tiny Mcp Client is a rewrite of the official Anthropic SDK MCP client example to use the OpenAI SDK instead. It provides the same core MCP functionality but connects via OpenAI’s API.

Which OpenAI API key is required?

You need a valid OpenAI API key. Set it as OPENAI_API_KEY in a .env file in the project root.

Does Tiny Mcp Client support all MCP servers?

The client is fully compatible with the MCP protocol and can connect to any MCP server, provided it adheres to the protocol specification.

What are the system requirements?

Node.js 16.x or higher and the pnpm package manager are required.

What is the license for Tiny Mcp Client?

The project is licensed under the MIT License.

Details

Author
gnosis23
Category
agent-framework
Repository
gnosis23/tiny-mcp-client

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

2. Install dependencies:

pnpm install

3. Build the project:

pnpm run build

Configuration

1. Create a .env file in the project root:

echo "OPENAI_API_KEY=<your-key>" > .env

2. 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