OT

o-t-p-y/mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 0 forks 质量 76 趋势 14MIT

Official Model Context Protocol (MCP) server for OTPy.ir — interact with your OTPy account, inspect usage, send test codes, and manage keys directly from AI assistants.

概览

Official Model Context Protocol (MCP) server for OTPy.ir — interact with your OTPy account, inspect usage, send test codes, and manage keys directly from AI assistants. This server can use up to two different OTPy credentials, each for a different purpose: The API-key-only tools are get_usage and get_integration_snippet. Project reads (list_projects, list_otp_messages) use the enabled user key, while list_transactions also requires its billing scope. Any tool that requires a user key is denied outright if none is configured. Add to your .cursor/mcp.json or Cursor Settings → MCP: You can also copy the pre-configured MCP snippet (Cursor, Claude Desktop, Windsurf, and Kilo) from your project's page (/project-settings) on dash.otpy.ir. Create the user key itself on the page (/integrate). The server speaks standard MCP over stdio and works with — Cursor, Claude Desktop, Windsurf, and Kilo are configuration examples, not requirements.

README

以下为原文 README 节选,完整内容请查看原文。

@o-t-p-y/mcp

Official Model Context Protocol (MCP) server for OTPy.ir — interact with your OTPy account, inspect usage, send test codes, and manage keys directly from AI assistants.

Two credentials

This server can use up to two different OTPy credentials, each for a different purpose:

Credential Env var / flag What it’s for
API key (project-scoped) OTPY_API_KEY / --api-key Authenticates the OTP API and usage calls: get_usage, send_test_otp, verify_test_otp. This is the same otpy_... key you use to send real OTPs from your product.
User key (user-scoped) OTPY_USER_KEY / --user-key Authenticates project reads and provides live scope gating for billing/write tools. This is a separate otpy_uk_... secret, obtained from the Integration page (/integrate) on dash.otpy.ir.

The API-key-only tools are get_usage and get_integration_snippet. Project reads (list_projects, list_otp_messages) use the enabled user key, while list_transactions also requires its billing scope. Any tool that requires a user key is denied outright if none is configured.

Installation / Setup

Cursor

Add to your .cursor/mcp.json or Cursor Settings → MCP:

{
  "mcpServers": {
    "otpy": {
      "command": "npx",
      "args": ["-y", "@o-t-p-y/mcp"],
      "env": {
        "OTPY_API_KEY": "otpy_your_api_key_here",
        "OTPY_USER_KEY": "otpy_uk_your_user_key_here"
      }
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "otpy": {
      "command": "npx",
      "args": ["-y", "@o-t-p-y/mcp"],
      "env": {
        "OTPY_API_KEY": "otpy_your_api_key_here",
        "OTPY_USER_KEY": "otpy_uk_your_user_key_here"
      }
    }
  }
}

You can also copy the pre-configured MCP snippet (Cursor, Claude Desktop, Windsurf, and Kilo) from your project’s Project Settings page (/project-settings) on dash.otpy.ir. Create the user key itself on the Integration page (/integrate).

The server speaks standard MCP over stdio and works with any MCP-compatible agent — Cursor, Claude Desktop, Windsurf, and Kilo are configuration examples, not requirements. Likewise, the get_integration_snippet tool covers any code stack (Node.js, Python, Go, PHP, cURL, C#) with framework-neutral code.

Command-line flags

Flag Env var Purpose
--api-key OTPY_API_KEY Project API key (otpy_...)
--user-key OTPY_USER_KEY User key (otpy_uk_...)
--base-url OTPY_BASE_URL API base URL (default https://api.otpy.ir)
-h, --help — Print usage and exit
-v, --version — Print the version and exit
在 GitHub 查看完整 README

安装

npx -y @o-t-p-y/mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "otpy": { "command": "npx", "args": ["-y", "@o-t-p-y/mcp"], "env": { "OTPY_API_KEY": "otpy_your_api_key_here", "OTPY_USER_KEY": "otpy_uk_your_user_key_here" } } } }