NEPSE API
Unlock Nepal Stock Exchange (NEPSE) data with this powerful unofficial API. Features REST, WebSocket, and a first-of-its-kind Model Context Protocol (MCP) server, enabling AI models like Claude to perform live market analysis with over 20 specialized
What is NEPSE API?
NEPSE API is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to unlock nepal stock exchange (nepse) data with this powerful unofficial api. features rest, websocket, and a first-of-its-kind model context protocol (mcp) server, enabling ai models like claude to per...
Unlock Nepal Stock Exchange (NEPSE) data with this powerful unofficial API. Features REST, WebSocket, and a first-of-its-kind Model Context Protocol (MCP) server, enabling AI models like Claude to perform live market analysis with over 20 specialized
This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Unlock Nepal Stock Exchange (NEPSE) data with this powerful
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx nepseapi-unofficialConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use NEPSE API
The NEPSE API Unofficial MCP server brings live Nepal Stock Exchange market data to AI assistants through more than 20 specialized tools, covering market summaries, top gainers and losers, sector data, company details, and index tracking. It requires no API keys because it sources data from unofficial public endpoints, and it ships with REST and WebSocket transports alongside the MCP interface, making it a comprehensive toolkit for investors and analysts who want AI-assisted NEPSE market analysis.
Prerequisites
- Python 3.10 or higher and pip installed
- Git to clone the repository
- FastMCP and required Python dependencies (installed via pip)
- An MCP-compatible client such as Claude Desktop
- Optional: Docker and Docker Compose for containerized deployment
Clone the repository
Download the full project source, which includes the MCP server, REST API, and WebSocket server as separate services managed by start_servers.py.
git clone https://github.com/surajrimal07/NepseAPI-Unofficial.git
cd NepseAPI-UnofficialCreate and activate a virtual environment
Isolate the Python dependencies from your system Python to avoid conflicts with other projects.
python -m venv venv
source venv/bin/activate # Linux/macOS
# venv\Scripts\activate # WindowsInstall Python dependencies
Install all required packages including FastMCP, requests, and pydantic as listed in requirements.txt.
pip install -r requirements.txtStart all services
Launch the REST API, WebSocket server, and MCP server together using the provided start script.
python start_servers.pyAdd the MCP server to your client configuration
Register the MCP server in claude_desktop_config.json. The server runs using uv with FastMCP transport; adjust the path to mcp_server.py to match your clone location.
{
"mcpServers": {
"nepseapi-mcp-server": {
"command": "uv",
"args": [
"run",
"--with", "fastmcp",
"--with", "requests",
"--with", "pydantic",
"python",
"/absolute/path/to/NepseAPI-Unofficial/mcp_server.py"
]
}
}
}NEPSE API Examples
Client configuration
claude_desktop_config.json entry for the NEPSE MCP server running via uv with FastMCP. No API keys are required.
{
"mcpServers": {
"nepseapi-mcp-server": {
"command": "uv",
"args": [
"run",
"--with", "fastmcp",
"--with", "requests",
"--with", "pydantic",
"python",
"/absolute/path/to/NepseAPI-Unofficial/mcp_server.py"
]
}
}
}Prompts to try
Example prompts that exercise the 20+ NEPSE market analysis tools available through the MCP server.
- "Give me today's NEPSE market summary including total turnover and market cap"
- "Which stocks are the top gainers and losers today on NEPSE?"
- "Show me all details for company symbol NABIL including sector and price history"
- "What is the current NEPSE index value and sub-index breakdown?"
- "Is NICA a valid NEPSE stock symbol? Also suggest similar symbols."Troubleshooting NEPSE API
mcp_server.py fails to start with import errors
Ensure you activated the virtual environment before running the server. Run `pip install -r requirements.txt` again inside the venv and verify fastmcp and pydantic are listed in the installed packages.
Market data tools return stale or empty results
The server caches responses for 10 minutes and is subject to a 6 requests-per-minute rate limit per client. Wait for the cache window to expire or restart the server. Note that NEPSE market data is only live during trading hours (Nepal time).
Docker Compose startup fails
Ensure Docker Desktop is running and ports 8000, 8001, and 8002 are not occupied by other services. Run `docker-compose logs` to inspect which container is failing and check for missing Python package errors.
Frequently Asked Questions about NEPSE API
What is NEPSE API?
NEPSE API is a Model Context Protocol (MCP) server that unlock nepal stock exchange (nepse) data with this powerful unofficial api. features rest, websocket, and a first-of-its-kind model context protocol (mcp) server, enabling ai models like claude to perform live market analysis with over 20 specialized It connects AI assistants to external tools and data sources through a standardized interface.
How do I install NEPSE API?
Follow the installation instructions on the NEPSE API GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with NEPSE API?
NEPSE API works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is NEPSE API free to use?
Yes, NEPSE API is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
NEPSE API Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to NEPSE API? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
Browse More Finance & Fintech MCP Servers
Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up NEPSE API in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use NEPSE API?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.