Skip to main content
Glama
theepankaja

PayHere Documentation MCP Server

by theepankaja
README.md
# PayHere LLM Documentation Server

> **DISCLAIMER:** This is NOT official PayHere documentation from PayHere (Pvt) Ltd. This is a community-driven resource compiled from publicly available data. Created by [Theepan Kaja](https://theepankaja.website). For official documentation, visit [support.payhere.lk](https://support.payhere.lk).

AI-ready documentation for the [PayHere](https://www.payhere.lk) payment gateway, served as `llm.txt` for AI coding agents and as an MCP server for direct tool access.

## Quick Start

### Use the hosted llm.txt

```bash
# Claude Code
Fetch https://payheredoc.theepankaja.website/llm.txt

# Terminal
curl https://payheredoc.theepankaja.website/llm.txt -o llm.txt
```

### Use the MCP server

```bash
# Claude Code
claude mcp add payhere-docs -- npx -y payhere-mcp-server

# Or add to any MCP-compatible client
npx payhere-mcp-server
```

## Project Structure

```
├── llm.txt              # Full PayHere documentation (plain text)
├── server.js            # Express server for hosting llm.txt
├── mcp/                 # MCP server package
│   ├── index.js         # MCP server entry point
│   ├── lib/
│   │   ├── parser.js    # llm.txt parser
│   │   ├── tools.js     # Tool implementations
│   │   └── disclaimer.js # Disclaimer text
│   └── package.json
├── LICENSE              # MIT License
├── CONTRIBUTING.md      # Contribution guidelines
└── SECURITY.md          # Security policy
```

## MCP Server Tools

| Tool | Description |
|------|-------------|
| `list_topics` | List all documentation sections |
| `get_section` | Get a section by topic name (fuzzy matching) |
| `get_api_reference` | Get API docs with alias support |
| `search_docs` | Full-text search across all documentation |
| `get_sdk_guide` | Get focused SDK-specific guide (android, ios, react-native, flutter, javascript) |

## Documentation Coverage

- Checkout, Recurring, Preapproval, Charging, Retrieval, Subscription Manager, Refund, Authorize, Capture APIs
- JavaScript SDK (payhere.js)
- Mobile SDKs: Android, iOS, React Native, Flutter
- Shopping Cart Plugins (WooCommerce, Shopify, OpenCart, etc.)
- PayHere Links & Buttons
- Payment Notifications, Hash Generation, OAuth
- Sandbox & Testing, Fees & Limits

## Self-Hosting

```bash
git clone https://github.com/theepankaja/payhere-agent-docs.git
cd payhere-agent-docs
npm install
node server.js
```

Visit `http://localhost:3000` for the landing page, `/llm.txt` for the documentation.

## License

MIT — see [LICENSE](LICENSE)

## Links

- Hosted docs: [payheredoc.theepankaja.website](https://payheredoc.theepankaja.website)
- Official PayHere docs: [support.payhere.lk](https://support.payhere.lk)
- Author: [Theepan Kaja](https://theepankaja.website)