Skip to main content
Glama

TSML MCP Server

A Model Context Protocol (MCP) server that provides access to the 12 Step Meeting List (TSML) WordPress plugin API. Enables AI assistants like Claude to search and access recovery meeting data from WordPress sites running the TSML plugin.

๐Ÿš€ Overview

This MCP server exposes the TSML WordPress plugin API endpoints as tools, allowing AI assistants to query meeting data for Alcoholics Anonymous, Narcotics Anonymous, Al-Anon, and other 12-step recovery programs. Perfect for building recovery-focused applications and AI assistants.

Related MCP server: OSM Edit MCP Server

โœจ Features

  • ๐Ÿ” Meeting Search: Extensive filtering by day, time, type, location, and attendance option

  • ๐Ÿ“ Geographic Search: Proximity-based meeting discovery using latitude/longitude

  • ๐Ÿท๏ธ Type Filtering: Filter by meeting types (Open, Closed, Online, etc.)

  • ๐ŸŒ Region/District Support: Hierarchical geographic organization

  • ๐Ÿ’ฌ Typeahead Suggestions: Autocomplete for regions, locations, and groups

  • ๐Ÿ”’ Type Safety: Full TypeScript implementation

  • ๐Ÿ›ก๏ธ Error Handling: Robust error handling with meaningful messages

  • โš™๏ธ Flexible Configuration: Environment variable configuration

  • ๐Ÿ”‘ Authentication Support: Optional API key authentication

Available Tools

1. tsml_search_meetings

Search for recovery meetings with extensive filtering options.

Parameters:

  • day: Day of week (0=Sunday, 1=Monday, ..., 6=Saturday)

  • time: Filter by meeting time (HH:MM format)

  • type: Meeting type codes (e.g., 'O', 'C', 'ONL', 'B', 'BEG')

  • region: Region name or term ID

  • district: District name or term ID

  • query: Text search across meeting names, locations, and groups

  • group_id: Specific group ID

  • location_id: Specific location ID

  • latitude, longitude: Geographic coordinates for proximity search

  • distance: Search radius (default: 2)

  • distance_units: 'mi' (miles) or 'km' (kilometers)

  • attendance_option: 'in_person', 'online', or 'hybrid'

  • mode: Search mode

  • data_source: Filter by data source URL

  • post_status: WordPress post status

Common Meeting Types:

  • O - Open (to anyone)

  • C - Closed (members only)

  • ONL - Online meeting

  • B - Big Book study

  • BEG - Beginners meeting

  • W - Women only

  • M - Men only

  • Y - Young people

  • LGBTQ - LGBTQ+ focused

2. tsml_get_typeahead

Get autocomplete suggestions for meeting search.

Returns regions, locations, and group names to help users find meetings.

3. tsml_geocode_address

Convert an address string to geographic coordinates.

Parameters:

  • address: Address to geocode (required)

  • nonce: WordPress nonce for authentication (required)

Note: Requires authentication via nonce.

4. tsml_submit_feedback

Submit feedback or corrections about a meeting.

Parameters:

  • meeting_id: ID of the meeting (required)

  • tsml_name: Submitter name (required)

  • tsml_email: Submitter email (required)

  • tsml_message: Feedback message (required)

  • tsml_nonce: WordPress nonce (required)

Note: Requires authentication via nonce.

๐Ÿ“ฆ Installation

Prerequisites

  • Node.js 20.0.0 or later

  • npm or yarn

  • WordPress site with 12 Step Meeting List plugin installed

Install from npm

# Install globally
npm install -g @pjaudiomv/tsml-mcp-server

# Or install locally in your project
npm install @pjaudiomv/tsml-mcp-server

Install from source

git clone https://github.com/pjaudiomv/tsml-mcp-server.git
cd tsml-mcp-server
npm install
npm run build
npm install -g .

Configuration

Environment Variables

  • TSML_WORDPRESS_URL (required): The base URL of your WordPress site

  • TSML_API_KEY (optional): API key if the site requires authentication

  • TSML_TIMEOUT: Request timeout in milliseconds (default: 30000)

  • TSML_USER_AGENT: Custom user agent string

Example Configuration

export TSML_WORDPRESS_URL=https://example.org
export TSML_API_KEY=your-api-key-here
export TSML_TIMEOUT=60000
export TSML_USER_AGENT=MyApp-TSML-MCP/1.0.0

Usage

Running the Server

# Using environment variables
TSML_WORDPRESS_URL=https://example.org tsml-mcp-server

# Or if installed from source
TSML_WORDPRESS_URL=https://example.org node dist/index.js

Using with Claude Desktop

Add this to your Claude Desktop configuration file:

Mac/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "tsml": {
      "command": "tsml-mcp-server",
      "env": {
        "TSML_WORDPRESS_URL": "https://your-site.org"
      }
    }
  }
}

Development Example:

{
  "mcpServers": {
    "tsml-mcp-server": {
      "command": "node",
      "args": ["/PATH_TO_REPO/tsml-mcp-server/dist/index.js"],
      "env": {
        "TSML_WORDPRESS_URL": "https://your-site.org",
        "TSML_API_KEY": "optional-api-key"
      }
    }
  }
}

Using with other MCP clients

The server follows the standard MCP protocol and can be used with any MCP-compatible client.

Examples

Search for Meetings on Tuesday

{
  "name": "tsml_search_meetings",
  "arguments": {
    "day": 2
  }
}

Search for Online Meetings

{
  "name": "tsml_search_meetings",
  "arguments": {
    "attendance_option": "online"
  }
}

Search Near Geographic Location

{
  "name": "tsml_search_meetings",
  "arguments": {
    "latitude": 40.7128,
    "longitude": -74.0060,
    "distance": 5,
    "distance_units": "mi"
  }
}

Search for Beginners Meetings

{
  "name": "tsml_search_meetings",
  "arguments": {
    "type": "BEG",
    "day": 2
  }
}
{
  "name": "tsml_search_meetings",
  "arguments": {
    "query": "step study"
  }
}

Get Typeahead Suggestions

{
  "name": "tsml_get_typeahead",
  "arguments": {}
}

Development

Setup

git clone https://github.com/pjaudiomv/tsml-mcp-server.git
cd tsml-mcp-server
npm install

Available Scripts

  • npm run dev: Run in development mode with hot reload

  • npm run build: Build for production

  • npm run watch: Build and watch for changes

  • npm run lint: Run ESLint

  • npm run lint:fix: Fix ESLint issues

Project Structure

src/
โ”œโ”€โ”€ index.ts          # Main server implementation
โ”œโ”€โ”€ client.ts         # TSML API client
โ”œโ”€โ”€ tools.ts          # MCP tool definitions and handlers
โ””โ”€โ”€ types.ts          # TypeScript type definitions

API Reference

TSML WordPress Plugin API

This server implements the public AJAX endpoints from the 12 Step Meeting List WordPress plugin:

  • meetings: Meeting search with extensive filtering

  • tsml_typeahead: Autocomplete suggestions

  • tsml_geocode: Address geocoding (requires auth)

  • tsml_feedback: Meeting feedback submission (requires auth)

Response Format

All meeting responses include:

  • Meeting details (name, day, time, types, notes)

  • Location information (address, coordinates, timezone)

  • Group information (if applicable)

  • Contact information (if public)

  • Attendance options (in_person, online, hybrid)

Attendance Options

Meetings are automatically categorized by attendance type:

  • in_person: Traditional physical meetings

  • online: Virtual meetings only

  • hybrid: Both in-person and online participation available

Sorting

Meetings are automatically sorted by:

  1. Day of week (Sunday-Saturday)

  2. Meeting time

  3. Location name

  4. Meeting name

Error Handling

The server provides comprehensive error handling:

  • Missing required environment variables

  • HTTP request failures

  • API-specific errors

  • Network timeouts and connectivity issues

  • Authentication failures

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Add tests if applicable

  5. Run linting and ensure builds pass

  6. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Changelog

v1.0.0

  • Initial release

  • Complete TSML API coverage

  • TypeScript implementation

  • Comprehensive error handling

  • Full parameter validation

Available Tools

4 tools
tsml_geocode_addressB

Convert an address string to geographic coordinates (latitude/longitude). Note: This endpoint requires authentication via nonce.

Inputs: nonce (required), address (required).

tsml_get_typeaheadA

Get autocomplete suggestions for meeting search. Returns regions, locations, and group names to help users find meetings.

Inputs: no named parameters.

tsml_search_meetingsB

Search for 12-step recovery meetings with extensive filtering options. Supports filtering by day, time, type, location, region, and attendance option (in-person, online, hybrid). Includes geographic proximity search.

Inputs: day, mode, time, type, +12 more.

tsml_submit_feedbackC

Submit feedback or corrections about a meeting. Note: This endpoint requires authentication via nonce.

Inputs: tsml_name (required), meeting_id (required), tsml_email (required), tsml_nonce (required), +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.5/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a clearly distinct operation: full meeting search, autocomplete suggestions, address geocoding, and feedback submission. The only potential overlap (typeahead vs. search) is well separated by the descriptions, since one returns suggestions and the other returns filtered meeting results.

    Naming Consistency5/5

    All tools share the `tsml_` prefix followed by a verb_noun pattern (search_meetings, get_typeahead, geocode_address, submit_feedback). The convention is uniform and readable throughout.

    Tool Count4/5

    Four tools is a tight, well-scoped surface for a meeting-search service, and each tool clearly earns its place. It sits at the low end of the ideal range, feeling slightly thin but not problematic.

    Completeness4/5

    The core discovery workflow (search, autocomplete, geocode, feedback) is covered, with no obvious dead ends for finding meetings. Minor gaps exist, such as fetching a single meeting by ID or listing available types/formats/regions directly, which agents could work around via search and typeahead.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      A
      maintenance
      Enables AI assistants to search, validate, and edit OpenStreetMap data through natural language commands and built-in safety protections. It supports discovery of nearby amenities, geographic data exploration, and secure map editing via OAuth authentication.
      45
      5
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Connects MCP-compatible AI clients to BMLT root servers, enabling natural language queries for NA meeting data including search by location, day, format, and more.
      5
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to search and retrieve Narcotics Anonymous meeting information from the BMLT database, supporting queries by location, time, format, and service body.
      -