Skip to main content

A Model Context Protocol server for SMS and MMS messaging services

Project description

BaaS SMS/MMS MCP Server

npm version PyPI version Python 3.10+ License: MIT

A comprehensive Model Context Protocol server for SMS and MMS messaging services, designed to provide seamless integration with the BaaS platform through intelligent code generation and CDN-optimized templates.

๐Ÿš€ Overview

This MCP server acts as a bridge between AI development workflows and the BaaS messaging platform, providing:

  • Intelligent Code Generation: Generate production-ready code for SMS/MMS integration
  • CDN-Optimized Templates: Fetch maintained, up-to-date code templates from CDN
  • Multi-Language & Framework Support: JavaScript, Python, PHP with React, Vue, Django, Laravel, and more
  • Token Efficiency: Minimize token usage through CDN-based template fetching
  • Environment Integration: Automatic API key injection and environment variable management
  • Platform-Specific Guides: Deployment and integration guides for major platforms

๐Ÿ“‹ Architecture

System Components

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        MCP Client (Claude, etc.)                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚ MCP Protocol
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Node.js Wrapper (index.js)                   โ”‚
โ”‚                   - Cross-platform compatibility                โ”‚
โ”‚                   - Dependency management                       โ”‚
โ”‚                   - Process lifecycle                          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               Python MCP Server (server.py)                     โ”‚
โ”‚                   - FastMCP framework                          โ”‚
โ”‚                   - CDN template fetching                      โ”‚
โ”‚                   - Code generation & customization            โ”‚
โ”‚                   - API key injection                          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚ HTTPS
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                CDN Template Repository                          โ”‚
โ”‚                   - Language-specific templates                โ”‚
โ”‚                   - Framework integrations                     โ”‚
โ”‚                   - Deployment guides                          โ”‚
โ”‚                   - Project helpers                            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Template Structure

templates/
โ”œโ”€โ”€ javascript/
โ”‚   โ”œโ”€โ”€ vanilla.md          # Pure JavaScript implementation
โ”‚   โ””โ”€โ”€ react.md           # React component integration
โ”œโ”€โ”€ python/
โ”‚   โ”œโ”€โ”€ vanilla.md          # Python requests-based
โ”‚   โ””โ”€โ”€ django.md          # Django integration
โ”œโ”€โ”€ php/
โ”‚   โ””โ”€โ”€ vanilla.md          # PHP cURL implementation
โ”œโ”€โ”€ helpers/
โ”‚   โ””โ”€โ”€ javascript-project.md  # Project-specific utilities
โ””โ”€โ”€ deployment/
    โ””โ”€โ”€ vercel-production.md    # Platform deployment guides

๐Ÿ›  Installation & Setup

npm Installation (Recommended)

npm install -g baas-sms-mcp

Local Development Setup

git clone https://github.com/jjunmomo/BaaS-MCP.git
cd BaaS-MCP
npm install

Python Dependencies

The server automatically manages Python dependencies, but you can install manually:

pip install -r requirements.txt

โš™๏ธ Configuration

MCP Client Configuration

Add to your MCP client configuration file:

{
  "mcpServers": {
    "baas-sms-mcp": {
      "command": "npx",
      "args": ["baas-sms-mcp"],
      "env": {
        "BAAS_API_KEY": "your_actual_api_key_here"
      }
    }
  }
}

Environment Variables

Variable Description Required
BAAS_API_KEY Your BaaS platform API key Yes*

*Required for automatic API key injection into generated code. The server works without it but requires manual key configuration.

๐Ÿ”ง Available Tools

1. get_code_template_url

Purpose: Get CDN URLs for optimized code templates without token overhead

Parameters:

  • language (string): Programming language
    • Supported: javascript, python, php, java, go, csharp
  • framework (optional): Framework name
    • JavaScript: react, vue, angular
    • Python: django, fastapi, flask
    • PHP: laravel, symfony
  • deployment_platform (optional): Target platform
    • vercel, netlify, aws, docker, etc.

Returns:

{
  "success": true,
  "template_url": "https://cdn.mbaas.kr/templates/sms-mms/javascript/react.md",
  "integration_url": "https://cdn.mbaas.kr/templates/sms-mms/deployment/vercel.md",
  "api_endpoint": "https://api.aiapp.link/api/message/",
  "configuration": {
    "required_env_vars": ["BAAS_API_KEY"],
    "api_key_injected": true
  }
}

2. generate_direct_api_code

Purpose: Generate production-ready code by fetching and customizing CDN templates

Parameters:

  • language (string, default: "javascript"): Target programming language
  • framework (optional): Framework-specific implementation
  • include_examples (boolean, default: true): Include usage examples

Returns:

{
  "success": true,
  "code": "// Complete implementation code...",
  "filename": "baas-sms-service.js",
  "description": "JavaScript BaaS SMS service for direct /api/message/ API calls",
  "source": "CDN template",
  "configuration": {
    "env_vars": ["BAAS_API_KEY"],
    "install": "npm install (dependencies included)",
    "api_key_injected": true
  }
}

3. create_message_service_template

Purpose: Create complete project-specific service templates with customization

Parameters:

  • project_config (object): Project configuration
    {
      "default_callback": "02-1234-5678",
      "company_name": "Your Company"
    }
    
  • language (string): Target programming language
  • features (array, optional): Features to include
    • Available: ["sms", "mms", "status_check", "history", "validation"]

Returns:

{
  "success": true,
  "code": "// Customized implementation with project defaults...",
  "filename": "your_company_message_service.js",
  "description": "Your Company ์ „์šฉ ๋ฉ”์‹œ์ง€ ์„œ๋น„์Šค ํ…œํ”Œ๋ฆฟ",
  "source": "CDN template + project customization"
}

4. get_integration_guide

Purpose: Get detailed platform-specific deployment and integration guides

Parameters:

  • platform (string): Target platform
    • Supported: vercel, netlify, heroku, aws, gcp, azure, docker
  • deployment_type (string, default: "production"): Deployment environment
    • Options: development, staging, production

Returns:

{
  "success": true,
  "platform": "vercel",
  "deployment_type": "production",
  "guide_content": "# Vercel ๋ฐฐํฌ ๊ฐ€์ด๋“œ\n...",
  "security_checklist": [
    "API ํ‚ค๋ฅผ ์ฝ”๋“œ์— ํ•˜๋“œ์ฝ”๋”ฉํ•˜์ง€ ์•Š๊ธฐ",
    "ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ๋˜๋Š” ์‹œํฌ๋ฆฟ ๊ด€๋ฆฌ ์„œ๋น„์Šค ์‚ฌ์šฉ",
    "HTTPS ํ†ต์‹  ํ™•์ธ",
    "์ ์ ˆํ•œ ์—๋Ÿฌ ๋กœ๊น… ์„ค์ •"
  ]
}

๐Ÿšจ Important API Changes

The BaaS platform has been updated with breaking changes:

New API Structure

  • Base URL: https://api.aiapp.link
  • SMS Endpoint: /api/message/sms
  • MMS Endpoint: /api/message/mms
  • Authentication: X-API-KEY header only

Breaking Changes

  • โŒ PROJECT_ID parameter removed from all API calls
  • โŒ Old endpoints deprecated
  • โœ… Simplified authentication with API key only
  • โœ… Updated response format

Migration Guide

// OLD (deprecated)
const response = await fetch('https://api.aiapp.link/message/sms', {
  headers: {
    'Authorization': `Bearer ${jwt_token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    project_id: "uuid-string",
    // ... other params
  })
});

// NEW (current)
const response = await fetch('https://api.aiapp.link/api/message/sms', {
  headers: {
    'X-API-KEY': process.env.BAAS_API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    // project_id removed
    // ... other params
  })
});

๐Ÿ’ก Usage Examples

Generate React SMS Component

// Generate React component with TypeScript
const result = await mcp.generate_direct_api_code("javascript", "react", true);
console.log(result.code); // Complete React component

Create Company-Specific Template

const projectConfig = {
  default_callback: "02-1234-5678",
  company_name: "MyTech Corp"
};

const template = await mcp.create_message_service_template(
  projectConfig, 
  "python", 
  ["sms", "mms", "status_check"]
);

// Returns customized Python service class with company defaults

Get Vercel Deployment Guide

const guide = await mcp.get_integration_guide("vercel", "production");
console.log(guide.guide_content); // Complete deployment instructions

Fetch Template URLs for Token Efficiency

const urls = await mcp.get_code_template_url("python", "django", "heroku");
console.log(urls.template_url);     // CDN template URL
console.log(urls.integration_url);  // Platform-specific guide URL

๐Ÿ— Development

Running Locally

# Start the MCP server
node index.js

# Test with environment variables
BAAS_API_KEY="test" node index.js

Project Structure

BaaS-MCP/
โ”œโ”€โ”€ index.js                 # Node.js wrapper & dependency management
โ”œโ”€โ”€ baas_sms_mcp/
โ”‚   โ”œโ”€โ”€ __init__.py         # Python package initialization
โ”‚   โ””โ”€โ”€ server.py           # Main MCP server implementation
โ”œโ”€โ”€ templates/              # Local template fallbacks
โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ”œโ”€โ”€ package.json           # Node.js package configuration
โ”œโ”€โ”€ pyproject.toml         # Python package configuration
โ””โ”€โ”€ mcp.config.json        # Example MCP configuration

Release Process

# Patch version (bug fixes)
npm run release:patch

# Minor version (new features)
npm run release:minor

# Major version (breaking changes)
npm run release:major

๐Ÿ”’ Security Best Practices

API Key Management

  • Never hardcode API keys in source code
  • Use environment variables or secret management services
  • Rotate API keys regularly
  • Monitor API key usage

Deployment Security

  • Enable HTTPS for all communications
  • Validate input data thoroughly
  • Implement proper error handling and logging
  • Use least-privilege access principles

Code Generation Security

  • Templates are fetched from trusted CDN sources
  • Automatic input sanitization
  • No execution of generated code by the MCP server
  • Clear separation between template and runtime environments

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-feature
  3. Make your changes and test thoroughly
  4. Commit with clear messages: git commit -m "Add new feature"
  5. Push to your fork: git push origin feature/new-feature
  6. Create a Pull Request

๐Ÿ“Š Performance & Monitoring

Token Efficiency

  • CDN-based templates reduce token usage by 60-80%
  • Intelligent caching minimizes redundant API calls
  • Optimized response formats for MCP protocol

Monitoring

  • Built-in error logging and reporting
  • CDN performance monitoring
  • API key usage tracking
  • Template fetch success rates

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ†˜ Support & Community

๐Ÿ—บ Roadmap

Upcoming Features

  • Additional language support (Java, Go, C#)
  • Advanced template customization options
  • Real-time template updates
  • Template version management
  • Enhanced error reporting and debugging
  • Integration with popular IDE extensions

Version History

  • v1.0.18: Current stable release with API updates
  • v1.0.0: Initial stable release
  • v0.1.4: Beta release with core functionality

Note: This MCP server is optimized for external developer workflows and integrates seamlessly with AI-powered development environments. For the latest updates and comprehensive API documentation, visit our GitHub repository.

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

baas_sms_mcp-1.0.23.tar.gz (96.2 kB view details)

Uploaded Source

Built Distribution

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

baas_sms_mcp-1.0.23-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file baas_sms_mcp-1.0.23.tar.gz.

File metadata

  • Download URL: baas_sms_mcp-1.0.23.tar.gz
  • Upload date:
  • Size: 96.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for baas_sms_mcp-1.0.23.tar.gz
Algorithm Hash digest
SHA256 e6119e75d4a861ef6f464f858da6fa8eadc13c067528a3d5f7c056fc2f0d3595
MD5 c3435933be8ed7e0f678d5cdacaa2976
BLAKE2b-256 a17f78d36352b912b80ff72c1ce7898b1361fa55847994a4b947aca7aee2fd23

See more details on using hashes here.

File details

Details for the file baas_sms_mcp-1.0.23-py3-none-any.whl.

File metadata

  • Download URL: baas_sms_mcp-1.0.23-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for baas_sms_mcp-1.0.23-py3-none-any.whl
Algorithm Hash digest
SHA256 7641cd17833efeec9980f7f50980a36bd28ded1e6a1f10d86c55a564fa72944b
MD5 fad1eac2b96b9231347fb2f0166be955
BLAKE2b-256 4c0c3ae1ead68ed994ab39f76cca0da15b7e96a8240bd199914a8d3ae025c728

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