Metadata-Version: 2.4
Name: mcp-meroshare
Version: 0.2.0
Summary: MCP server for MeroShare (CDSC Nepal) — IPO/FPO applications, portfolio, and share management
Author-email: Tek Prasad Chapagain <tekchapagain1@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/tekchapagain1/mcp-meroshare
Project-URL: Repository, https://github.com/tekchapagain1/mcp-meroshare
Project-URL: Issues, https://github.com/tekchapagain1/mcp-meroshare/issues
Keywords: mcp,meroshare,nepal,cdsc,ipo,stock,nepse
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: mcp>=1.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.0
Requires-Dist: python-dotenv>=1.0

# 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
```

## Quick Start

Run `meroshare_setup` with your credentials — it saves them permanently. Then just `meroshare_login`:

```
meroshare_setup client_id=162 username=00143984 password=... crn_number=... transaction_pin=...
meroshare_login
```

Your credentials are saved to `~/.meroshare/config.default.json` (locked to `chmod 600`).

## Multiple Accounts (Profiles)

Use the `profile` argument to manage multiple accounts:

```
meroshare_setup profile=family client_id=... username=... password=... crn_number=... transaction_pin=...
meroshare_setup profile=office client_id=... username=... password=... crn_number=... transaction_pin=...
meroshare_login profile=family
meroshare_login profile=office
```

Each profile stores credentials in `~/.meroshare/config.{profile}.json`. The default profile name is `default`.

## Security

- Credentials stored in `~/.meroshare/config.{profile}.json` — never passed as tool arguments after setup
- All credential files are locked to `chmod 600`
- Session auto-expires after 15 minutes of inactivity

## License

MIT
