Sponsored by Deepsite.site

MCP Server Tencent

Created By
yangbuyiya7 months ago
Content

MCP Server Tencent

项目简介

这是一个基于 Spring Boot 3.x 和 Spring AI 的腾讯云 MCP 服务端项目。该项目主要用于与腾讯云 AI 服务进行集成,提供统一的接口调用能力。

技术栈

  • Spring Boot 3.4.5
  • Spring AI 1.0.0-M6
  • Java 17
  • Maven

快速开始

环境要求

  • JDK 17 或更高版本
  • Maven 3.6 或更高版本

配置说明

1. MCP 服务配置

项目支持通过命令行参数或配置文件进行配置。以下是完整的配置示例:

{
  "mcp-server-tencent": {
    "command": "/path/to/java",
    "args": [
      "-Dspring.ai.mcp.server.stdio=true",
      "-Dfile.encoding=utf-8",
      "-jar",
      "/path/to/mcp-server-tencent-1.0.0.jar",
      "--tencent.api.categories=MCP知识",
      "--tencent.api.cookie=your_cookie_here"
    ]
  }
}

配置参数说明:

  • command: Java 可执行文件路径
  • args: 启动参数列表
    • -Dspring.ai.mcp.server.stdio=true: 启用标准输入输出
    • -Dfile.encoding=utf-8: 设置文件编码
    • -jar: 指定运行 JAR 文件
    • --tencent.api.categories: 设置 MCP 类别
    • --tencent.api.cookie: 设置认证 Cookie

项目使用腾讯云的 Cookie 进行身份验证,有两种配置方式:

  1. 通过命令行参数配置:
java -jar mcp-server-tencent-1.0.0.jar --tencent.api.cookie="your_cookie_here"
  1. 通过环境变量配置:
export TENCENT_API_COOKIE="your_cookie_here"
  1. 通过配置文件配置: 在 application.yml 中设置:
tencent:
  api:
    cookie: your_cookie_here

3. 其他配置项

  • tencent.api.categories: 默认为 "MCP"
  • spring.application.name: 应用名称,默认为 "mcp-server-tencent"
  • spring.ai.mcp.server.version: 服务版本号

运行项目

  1. 克隆项目
git clone [项目地址]
  1. 配置 Cookie
export TENCENT_API_COOKIE="your_cookie_here"
  1. 编译运行
mvn clean package
java -jar target/mcp-server-tencent-1.0.0.jar
  1. 登录腾讯云控制台
  2. 打开浏览器开发者工具(F12)
  3. 切换到 Network 标签页
  4. 刷新页面
  5. 在请求中找到任意一个请求,查看其 Cookie 信息
  6. 复制完整的 Cookie 字符串

注意事项

  • Cookie 包含敏感信息,请勿将其提交到代码仓库
  • 建议使用环境变量方式配置 Cookie
  • Cookie 可能会定期失效,需要及时更新
  • 确保 Java 路径配置正确
  • 确保 JAR 文件路径配置正确

日志配置

  • 日志文件位置:data/log/mcp-server-tencent.log
  • 日志格式:标准控制台输出格式

依赖说明

主要依赖包括:

  • spring-ai-mcp-server-spring-boot-starter
  • spring-web
  • fastjson
  • retrofit2
  • lombok
  • jackson-databind

许可证

[添加许可证信息]

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
Tavily Mcp
Serper MCP ServerA Serper MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。