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

Genius MCP (Gvdlga)

MCP Server

用于创建和部署MCP服务器的核心组件,提供快速设置、SSE支持和Express集成。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
类型安全TypeScript实时通信

安装说明

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

作者 / 组织

gvdlga

提供方

gvdlga

最后核验

2026/5/17 20:21

快速接入

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

详细介绍

@制剂/mcp

用于为Genius Dashboard创建MCP服务器的核心MCP(模型上下文协议)服务器组件。此包提供了一个可重用的服务器实现,可以轻松创建和部署MCP服务器。

安装

npm install @geniusagents/mcp

用法

1.定义您的MCP功能

创建实现 McpFunction 界面。每个函数代表一个可由MCP客户端调用的工具。

import { McpFunction } from '@geniusagents/mcp';
import { z } from 'zod';

export class AddMcp implements McpFunction {
  name = 'add';
  description = 'Adds two numbers';
  
  // Zod schema for validation and type inference
  zschema = {
    a: z.number().describe('The first number'),
    b: z.number().describe('The second number')
  };

  // JSON Schema for the MCP protocol (can be derived from zod or defined manually)
  inputschema = {
    type: "object",
    properties: {
      a: { type: "number", description: "The first number" },
      b: { type: "number", description: "The second number" }
    },
    required: ["a", "b"]
  };

  async handleExecution(args: any) {
    const { a, b } = args;
    return {
      content: [
        {
          type: "text",
          text: `The sum is ${a + b}`
        }
      ]
    };
  }
}

2.创建并运行服务器

立即 GeniusMcpServer 使用您的功能并启动它。

import { GeniusMcpServer, ApiKeyManager } from '@geniusagents/mcp';
import { AddMcp } from './AddMcp'; // Assuming AddMcp is in the same directory

// Initialize the ApiKeyManager with the MCP Name for the Genius Dashboard
ApiKeyManager.initialize({
    mcpName: "AddMcpServer",
    dashboardUrl: process.env.DASHBOARD_URL || "https://dashboard.geniusagents.nl/api/mcp"
});

// Initialize the GeniusMcpServer
const server = new GeniusMcpServer(
  'Add MCP Server',       // Server name
  3000,                   // Port
  [new AddMcp()]          // List of functions
);

server.run().catch(console.error);

特性

  • 轻松设置:使用最少的样板快速启动MCP服务器。
  • SSE支持:内置服务器发送事件传输,用于实时通信。
  • 快速集成:基于Express.js构建。
  • 类型安全:用TypeScript编写,具有完整的类型定义。

许可证

ISC

目录标签

目录标签

类型安全TypeScript实时通信服务器组件本地部署Express集成

接入字段

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

未说明

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

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明none部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP