home / mcp / stock valuation mcp server
Provides professional stock valuation tools, real-time SET Watch data, and investment recommendations.
Configuration
View docs{
"mcpServers": {
"b9b4ymin-mymcpserver": {
"command": "node",
"args": [
"C:/Programing/ByAI/myMCPserver/dist/index.js"
],
"env": {
"NODE_ENV": "production",
"LOG_LEVEL": "info",
"API_AUTH_VALUE": "your-api-key",
"API_AUTH_HEADER": "X-API-Key",
"SET_WATCH_API_HOST": "https://xxxx-api.vercel.app",
"SET_WATCH_API_TIMEOUT": "30000"
}
}
}
}The Stock Valuation MCP Server is a TypeScript-powered MCP server that provides professional stock valuation and financial analysis tools, integrating real-time data and multiple valuation models to help you make informed investment decisions.
You use this MCP server by running it locally or in the cloud and connecting your MCP client or Claude Desktop to access valuation tools. The server exposes a suite of models and data fetchers that you can invoke to compute intrinsic value, analyze historical trends, and generate investment recommendations. Start by ensuring the server is running in your environment, then request tasks such as valuation analyses, data retrieval, or historical ratio exploration. You can combine valuation models with live data from SET Watch to derive actionable insights and generate buy/sell/hold suggestions.
Prerequisites you need before installation include Node.js 18+ and Docker if you plan containerized deployment. You may also use Claude Desktop for MCP integration.
# Clone the project
git clone <repository-url>
cd myMCPserver
# Install dependencies
npm install
# Copy environment configuration
cp .env.example .env
# Build the project
npm run buildConfiguration and security are centered around environment-based settings. Provide API keys and secrets via environment variables, and configure API endpoints for the SET Watch data source. The server is prepared for Oracle Cloud Free Tier deployment and supports Docker-based containerization.
For integration with Claude Desktop, you typically add the MCP server to your Claude Desktop configuration so that the tools are available directly from the MCP protocol. Restart Claude Desktop after making changes to ensure the tools are registered.
Configure environment variables in a .env file based on the provided template. Typical variables include the SET Watch API host and timeout, server mode, and optional custom authentication headers.
# API Configuration
SET_WATCH_API_HOST=https://xxxxxxxxxxxx.app # Your API host
SET_WATCH_API_TIMEOUT=30000
# Server Configuration
NODE_ENV=production
LOG_LEVEL=info
# Optional: Custom API Authentication
# API_AUTH_HEADER=X-API-Key
# API_AUTH_VALUE=your-api-keyUse the MCP Inspector or client tools to test the server locally. You can perform a full valuation in a single flow by invoking the complete valuation tool after the server is running and the client is connected.
An example workflow might start with fetching stock data, then running valuation models like PE Band, DDM, and DCF, followed by generating an overall investment recommendation.
For containerized deployment, you can build a Docker image and run it on any environment that supports Docker. You expose port 2901 to access MCP services and pass environment variables to configure the data source and runtime.
If you deploy to Oracle Cloud, you can use the provided deployment script or a manual deployment process to launch an instance, install Docker, and run the MCP server image with the appropriate environment settings.
You can integrate with n8n to automate workflows that trigger stock valuation analyses. Use HTTP requests to the MCP server to call specific tools like fetch_stock_data and complete_valuation, and to retrieve results for reporting or alerts.
Calculate PE band valuation with historical data, producing fair value ranges and recommendations.
Dividend Discount Model analysis for dividend-paying stocks.
Discounted Cash Flow valuation using free cash flow projections.
Fetch real-time stock data from SET Watch.
Run all valuation models with fetched data.
Fetch income statement data for analysis.
Fetch balance sheet data for analysis.
Fetch cash flow statement data.
Fetch all statements with ratio analysis.
Fetch historical PE, PBV, ROE, ROA, ROIC data.
Analyze trends in historical ratios and generate investment recommendations.