Cyberlink MCP Server

by dasein108

Integrations

  • Provides integration for Cursor IDE, a GitHub product, enabling management of cyberlinks and semantic relationships through a standardized interface to the CW-Social smart contract.

  • Runs as a Node.js application, providing MCP tools for creating, querying, and managing cyberlinks and wallet operations on Cosmos-based blockchains.

一个模型上下文协议 (MCP) 服务器,用于与基于 Cosmos 的区块链上的 CW-Social 智能合约进行交互。该服务器提供了一个标准化接口,用于创建、更新和查询网络链接(区块链上实体之间的语义关系)。

特征

  • 核心运营
    • 创建、读取、更新和删除网络链接
    • 支持使用自定义标识符命名的网络链接
    • 批量操作,高效处理
    • 具有过滤和分页功能的丰富查询功能
  • 交易管理
    • 实时交易监控和状态轮询
    • 详细的交易结果和错误处理
    • 支持内部和外部交易签名
    • 代币转移功能
  • 高级功能
    • 通过 Hugging Face Transformer 生成语义嵌入
    • 模型运行的实时进度跟踪
    • 语义匹配的余弦相似度计算
    • 灵活的 ID 系统,具有格式化 ID(fids)和全局 ID(gids)
    • 支持 UTC 的基于时间范围的查询
    • 基于所有者的过滤和统计

先决条件

  • Node.js 16 或更高版本
  • npm 或 yarn 包管理器
  • 访问正在运行的 Cosmos 区块链节点
  • 钱包中有足够资金进行交易
  • 用于开发的Cursor IDE
  • Claude Desktop提供人工智能辅助

安装

  1. 克隆存储库:
git clone https://github.com/your-org/cw-social-mcp.git cd cw-social-mcp
  1. 安装依赖项:
npm install
  1. 构建项目:
npm run build
  1. 配置环境变量(参见配置部分)

配置

MCP 服务器设置

~/.cursor/mcp.json创建或修改配置文件:

{ "mcpServers": { "cw-graph": { "command": "node", "args": ["PATH_TO_YOUR_PROJECT/dist/index.js"], "env": { "NODE_URL": "http://localhost:26657", "WALLET_MNEMONIC": "your wallet mnemonic phrase", "CONTRACT_ADDRESS": "your contract address", "DENOM": "stake", "BENCH32_PREFIX": "cyber" } } } }

所需配置

所需的环境变量:

  • PATH_TO_YOUR_PROJECT :项目目录的绝对路径
  • NODE_URL :Cosmos 区块链节点 URL
  • CONTRACT_ADDRESS :部署的智能合约地址

可选配置

可选的环境变量:

  • WALLET_MNEMONIC :用于签名的钱包助记符(默认值:无 - 交易将未签名)
  • DENOM :代币面额(默认值:“stake”)
  • BENCH32_PREFIX :BECH32 前缀

可用工具

讯连管理

创作工具

创建_讯连科技

  • 描述:创建单个网络链接
  • 必填: type
  • 可选: fromtovalue

创建_cyberlink2

  • 描述:创建节点+链接
  • 必需: node_typelink_type
  • 可选: node_valuelink_valuelink_to_existing_idlink_from_existing_id

创建命名的 Cyberlink

  • 描述:创建名为 cyberlink 的(仅限管理员)
  • 必填项: namecyberlink

创建网络链接

  • 描述:批量创建网络链接
  • 必需: cyberlinks[]
修改工具

update_cyberlink

  • 描述:更新现有的讯连科技
  • 必需: gidcyberlink

删除讯连科技

  • 描述:删除讯连科技
  • 必需: gid

更新嵌入

  • 描述:添加语义嵌入
  • 必需: formatted_id

查询操作

基本查询

查询_by_gid

  • 描述:通过全局ID获取
  • 必需: gid

query_by_fid

  • 描述:通过格式化的ID获取
  • 必需: fid

查询网络链接

  • 描述:分页列出所有内容
  • 参数: limitstart_after

query_named_cyberlinks

  • 描述:列出已命名的cyberlinks
  • 参数: limitstart_after

query_by_gids

  • 描述:通过 ID 获取多个
  • 必需: gids[]
过滤查询

query_cyberlinks_by_type

  • 描述:按类型过滤
  • 必填: type

query_cyberlinks_by_from

  • 描述:按来源过滤
  • 必填: from

query_cyberlinks_by_to

  • 描述:按目标过滤
  • to

query_cyberlinks_by_owner_and_type

  • 描述:按所有者和类型过滤
  • 必需: ownertype
基于时间的查询

query_cyberlinks_by_owner_time

  • 描述:按创建时间过滤
  • 必需: ownerstart_time

query_cyberlinks_by_owner_time_any

  • 描述:按任意时间过滤
  • 必需: ownerstart_time

系统操作

合同信息

查询最后一个 ID

  • 描述:获取最后分配的ID

查询配置

  • 描述:获取合约配置

查询调试状态

  • 描述:获取调试状态(仅限管理员)

获取图表统计信息

  • 描述:获取图表统计数据
交易与钱包

查询交易

  • 描述:获取 tx 状态
  • 必需: transaction_hash

获取交易状态

  • 描述:获取详细的交易状态
  • 必需: transaction_hash

查询钱包余额

  • 描述:获取钱包余额

发送令牌

  • 描述:转移代币
  • 必填项: recipientamount

查询参数

时间范围格式

  • 所有时间戳必须采用 ISO 8601 格式
  • 例如: 2024-06-01T12:00:00Z
  • 如果未指定,则假定为 UTC 时区
  • start_time为必填项, end_time为可选项

分页

  • start_after :分页游标
  • limit :每页结果数(默认值:50)

发展

构建命令

# Production build npm run build # Development mode npm run dev

项目结构

src/ ├── index.ts # Entry point ├── cyberlink-service.ts # Core service ├── services/ │ ├── embedding.service.ts # Semantic analysis │ └── __tests__/ # Test suite └── types.ts # Type definitions cursor_rules/ └── chat_history.mdc # Chat rules

错误代码

无效参数

  • 描述:无效的参数
  • 常见原因:缺少必填字段、格式错误

未找到方法

  • 描述:未知工具
  • 常见原因:工具名称拼写错误、工具已弃用

内部错误

  • 描述:系统错误
  • 常见原因:网络问题、合同错误

在 SSE 上运行 MCP

您可以使用 Docker 运行 MCP 服务器,将其转换为 SSE 服务器。这可确保 Hugging Face 模型缓存在运行期间持久保存,并从 .env 文件加载环境变量。

docker run \ --name cw-social \ -v $(pwd)/hf-cache:/app/hf-cache \ --env-file .env \ -p 8000:8000 \ cw-social-mcp
  • -v $(pwd)/hf-cache:/app/hf-cache安装一个用于模型缓存的本地目录,因此每次都不需要重新下载模型。
  • --env-file .env从您的.env文件加载环境变量。
  • -p 8000:8000在端口 8000 上公开服务器。
  • --name cw-social为您的容器命名,以便于管理。

贡献

  1. 分叉存储库
  2. 创建功能分支( git checkout -b feature/amazing-feature
  3. 提交您的更改( git commit -m 'Add amazing feature'
  4. 推送到分支( git push origin feature/amazing-feature
  5. 打开拉取请求

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

通过与 Cursor IDE 和 Claude Desktop 集成,用于在基于 Cosmos 的区块链上创建、更新和查询语义关系(网络链接)的模型上下文协议服务器。

  1. 特征
    1. 先决条件
      1. 安装
        1. 配置
          1. MCP 服务器设置
          2. 所需配置
          3. 可选配置
        2. 可用工具
          1. 讯连管理
          2. 查询操作
          3. 系统操作
        3. 查询参数
          1. 时间范围格式
          2. 分页
        4. 发展
          1. 构建命令
          2. 项目结构
          3. 错误代码
        5. 在 SSE 上运行 MCP
          1. 贡献
            1. 执照

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables Claude AI to interact with the Solana blockchain through a standardized interface, providing tools for transactions, account queries, and wallet management.
                Last updated -
                60
                69
                Apache 2.0
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server implementation that enables LLMs to interact with NebulaGraph database for graph exploration, supporting schema understanding, queries, and graph algorithms.
                Last updated -
                16
                Python
                Apache 2.0
              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol server that provides expert guidance for Dojo and Cairo development on Starknet, offering specialized knowledge and assistance for building onchain worlds using the Dojo Entity Component System framework.
                Last updated -
                7
                1
                5
                TypeScript
                MIT License
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that provides onchain tools for Claude AI, allowing it to interact with the Solana blockchain through a standardized interface for operations like managing assets, executing token operations, and retrieving network information.
                Last updated -
                6
                TypeScript

              View all related MCP servers

              ID: 8952yffzpq