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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sylphlab/tools-adaptor-mcp

v0.3.1

Published

Adapter to convert internal SylphTool definitions to MCP SDK format.

Readme

@sylphlab/tools-adaptor-mcp

NPM version

Bridge the gap between SylphLab Tools and the Model Context Protocol (MCP)!

This package provides essential adapter functions to seamlessly convert tool definitions created using @sylphlab/tools-core into the format required by the @modelcontextprotocol/sdk. It's a crucial internal component for building MCP-compliant tool servers within the SylphLab ecosystem.

Purpose

When building tools using the @sylphlab/tools-core defineTool function, you get a standardized tool definition object. However, to expose these tools via an MCP server, they need to conform to the schema expected by the MCP SDK.

@sylphlab/tools-adaptor-mcp handles this conversion, translating the input/output schemas (often defined using Zod) and other metadata into the structure the MCP server understands.

Key Features

  • Automatic Conversion: Takes a SylphTool definition and outputs an MCP-compatible tool definition.
  • Schema Translation: Handles the conversion of Zod schemas (used in @sylphlab/tools-core) into JSON Schema format suitable for MCP.
  • Metadata Mapping: Correctly maps tool names, descriptions, and parameters.
  • Simplifies MCP Server Creation: Abstracts away the complexities of manual tool definition conversion, allowing developers to focus on the tool's core logic.

Installation

This package is primarily intended for internal use within the mcp monorepo. If you are developing a new MCP tool server package within this repository, you can add it as a dependency:

# From the root of the monorepo
pnpm add @sylphlab/tools-adaptor-mcp --filter <your-new-mcp-package-name>

Usage (Conceptual)

Typically, you would use this adapter within the main file of an MCP server package (e.g., packages/tools-filesystem-mcp/src/index.ts):

import { createMcpServer } from '@modelcontextprotocol/sdk/server';
import { adaptToolToMcp } from '@sylphlab/tools-adaptor-mcp';
import { filesystemTools } from '@sylphlab/tools-filesystem'; // Assuming this exports an array of SylphTool definitions

// Adapt each SylphTool definition to the MCP format
const mcpTools = filesystemTools.map(adaptToolToMcp);

// Create the MCP server instance
const server = createMcpServer({
  name: 'sylphlab-filesystem',
  description: 'Provides filesystem tools via MCP',
  tools: mcpTools,
  // ... other server options
});

// Start the server
server.start();

(Note: The actual implementation might vary based on the specific server setup.)

Dependencies

  • @modelcontextprotocol/sdk: The core SDK for building MCP servers and clients.
  • @sylphlab/tools-core: Provides the base SylphTool definition format.
  • zod: Used for schema definition and validation.

Developed by Sylph Lab.