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

activity-mcp-tools

v1.3.1

Published

A mcp tool for activity RD, with the ability to get activity info

Readme

TTLive Campaign MCP 服务

这是一个为 TTLive Campaign 团队提供 MCP (Meta Call Protocol) 能力的仓库。

功能

  1. 查询组件化活动信息
  2. 时间戳转活动所在时区时间
  3. 检查组件化活动库存(todo)
  4. 检查活动配置是否有风险(todo)

如何使用

在Trae的MCP市场中搜索activity-mcp-tools,添加导入以下配置

{
  "mcpServers": {
    "activity-mcp-tools": {
      "command": "npx",
      "args": [
        "activity-mcp-tools"
      ],
      "env": {}
    }
  }
}

如何开发

  1. 参考main函数,注册新的工具和处理函数
    // get activity info tool
	activityInfoTool := mcp.NewTool("activityInfo", // your tool name
		mcp.WithDescription("Get activity info"),   // your tool description
		mcp.WithNumber("activityId",                // your tool input param
			mcp.Required(),                         // whether the param is required
			mcp.Description("The activity id"),     // description of the param
		),
	)
	s.AddTool(activityInfoTool, getActivityInfo)    // register your tool and handler
  1. 参考getActivityInfo函数,实现你的工具的handler
func getActivityInfo(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
	activityId, err := request.RequireString("activityId") // get your tool input param
	if err != nil {
		return mcp.NewToolResultError(err.Error()), nil  // use mcp.NewToolResultError to return error
	}
	/*
        ...
		your logic to get data
        ...
	*/
	return mcp.NewToolResultText(string(activity)), nil
}

如何发布自测

  1. npm login,首先登陆npm,没有账号就注册一个
  2. npm publish,发布到npm(注意将版本号+1)
  3. npx activity-mcp-tools,测试是否发布成功

常用输入命令:

  1. initialize 请求,让服务器报告它支持的 MCP 版本和功能
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"0.1.0","capabilities":{},"clientInfo":{"name":"example-client","version":"1.0.0"}}}

示例输出

{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"serverInfo":{"name":"activity-mcp-tools","version":"1.1.0"}}}
  1. 列出可用工具
{"jsonrpc":"2.0","id":2,"method":"tools/list"}

示例输出

{"jsonrpc":"2.0","id":2,"result":{"tools":[{"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"description":"Get activity info","inputSchema":{"properties":{"activityId":{"description":"The activity id","type":"string"}},"required":["activityId"],"type":"object"},"name":"activityInfo"}]}}
  1. 调用某个工具
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"activityInfo","arguments":{"activityId": "7510084681074051846"}}}

示例输出

{"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"activity config"}]}}