Skip to main content
Glama
tekchapagain1

mcp-meroshare

README.md
# mcp-meroshare

MCP (Model Context Protocol) server for [MeroShare](https://meroshare.cdsc.com.np) — Nepal's online share application system by CDSC Nepal.

Use it through opencode or any MCP-compatible client to manage IPO/FPO applications, portfolio, and share transactions directly from your AI tools.

## Features

- **IPO/FPO Application** — view open issues, apply with dry-run support
- **Portfolio** — check your holdings and transaction history
- **Account** — view DP list, own details, linked bank accounts

## Tools

| Tool | Description |
|---|---|
| `meroshare_get_dp_list` | List all DPs with their numeric client IDs |
| `meroshare_login` | Log in (password read from `.env`) |
| `meroshare_logout` | Clear session |
| `meroshare_get_current_issues` | Open IPO/FPO/Rights issues |
| `meroshare_apply_ipo` | Apply for an issue (with dry-run) |
| `meroshare_get_bank_details` | Linked bank account info |
| `meroshare_get_own_detail` | Your profile (BOID, demat, email) |
| `meroshare_get_transactions` | Share transaction history |

## Installation

```bash
pip install mcp-meroshare
```

## Setup

1. Create a `.env` file in the directory where you'll run opencode:

```env
MERO_SHARE_CLIENT_ID=162
MERO_SHARE_USERNAME="your_boid"
MERO_SHARE_PASSWORD="your_password"
MERO_SHARE_CRN_NUMBER="your_casba_crn"
MERO_SHARE_TRANSACTION_PIN="your_tpin"
```

> Find your `client_id` by calling `meroshare_get_dp_list`.

2. Lock the file: `chmod 600 .env`

3. Add to your `opencode.json`:

```json
{
  "mcp": {
    "meroshare": {
      "type": "local",
      "command": ["python3", "-m", "mcp_meroshare"],
      "enabled": true
    }
  }
}
```

4. Run opencode in that directory and call `meroshare_login` with your `client_id` and `username`.

## Security

- Credentials are read **only from `.env`** — never passed as tool arguments
- Session auto-expires after 15 minutes of inactivity
- `.env` file permission warning if world-readable

## License

MIT

TDQS

A3.7/5.0

Scored across 10 tools

Disambiguation5/5

Each tool has a clearly distinct purpose, from login/logout to applying for IPOs and checking results, with no overlapping functionality.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern prefixed with 'meroshare', making them predictable and easy to distinguish.

Tool Count5/5

With 10 tools, the server covers authentication, account details, IPO lifecycle, transactions, and bank info—well-scoped for a stock market application.

Completeness4/5

Covers core IPO operations and account management well, but lacks a direct tool for viewing current portfolio holdings, though transaction history partially covers it.

Maintenance

ActivityMaintained
ResponsivenessSyncing