Skip to main content
Glama
Agentforce MCP Integration Server

Agentforce MCP Integration Server

🧩 Agentforce MCP 集成服务器

本仓库提供了一个统一的解决方案,用于将 模型上下文协议 (MCP) 客户端和 REST API 应用程序与 LLM 通过 Python SDK 进行集成。

它包含两个核心组件:

  1. MCP 服务器 – 使任何兼容 MCP 的客户端能够直接与 LLM/API 通信。

  2. FastAPI 服务器 – 提供用于以编程方式调用 LLM/API 的 RESTful API 端点。

这两个服务器旨在确保跨集成渠道的无缝连接、安全身份验证和一致的性能。


📘 概述

本仓库实现了两个专为不同通信模式设计的关键服务器:

  • MCP 服务器 使 MCP 客户端能够使用标准化的模型上下文协议连接到 LLM/API。这允许通过受支持的 MCP 客户端和检查器进行实时交互和动态工具访问。

  • FastAPI 服务器 提供对 LLM/API 的 RESTful 访问,使其能够通过简单的 HTTP 请求轻松集成到现有系统或应用程序中。

这两种实现都利用 Agentforce Python SDK 与 Salesforce 和 Agentforce 后端进行通信,确保了可靠性和一致性。


Related MCP server: FastAPI MCP Server

⚙️ 设置说明

1. 仓库设置

克隆仓库并配置所需的环境变量:

git clone hhttps://github.com/rajpatidar35/custommcp
cd custommcp

⚠️ 注意: 确保这些凭据对应于有效的 CRED 以访问 LLM/API。


2. 依赖安装

使用以下命令安装所有必需的 Python 依赖项:

pip install -r requirements.txt

这将安装 MCP 和 FastAPI 服务器所需的所有库,包括 Agentforce Python SDK。


🚀 运行服务器

🧠 启动 MCP 服务器

要启动 MCP 服务器(用于 MCP 客户端和检查器):

python ./src/serverllm.py

MCP 服务器将初始化并监听传入的 MCP 客户端连接。


🌐 启动 FastAPI 服务器

要运行用于 REST API 访问的 FastAPI 服务器:

fastapi dev ./src/serverllm.py

这将启动 FastAPI 应用程序的开发实例,公开与 Agentforce 智能体交互的 REST 端点。


🔍 检查器服务器 (可选)

要使用 MCP Inspector 工具测试和调试 MCP 服务器:

  1. 启动检查器服务器:

    npx @modelcontextprotocol/inspector
  2. 打开检查器 Web 界面(默认端口:http://localhost:5173 或控制台中显示的端口)。

  3. 使用主机 URL 连接到正在运行的 MCP 服务器:

    https://localhost:8000/mcp
  4. 导航到 Tools 选项卡以探索和测试可用的 MCP 工具。


Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A high-performance FastAPI server supporting Model Context Protocol (MCP) for seamless integration with Large Language Models, featuring REST, GraphQL, and WebSocket APIs, along with real-time monitoring and vector search capabilities.
    8
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A high-performance Model Context Protocol (MCP) server designed for large language models, enabling real-time communication between AI models and applications with support for session management and intelligent tool registration.
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that bridges MCP clients with local LLM services, enabling seamless integration with MCP-compatible applications through standard tools like chat completion, model listing, and health checks.
    -