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

Synos MCP

MCP Server

MCP Server是一个提供安全API访问的多集成服务,支持Salesforce、HubSpot等业务工具,具备RESTful接口、Docker支持和CI/CD自动化部署功能。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
API集成安全认证Docker

安装说明

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

作者 / 组织

AleenDhar

提供方

AleenDhar

最后核验

2026/5/17 20:22

快速接入

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

命令预览

pip install -r requirements.txt

详细介绍

MCP服务器

![Deploy to EC2](https://github.com/YOUR_USERNAME/YOUR_REPO/actions/workflows/deploy.yml)

多集成MCP(模型上下文协议)服务器,提供对各种业务工具的安全API访问。

特性

  • 多重集成:Salesforce、HubSpot等
  • 安全认证:通过NextJS后端进行基于API密钥的身份验证
  • RESTful API:标准HTTP/JSON接口
  • Docker支持:使用Docker Compose完全容器化
  • CI/CD管道:通过GitHub Actions自动部署到AWS EC2
  • 可扩展:添加新集成很简单
  • 生产就绪:健康检查、日志记录和错误处理

快速链接

建筑

┌─────────────┐         ┌──────────────┐         ┌─────────────┐
│   GitHub    │────────▶│GitHub Actions│────────▶│   AWS ECR   │
│ Repository  │  Push   │   (CI/CD)    │  Build  │   (Images)  │
└─────────────┘         └──────────────┘         └─────────────┘
                                                         │
                                                         │ Pull
                                                         ▼
┌─────────────┐         ┌──────────────┐         ┌─────────────┐
│   Client    │────────▶│  MCP Server  │────────▶│ Salesforce  │
│ Application │  API    │   (Docker)   │  Auth   │   HubSpot   │
└─────────────┘         └──────────────┘         └─────────────┘
                               │
                               │ Verify
                               ▼
                        ┌──────────────┐
                        │    NextJS    │
                        │   Backend    │
                        └──────────────┘

快速开始

先决条件

  • Python 3.11+
  • 码头工人
  • AWS帐户(用于生产)
  • GitHub帐户(用于CI/CD)

地方发展

  1. 克隆和设置:
cd mcp-server
cp .env.example .env
# Edit .env with your configuration
  1. 安装依赖项:
pip install -r requirements.txt
  1. 运行服务器:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
  1. 访问API:
  • 服务器:http://localhost:8000
  • 健康检查:http://localhost:8000/health
  • API文件:http://localhost:8000/docs

Docker部署

  1. 塑造形象:
docker build -t mcp-server .
  1. 运行容器:
docker run -d \
  -p 8000:8000 \
  -e NEXTJS_API_URL=https://yourdomain.com/api/verify-key \
  -e ALLOWED_ORIGINS=https://yourdomain.com \
  --name mcp-server \
  mcp-server
  1. 检查日志:
docker logs -f mcp-server

API使用

认证

所有请求都需要 X-API-Key 头球

curl -X POST http://localhost:8000/mcp/salesforce \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "soql",
    "params": {
      "query": "SELECT Id, Name FROM Account LIMIT 10"
    },
    "credentials": {
      "username": "user@example.com",
      "password": "password",
      "security_token": "token"
    }
  }'

可用集成

赛富时

方法:

  • soql -执行SOQL查询
  • get_record -获取单个记录
  • describe_object -获取对象元数据
  • list_objects -列出所有对象
  • search -执行SOSL搜索

示例:

{
  "method": "soql",
  "params": {
    "query": "SELECT Id, Name FROM Account"
  },
  "credentials": {
    "username": "user@salesforce.com",
    "password": "password123",
    "security_token": "securitytoken"
  }
}

集客营销

方法:

  • get_contacts -列出联系人
  • get_contact -获取单一联系人
  • search_contacts -搜索联系人
  • get_companies -列出公司
  • get_company -获得单一公司

示例:

{
  "method": "get_contacts",
  "params": {
    "limit": 50
  },
  "credentials": {
    "api_key": "your-hubspot-api-key"
  }
}

添加新集成

  1. 创建新文件夹: app/integrations/yourintegration/
  1. 创建 __init__.pyserver.py
  1. 实现你的MCP类:
from app.integrations.base import BaseMCP

class YourIntegrationMCP(BaseMCP):
    def __init__(self):
        super().__init__("yourintegration")
    
    def validate_credentials(self, credentials: Dict) -> bool:
        # Validate credentials
        return True
    
    async def execute(self, method: str, params: Dict, credentials: Dict) -> Any:
        # Implement your methods
        pass
  1. 注册 app/main.py:
from app.integrations.yourintegration.server import YourIntegrationMCP

yourintegration_mcp = YourIntegrationMCP()

integrations = {
    "salesforce": salesforce_mcp,
    "hubspot": hubspot_mcp,
    "yourintegration": yourintegration_mcp,
}

环境变量

变量描述默认值
NEXTJS_API_URLNextJS身份验证端点必填
ALLOWED_ORIGINSCORS允许的来源http://localhost:3000
AUTH_TIMEOUT身份验证超时(秒)5.0
PORT服务器端口8000
HOST服务器主机0.0.0.0
LOG_LEVEL日志记录级别info

测试

# Run tests
pytest

# With coverage
pytest --cov=app tests/

生产部署

带CI/CD的AWS EC2

部署.md 获取完整的AWS EC2部署指南,其中包含自动化的GitHub Actions CI/CD。

快速启动:

# 1. Setup EC2 instance
./scripts/setup-ec2.sh

# 2. Create ECR repository
./scripts/create-ecr.sh

# 3. Configure GitHub Secrets (see DEPLOYMENT.md)

# 4. Push to GitHub - auto-deploys!
git push origin main

局部测试

./scripts/local-deploy.sh

铁路/渲染

  1. 连接你的Git仓库
  2. 设置环境变量
  3. 自动部署

安全

  • 所有凭据均按请求传递(不存储)
  • API密钥通过NextJS后端验证
  • CORS强制执行
  • HTTPS建议用于生产
  • 建议速率限制(使用nginx/ALB)

故障排除

连接被拒绝:

  • 检查服务器是否正在运行
  • 验证端口是否正确
  • 检查防火墙规则

认证失败:

  • 验证NEXTJS_API_URL是否正确
  • 检查API密钥是否有效
  • 确保NextJS后端正在运行

集成错误:

  • 验证凭据是否正确
  • 检查集成特定要求
  • 查看响应中的错误消息

许可证

麻省理工学院

支持

有关问题和疑问,请打开GitHub问题。

目录标签

目录标签

API集成安全认证DockerAPI服务Python本地部署业务集成Docker部署CI/CD自动化

接入字段

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

stdio

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

api-key

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdioapi-key部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP