Token导航 LogoToken导航TokenDH.com
Cerebras MCP Server GitHub logo
AI代理stdio官方级别未说明来源级核验

Cerebras MCP Server GitHub

MCP Server

高性能模型控制协议服务器,集成Cerebras云SDK,具有智能知识库管理和工具编排功能。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
Python实时通信AI代理

安装说明

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

作者 / 组织

Developer-atomic-amardeep

提供方

Developer-atomic-amardeep

最后核验

2026/5/17 20:21

运行时

Python

快速接入

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

命令预览

python -m llm_client_server.server

详细介绍

🧠 Cerebras MCP服务器

![Python 3.13+](https://www.python.org/downloads/) ![License: MIT](https://opensource.org/licenses/MIT) ![Code style: black](https://github.com/psf/black) ![FastMCP](https://github.com/jlowin/fastmcp)

一种高性能的模型控制协议(MCP)服务器,集成了 Cerebras Cloud SDK 具有智能知识库管理和工具编排功能。

🚀 特性

  • 🤖 大脑整合:与Cerebras Cloud SDK无缝集成,实现高级AI模型交互
  • 📚 动态知识库:结构化知识库的智能检索和管理
  • 🔧 工具编排:高级工具调用和并行处理函数执行
  • ⚡ 高性能:基于FastMCP构建,实现最佳服务器性能和低延迟
  • 🌐 端事件:使用SSE传输协议的实时通信
  • 🔐 安全且可扩展:具有全面错误处理功能的生产就绪架构
  • 📊 结构化数据:基于JSON的知识管理,具有强大的解析和验证功能

🏗️ 建筑

graph TD
    A[Client Application] -->|SSE Transport| B[MCP Server]
    B --> C[Knowledge Base Engine]
    B --> D[Cerebras Cloud SDK]
    C --> E[JSON Data Store]
    D --> F[AI Model Processing]
    F --> G[Tool Execution]
    G --> H[Response Generation]

📦 安装

先决条件

  • Python 3.13或更高版本
  • 脑API键
  • uv包管理器(推荐)

快速开始

  1. 克隆仓库
   git clone https://github.com/your-username/cerebras-mcp-server-github.git
   cd cerebras-mcp-server-github
  1. 安装依赖项
   uv sync
  1. 设置环境变量
   cp .env.example .env
   # Edit .env and add your CEREBRAS_API_KEY
  1. 运行服务器
   python -m llm_client_server.server
  1. 测试客户端
   python -m llm_client_server.client

🔧 配置

环境变量

变量描述必填默认
CEREBRAS_API_KEY您的Cerebras Cloud API密钥-
MCP_SERVER_HOST服务器主机地址0.0.0.0
MCP_SERVER_PORT服务器端口号8050
LOG_LEVEL日志记录级别INFO

知识库配置

知识库存储在 llm_client_server/data/company_policies.json 并遵循此结构:

[
  {
    "question": "Your question here",
    "answer": "Detailed answer with context"
  }
]

🎯 用法

服务器操作

使用自定义配置启动MCP服务器:

from llm_client_server.server import mcp

# Server runs on http://localhost:8050/sse by default
if __name__ == "__main__":
    mcp.run(transport="sse")

客户端集成

以编程方式连接服务器并与之交互:

import asyncio
from llm_client_server.client import MCPCerebrasClient

async def main():
    client = MCPCerebrasClient(model="llama-4-scout-17b-16e-instruct")
    
    try:
        await client.connect_to_server()
        response = await client.process_query("What is the remote work policy?")
        print(f"AI Response: {response}")
    finally:
        await client.cleanup()

asyncio.run(main())

可用工具

服务器通过MCP公开以下工具:

  • get_knowledge_base(query: str):从知识库中检索结构化信息
  • 通过装饰功能,可以轻松添加其他工具 @mcp.tool()

🧪 发展

建立开发环境

# Clone and install in development mode
git clone https://github.com/your-username/cerebras-mcp-server-github.git
cd cerebras-mcp-server-github
uv sync --all-extras

# Install pre-commit hooks
pre-commit install

# Run tests
pytest

# Run with hot reload for development
uvicorn llm_client_server.server:app --reload --host 0.0.0.0 --port 8050

代码质量

该项目保持高代码质量标准:

  • 类型提示:全类型注释覆盖率
  • 代码检查:使用Black和Ruff自动进行代码格式化
  • 测试:带pytest的全面测试套件
  • 文档:详细的文档字符串和API文档

贡献

  1. 复刻仓库
  2. 创建要素分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

📊 演出

  • 延迟:知识库查询的响应时间低于1000毫秒
  • 吞吐量:处理1000+个并发连接
  • 记忆:针对最小内存占用进行了优化
  • 可扩展性:具有负载平衡的水平扩展支持

🔐 安全

  • 基于环境的API密钥管理
  • 输入验证和净化
  • 带错误边界的安全JSON解析
  • 限速和防止滥用

📄 许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

🤝 支持

🌟 致谢

______________________________________________________________________

内置于❤️ 对于AI社区

目录标签

目录标签

Python实时通信AI代理AI模型交互本地部署知识库管理工具编排高性能服务器

接入字段

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

stdio

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

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdionone部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP