MCP Server Tencent

by yangbuyiya

342 downloads
Not rated
GitHub

Description

# 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 服务配置…

About

# 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 服务配置 项目支持通过命令行参数或配置文件进行配置。以下是完整的配置示例: ```json {…

Details

Author
yangbuyiya
Downloads
342
Categories
Other

- Integrates Tencent Cloud AI services through a single MCP interface
- Built on Spring Boot 3.4.5 and Spring AI 1.0.0-M6
- Configurable via environment variables, command-line args, or YAML
- Authentication using Tencent Cloud login cookie
- Supports custom MCP categories via tencent.api.categories

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Server Tencent
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, obtain a valid Tencent Cloud login cookie, and either set it as an environment variable (TENCENT_API_COOKIE) or pass it via command-line argument (--tencent.api.cookie). Then compile with Maven and run the JAR file. The server operates over stdio, so it must be launched as a subprocess by an MCP client configured with the appropriate Java command and arguments.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp server tencent": {
            "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\u77e5\u8bc6",
                    "--tencent.api.cookie=your_cookie_here"
                ]
            }
        }
    }
}

McpServers

{
    "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\u77e5\u8bc6",
            "--tencent.api.cookie=your_cookie_here"
        ]
    }
}

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

2. Cookie 配置

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

1. 通过命令行参数配置:

java -jar mcp-server-tencent-1.0.0.jar --tencent.api.cookie="your_cookie_here"

2. 通过环境变量配置:

export TENCENT_API_COOKIE="your_cookie_here"

3. 通过配置文件配置:
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 [项目地址]

2. 配置 Cookie

export TENCENT_API_COOKIE="your_cookie_here"

3. 编译运行

mvn clean package
java -jar target/mcp-server-tencent-1.0.0.jar

获取 Cookie 的方法

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

许可证

[添加许可证信息]
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.