shamenchens
MCP Servershamenchenspublic

lieta mcp example

一个使用 Bearer Token 认证连接 MCP 服务器的客户端示例。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
TypeScript
Language
-
License

About This Server

一个使用 Bearer Token 认证连接 MCP 服务器的客户端示例。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Client Example

This is an example MCP client that connects to MCP server with Bearer token authentication.

Prerequisites

  • Node.js 22 or later
  • npm or yarn

Setup

  1. Install dependencies:
npm install
  1. Create a .env file in the project root and add your Bearer token:
BEARER_TOKEN=your_token_here
MCP_SERVER_URL=your_server_url_here

Building and Running

  1. Build the TypeScript code:
npm run build
  1. Run the client:
npm start

Features

The example client demonstrates:

  • Connecting to the MCP server with Bearer token authentication
  • Listing available tools

Error Handling

The client includes basic error handling and will:

  • Validate the presence of the Bearer token
  • Handle connection errors
  • Properly close the connection when done

Development

To modify the example:

  1. Edit the code in src/index.ts
  2. Rebuild with npm run build
  3. Run with npm start

Quick Start

1

Clone the repository

git clone https://github.com/shamenchens/lieta-mcp-example
2

Install dependencies

cd lieta-mcp-example
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownershamenchens
Repolieta-mcp-example
LanguageTypeScript
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation