Skip to main content

CLI tool to run Whatsease MCP server from OpenAPI spec

Project description

Whatsease MCP

CLI tool to run a Model Context Protocol (MCP) server for the Whatsease API.

Installation

pip install whatsease-mcp

Usage

Basic Usage

whatsease-mcp --api-url https://api.whatsease.com

Or using environment variable:

export WHATSEASE_API_BASE_URL=https://api.whatsease.com
whatsease-mcp

Options

Option Short Default Description
--api-url -u (required) Base URL of the Whatsease API
--port -p 8001 Port to run the MCP server on
--host -h 0.0.0.0 Host to bind the MCP server to
--include-config -c ./include.json Path to include.json config file
--transport -t http Transport type (http or stdio)

Examples

# Run on custom port
whatsease-mcp -u https://api.whatsease.com -p 8080

# Run on localhost only
whatsease-mcp -u https://api.whatsease.com -h localhost

# Use stdio transport (for direct MCP client integration)
whatsease-mcp -u https://api.whatsease.com -t stdio

# Use custom config file
whatsease-mcp -u https://api.whatsease.com -c /path/to/include.json

Configuration

include.json

Create an include.json file to control which API routes are exposed as MCP tools.

Default behavior (no config or empty config): All routes from the OpenAPI spec are exposed.

With config: Only matching routes are exposed, plus a catch-all exclude at the end.

Format

{
    "include": [
        {
            "mcp_type": "TOOL",
            "methods": ["GET", "POST"],
            "pattern": "/platforms/.*"
        },
        {
            "mcp_type": "TOOL",
            "methods": ["GET"],
            "pattern": "/templates/.*"
        }
    ]
}

Fields

Field Type Description
mcp_type string One of: TOOL, RESOURCE, RESOURCE_TEMPLATE, EXCLUDE
methods array HTTP methods to match: GET, POST, PUT, DELETE
pattern string Regex pattern to match route paths

Example Configurations

Expose only GET routes:

{
    "include": [
        {
            "mcp_type": "TOOL",
            "methods": ["GET"],
            "pattern": ".*"
        }
    ]
}

Expose specific endpoints:

{
    "include": [
        {
            "mcp_type": "TOOL",
            "methods": ["GET", "POST"],
            "pattern": "^/platforms/.*"
        },
        {
            "mcp_type": "TOOL",
            "methods": ["GET"],
            "pattern": "^/templates/.*"
        },
        {
            "mcp_type": "TOOL",
            "methods": ["GET", "POST"],
            "pattern": "^/campaigns/.*"
        }
    ]
}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whatsease_mcp-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whatsease_mcp-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file whatsease_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: whatsease_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for whatsease_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25e74795ce114f0694b9e8c7f29b25004caa4588942657a4588a5f05425aa7c3
MD5 9133356ac9a94ba5e487a13d00399b18
BLAKE2b-256 c118b0002def754fd5b2eda4ab43417b85aef16739c07c33654281398bad93fb

See more details on using hashes here.

File details

Details for the file whatsease_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: whatsease_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for whatsease_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 798e8d33308bdeaa060b16944d37e53b565c9786e617d5a07495c99d15cf3806
MD5 44dd5cfdc81b6f41f9098dda70205e55
BLAKE2b-256 edc293022d10897534d825bd09f05e26df22f5ba4f2ab76af56ce3941c05bb01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page