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

@slackwire/mcp

v0.1.2

Published

MCP server exposing slackwire Slack operations as tools

Readme

@slackwire/mcp

A Model Context Protocol (MCP) server over @slackwire/core. It exposes the same Slack operations the CLI uses (post, morph, react, upload, resolve names) as MCP tools, so an MCP-capable assistant can drive Slack through tool calls instead of a shell. The package is a library: it provides createMcpServer(slackClient, resolver), and you supply the transport (typically stdio).

Version 0.1.0. Requires Node.js 20 or newer.

Install

pnpm add @slackwire/mcp

Running it

Construct a SlackClient and Resolver from @slackwire/core, create the server, and connect a transport. The server runs until the transport closes. Diagnostic logs go to stderr, prefixed [slackwire-mcp].

import { createMcpServer } from '@slackwire/mcp';
import { SlackClient, Resolver } from '@slackwire/core';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';

const client = new SlackClient(process.env.SLACK_TOKEN!);
const resolver = new Resolver(/* web client */, /* cache */, process.env.SLACK_TEAM_ID ?? 'T000');

const server = createMcpServer(client, resolver);
await server.connect(new StdioServerTransport());

Wire it into an MCP host that launches your stdio entry point:

{
  "mcpServers": {
    "slackwire": {
      "command": "node",
      "args": ["path/to/your-mcp-entry.js"],
      "env": { "SLACK_TOKEN": "xoxb-...", "SLACK_TEAM_ID": "T0XXXXXXXXX" }
    }
  }
}

Public API surface

createMcpServer(slackClient, resolver): McpServerHandle

Creates and configures the server. It does not listen until connect() is called.

interface McpServerHandle {
  connect(transport: Transport): Promise<void>;
  close(): Promise<void>;
}

Tools exposed

| Tool | Required inputs | Optional inputs | Returns | |---|---|---|---| | post_card | channel, blocks (JSON string) | text | { ts, channel, permalink } | | update_card | channel, ts, blocks (JSON string) | text | { ts, channel } | | post | channel, text | (none) | { ts, channel } | | react | channel, ts, name | (none) | "ok" | | upload | channel, filename, content | (none) | "ok" | | resolve | name, type ("channel" or "user") | (none) | { name, type, id } |

Every channel input accepts a channel name or a Slack ID; names are resolved to an ID via the injected Resolver before each call. blocks is passed as a JSON-encoded string so the tool schema stays type: string and avoids nesting issues with arbitrary block shapes. post_card returns a permalink of the form https://slack.com/archives/<channel>/p<ts>. react expects the emoji name without colons. resolve returns id: null when the name cannot be resolved.

Limits and gotchas

  • blocks must be a JSON-encoded array for post_card and update_card. A non-JSON or non-array value is rejected with an isError tool response (Invalid blocks: ...), not a thrown exception.
  • The MCP server does no template rendering and no per-kind escaping, but it does re-validate: post_card and update_card run validateStructural and validateLimits on the parsed blocks before sending, and a structure or Slack-limit violation comes back as a Validation error: ... tool response. Render and escape with @slackwire/core's render() first, then pass the resulting blocks; the tools forward them unchanged once validation passes.
  • Name resolution and its caching are entirely the responsibility of the Resolver you inject.
  • The accent / attribution footer is off by default and is a render-time concern in @slackwire/core, not something these tools add.
  • Errors thrown inside a tool handler surface to the calling agent as MCP error responses.

See the root README for the overall project.