This MCP server provides stock market data from Alpha Vantage API, allowing Claude and other MCP clients to access real-time and historical stock data. It offers features for retrieving intraday and daily stock data, generating price movement alerts, and accessing stock information as resources.
npm install
.env
file in the root directory with your API key:
ALPHA_VANTAGE_API_KEY=your_api_key_here
Build the TypeScript code:
npm run build
Start the server:
npm start
For development with auto-reloading:
npm run dev
claude_desktop_config.json
:{
"mcpServers": {
"alpha-vantage": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": {
"ALPHA_VANTAGE_API_KEY": "YOUR_API_KEY"
}
}
}
}
/absolute/path/to/dist/index.js
with the absolute path to the built index.js fileRetrieves intraday stock data for a specific symbol.
Parameters:
symbol
(required): Stock symbol (e.g., IBM, AAPL)interval
(optional): Time interval between data points (1min, 5min, 15min, 30min, 60min). Default: 5minoutputsize
(optional): Amount of data to return (compact: latest 100 data points, full: up to 20 years of data). Default: compactRetrieves daily stock data for a specific symbol.
Parameters:
symbol
(required): Stock symbol (e.g., IBM, AAPL)outputsize
(optional): Amount of data to return (compact: latest 100 data points, full: up to 20 years of data). Default: compactAnalyzes stock data to generate alerts based on price movements.
Parameters:
symbol
(required): Stock symbol (e.g., IBM, AAPL)threshold
(optional): Percentage threshold for price movement alerts. Default: 5Access stock data directly as a resource.
URI Template: stock://{symbol}/{interval}
Parameters:
symbol
: Stock symbol (e.g., IBM, AAPL)interval
: Time interval (daily, 1min, 5min, 15min, 30min, 60min). Default: dailyExample usage in Claude:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.