hfyydd
MCP Serverhfyyddpublic

a mcp client_app

一个基于现代技术栈的 MCP 客户端实现,前端使用 Next.js 和 Copilotkit,后端基于 LangGraph。

Repository Info

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

About This Server

一个基于现代技术栈的 MCP 客户端实现,前端使用 Next.js 和 Copilotkit,后端基于 LangGraph。

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

项目简介

本项目是一个基于现代技术栈的MCP Client实例:

  • 前端:基于 Nextjs 和 Copilotkit CoAgent
  • 后端:基于 LangGraph

安装与运行

前端

  1. 安装依赖:
# 安装Copilotkit相关包
pnpm add @copilotkit/react-ui @copilotkit/react-core @copilotkit/runtime

# 安装项目依赖
pnpm install
  1. 启动开发服务器:
pnpm dev
  1. 关键配置文件 app/api/copilotkit
import {
    CopilotRuntime,
    copilotRuntimeNextJSAppRouterEndpoint,
    ExperimentalEmptyAdapter
} from "@copilotkit/runtime";
import { NextRequest } from "next/server";

// 可以使用任何服务适配器来支持多代理
const serviceAdapter = new ExperimentalEmptyAdapter();

const runtime = new CopilotRuntime({
    remoteEndpoints: [
        {
            url: "http://localhost:8001/mcp",
        }
    ],
});

export const POST = async (req: NextRequest) => {
    const { handleRequest } = copilotRuntimeNextJSAppRouterEndpoint({
        runtime,
        serviceAdapter,
        endpoint: "/api/copilotkit",
    });

    return handleRequest(req);
};

重要:需要配置 remoteEndpoints,其中 url 指向后端 FastAPI 部署的 LangGraph 服务。

后端

  1. 进入后端目录:
cd agent
  1. 激活虚拟环境:
source .venv/bin/activate
  1. 启动服务器:
uv run fastapi_server.py

功能特点

  • 后端可以基于 LangGraph 打造复杂 Agent
  • 前后端分离架构,便于扩展和维护
  • 支持多代理协作

Quick Start

1

Clone the repository

git clone https://github.com/hfyydd/a-mcp-client_app
2

Install dependencies

cd a-mcp-client_app
npm install
3

Follow the documentation

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

Repository Details

Ownerhfyydd
Repoa-mcp-client_app
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