Token导航 LogoToken导航TokenDH.com
Vite Plugin MCP Server logo
运维云端未说明官方级别未说明来源级核验

Vite Plugin MCP Server

MCP Server

一个用于Vite的插件服务器,支持自定义工具和实时通信功能。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
实时通信TypeScript本地部署

安装说明

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

作者 / 组织

rywaroy

提供方

rywaroy

最后核验

2026/5/17 20:22

快速接入

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

详细介绍

使用方法

npm i vite-plugin-mcp-server -D
import { defineConfig } from "vite";
import { z } from "zod";
import vitePluginMcpServer from "vite-plugin-mcp-server";

export default defineConfig({
  plugins: [
    vitePluginMcpServer({
      port: 3333,
      register(server) {
        server.tool(
          'get-weather',
          'Get the weather of a city',
          {
            city: z.string().describe("The city to get the weather of"),
          },
          async (params) => {
            return {
              content: [
                {
                  type: "text",
                  text: `The weather of ${params.city} is sunny`,
                },
              ],
            };
          }
        )
      },
    }),
  ],
});
import { defineConfig } from "vite";
import z from "zod";
import vitePluginMcpServer from "vite-plugin-mcp-server";

export default defineConfig({
  plugins: [
    vitePluginMcpServer({
      port: 3333,
      tools: [
        {
          name: "get-weather",
          description: "Get the weather of a city",
          parameters: {
            city: z.string().describe("The city to get the weather of"),
          },
          handler: async (params) => {
            return {
              content: [
                {
                  type: "text",
                  text: `The weather of ${params.city} is sunny`,
                },
              ],
            };
          },
        },
      ],
    }),
  ],
});
http://localhost:3333/sse

目录标签

目录标签

实时通信TypeScript本地部署Vite插件服务器自定义工具

接入字段

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

未说明

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

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明none部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP