Token导航 LogoToken导航TokenDH.com
Genai LLM Agent MCP Server logo
运维云端stdio官方级别未说明来源级核验

Genai LLM Agent MCP Server

MCP Server

一个基于HTTP的工具服务协议服务器,为LangChain代理提供工具服务能力,支持独立运行或本地开发模式。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
LangChainPythonHTTP服务

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

akhil-jr

提供方

akhil-jr

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

genai llm代理mcp服务器

一种模型上下文协议(MCP)服务器,为LangChain代理提供基于HTTP的工具服务功能。 还有一个代理连接到mcp服务器。

恋物癖

MCP服务器

  • 可以作为FTTP服务器独立工作
  • 也可以在stdio模式下进行本地开发

代理

  • 使用MCP服务器上的工具
  • 使用本地工具

快速开始

1.设置

git clone https://github.com/akhil-jr/genai-llm-agent-mcp-server.git
cd genai-llm-agent-mcp-server
pip install -r requirements.txt

2.运行MCP服务器

在单独的窗口中启动mcp服务器

cd genai-llm-agent-mcp-server
python -m mcp_server.server

3.运行代理

在原始控制台中继续运行以下查询

cp .env.example .env
#Add your gemini API key in .env file
python -m agent.main

MCP服务器的附加配置

用于使用自定义参数运行

python服务器.py--传输http--主机0.0.0.0--端口8080--路径/mcp

在stdio模式下运行(附带的代理不支持):

python服务器.py——传输stdio

命令行参数

  • --transport:传输协议(stdio, http, sse)-默认值: http
  • --host:HTTP服务器主机-默认值: 127.0.0.1
  • --port:HTTP服务器端口-默认值: 8000
  • --path:HTTP端点路径-默认值: /mcp

程序化使用

连接到stdio服务器

import asyncio
from fastmcp import Client
from src.http_mcp_tools.tools import create_mcp_server

async def main():
    # Create and run server
    mcp = create_mcp_server()
    
    # Connect via client
    async with Client(mcp) as client:
        # Use tools
        result = await client.call_tool("get_customer_details", {"customer_id": "102"})
        print(result.content[0].text)

asyncio.run(main())

连接到HTTP服务器

import asyncio
from fastmcp import Client

async def connect_to_remote_server():
    async with Client("http://localhost:8000/mcp") as client:
        result = await client.call_tool("get_customer_details", {"customer_id": "102"})
        print(result.content[0].text)

asyncio.run(connect_to_remote_server())

目录标签

目录标签

LangChainPythonHTTP服务本地部署工具服务代理开发

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP