Back to MCP directory
publicPublicdnsLocal runtime

connect4_mcp

MCP Connect 4是一个通过MCP技术实现人机交互的井字棋游戏项目,允许用户与AI助手对弈,并自动记录游戏状态。

article

README

🚀 MCP 连接 4

MCP 连接 4 项目旨在借助 MCP 实现各类工具(如数据库、网络)的连接,构建强大关联。同时,项目融入娱乐元素,让用户能在其中享受游戏乐趣。这不仅能实现更高级的用户互动,还为整个过程增添了趣味性。

🚀 快速开始

配置步骤

只需克隆该仓库,并在 Claude 的 JSON 配置文件中添加以下内容(若使用其他 LLM 提供商,可进行类似配置):

{
    "connect4": {
      "command": "绝对路径到可执行文件",
      "args": [
        "--directory",
        "绝对路径到此仓库",
        "run",
        "main.py"
      ]
    }
}

查看棋盘状态

目前,用户可以通过查看 LLM 提供商聊天中的工具调用来观察棋盘状态,后续此功能还有进一步优化的空间。

💻 使用示例

基础用法

以下是在 Claude 的 JSON 配置文件中添加项目配置的示例:

{
    "connect4": {
      "command": "绝对路径到可执行文件",
      "args": [
        "--directory",
        "绝对路径到此仓库",
        "run",
        "main.py"
      ]
    }
}

高级用法

后续随着项目的优化,用户可能会有更多的操作方式来与游戏进行互动,届时可根据更新的文档进行操作。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client