npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@components-mcp-plugins/core

v0.0.5

Published

将自己的组件添加mcp服务

Downloads

8

Readme

@components-mcp/core

NPM version NPM downloads

简介

@components-mcp/core 是一个核心库,提供了与 MCP(Model Context Protocol)服务器交互的功能,支持组件扫描和 SSE(Server-Sent Events)通信。

技术栈

  • TypeScript:提供类型安全的开发体验。
  • Node.js:运行时环境。
  • @modelcontextprotocol/sdk:用于实现 MCP 协议的核心 SDK。
  • HTTP 模块:用于创建和管理 HTTP 服务器。

功能

1. 创建 MCP 服务器

通过 createMcpServer 方法,可以创建一个 MCP 服务器实例,用于管理组件的上下文协议。

2. 创建 SSE 服务器

通过 createSSEServer 方法,可以启动一个支持 SSE 的 HTTP 服务器,用于实时通信。

3. 集成工具

支持通过 MCP 服务器工具方法(如 tool)处理组件文档的内容。

安装

$ pnpm install

使用

启动开发环境

$ npm run dev

构建生产环境

$ npm run build

导出功能

createMcpServer

创建并返回一个 MCP 服务器实例。

import { createMcpServer } from "@components-mcp/core";

const mcpServer = createMcpServer();

createSSEServer

启动一个支持 SSE 的 HTTP 服务器。

import { createSSEServer, createMcpServer } from "@components-mcp/core";

const mcpServer = createMcpServer();
createSSEServer(mcpServer);

LICENSE

MIT