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

mcp-apis

v1.0.1

Published

MCP Server for ServiceStack APIs

Readme

ServiceStack MCP Server

An MCP (Model Context Protocol) Server that enables Claude to interact with ServiceStack APIs. This tool transforms your ServiceStack API metadata into an MCP server, allowing Claude to discover and invoke your APIs through natural language.

What is this?

This MCP server allows Claude to:

  • Discover all available APIs from your ServiceStack application
  • Understand the request/response schemas
  • Invoke APIs with proper parameters
  • Handle authentication when required

Getting Your ServiceStack API Metadata

ServiceStack automatically generates API metadata at the /metadata/app.json endpoint of your application. You can use this tool in two ways:

Option 1: Use URL Directly (Recommended)

Point directly to your ServiceStack API URL - the tool will automatically fetch the metadata:

# Using base URL (will automatically fetch /metadata/app.json)
npx mcp-apis https://your-api.com

# Or for local development
npx mcp-apis https://localhost:5001

# You can also specify the full metadata path
npx mcp-apis https://your-api.com/metadata/app.json

Option 2: Download app.json File

Alternatively, download the metadata file first:

# Download from your ServiceStack application
curl https://your-api.com/metadata/app.json > app.json

# Or for local development
curl https://localhost:5001/metadata/app.json > app.json

Quick Start

You can run the MCP server with either a URL or local file:

# Using a URL (recommended)
npx mcp-apis https://your-api.com

# Using a local file
npx mcp-apis ./app.json

Filtering APIs

Filter by tag:

# With URL
npx mcp-apis https://your-api.com --tag Posts

# With local file
npx mcp-apis ./app.json --tag TechStacks

Filter specific APIs:

# Single API
npx mcp-apis https://your-api.com --apis QueryPost

# Multiple APIs
npx mcp-apis ./app.json --apis QueryPosts,CreatePost,UpdatePost,DeletePost

Connecting to Claude Tools

Claude Desktop App

To use this MCP server with the Claude Desktop app, add it to your Claude Desktop configuration file:

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

On Windows: %APPDATA%/Claude/claude_desktop_config.json

On Linux: ~/.config/Claude/claude_desktop_config.json

Add the following configuration:

Using a URL (recommended):

{
  "mcpServers": {
    "servicestack": {
      "command": "npx",
      "args": [
        "mcp-apis",
        "https://your-api.com"
      ]
    }
  }
}

Using a local file:

{
  "mcpServers": {
    "servicestack": {
      "command": "npx",
      "args": [
        "mcp-apis",
        "/absolute/path/to/your/app.json"
      ]
    }
  }
}

Example with filtering:

{
  "mcpServers": {
    "techstacks-api": {
      "command": "npx",
      "args": [
        "mcp-apis",
        "https://techstacks.io",
        "--tag",
        "Posts"
      ]
    }
  }
}

After saving the configuration, restart Claude Desktop. The MCP server will appear in the MCP menu (click the 🔌 icon at the bottom of the chat window).

Claude Code CLI

To use this MCP server with Claude Code, add it to your MCP settings file:

Location: ~/.config/claude-code/mcp_settings.json

Using a URL (recommended):

{
  "mcpServers": {
    "servicestack": {
      "command": "npx",
      "args": [
        "mcp-apis",
        "https://your-api.com"
      ]
    }
  }
}

Using a local file:

{
  "mcpServers": {
    "servicestack": {
      "command": "npx",
      "args": [
        "mcp-apis",
        "/absolute/path/to/your/app.json"
      ]
    }
  }
}

Example with filtering:

{
  "mcpServers": {
    "my-api": {
      "command": "npx",
      "args": [
        "mcp-apis",
        "https://my-api.com",
        "--apis",
        "QueryPosts,CreatePost,UpdatePost"
      ]
    }
  }
}

After saving, restart Claude Code. You can verify the MCP server is connected by checking the MCP status in the CLI.

Per-Project Configuration (Claude Code)

For project-specific MCP servers, create a .mcp_settings.json file in your project root:

Using a URL:

{
  "mcpServers": {
    "local-api": {
      "command": "npx",
      "args": [
        "mcp-apis",
        "https://localhost:5001"
      ]
    }
  }
}

Using a local file:

{
  "mcpServers": {
    "local-api": {
      "command": "npx",
      "args": [
        "mcp-apis",
        "./app.json"
      ]
    }
  }
}

Claude Code will automatically load this configuration when working in that directory.

Using with Other MCP Clients

Any MCP-compatible client can connect to this server using the stdio transport. The general pattern is:

{
  "command": "npx",
  "args": ["mcp-apis", "/path/to/app.json"]
}

Or if you've installed globally:

{
  "command": "mcp-apis",
  "args": ["/path/to/app.json"]
}

Configuration Options

All command-line options work in MCP client configurations:

  • Filter by tag:

    "args": ["mcp-apis", "./app.json", "--tag", "Posts"]
  • Filter specific APIs:

    "args": ["mcp-apis", "./app.json", "--apis", "QueryPosts,CreatePost"]
  • Combine multiple filters:

    "args": ["mcp-apis", "./app.json", "--tag", "TechStacks", "--apis", "QueryPosts"]

Example Usage in Claude

Once connected, you can interact with your ServiceStack APIs naturally:

You: "Get the post with ID 123"
Claude: [Uses the GetPost API to fetch post 123]

You: "Create a new post titled 'Hello World' in organization 1"
Claude: [Uses the CreatePost API with the provided parameters]

You: "Search for posts about TypeScript"
Claude: [Uses the QueryPosts API to search for relevant posts]

Troubleshooting

If the MCP server doesn't appear:

  1. Verify the path: Make sure the path to your app.json file is absolute, not relative
  2. Check the file exists: Ensure your app.json file exists at the specified path
  3. Restart the client: After updating the configuration, restart Claude Desktop or Claude Code
  4. Check logs:
    • Claude Desktop: Check ~/Library/Logs/Claude/ (macOS) or equivalent on your OS
    • Claude Code: Look for MCP-related errors in the CLI output