
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
chart-img-mcp
Advanced tools
This project is an MCP (Model Context Protocol) server designed for generating chart images using the chart-img.com API.
chart-img.com API for image generation.Clone the repository:
git clone https://github.com/your-username/chart-img-mcp.git
cd chart-img-mcp
Install dependencies:
npm install
Environment Variables:
Create a .env file in the root of the project and add your chart-img.com API key:
CHART_IMG_API_KEY=YOUR_ACTUAL_CHART_IMG_API_KEY
Replace YOUR_ACTUAL_CHART_IMG_API_KEY with your API key obtained from chart-img.com.
To start the MCP server in development mode:
npm run dev
To inspect the MCP server using the MCP Inspector UI:
npm run inspect
To compile the TypeScript code to JavaScript:
npm run build
This command will clean the dist directory and then compile the TypeScript files.
generateChartImages ToolThe generateChartImages tool allows you to generate stock chart images with specified intervals and technical indicators.
Tool Name: generateChartImages
Parameters:
symbol (string, required): The stock symbol (e.g., 'BINANCE:ETHUSDT').chartConfigs (array of objects, optional): Configuration for different chart intervals and studies. If not provided, it defaults to 1D, 4h, 1h intervals with 'Volume' and 'MACD' studies.
Each object in chartConfigs should have:
interval (string, required): Chart interval (e.g., '1D', '4h', '1h').studies (array of objects, optional): Array of technical indicators. Each object should have a name property (e.g., [{ name: 'Volume' }, { name: 'MACD' }]).Example Usage (from a MCP client):
To generate daily, 4-hour, and 1-hour charts for BINANCE:ETHUSDT with default studies:
{
"tool": "generateChartImages",
"arguments": {
"symbol": "BINANCE:ETHUSDT"
}
}
To generate a daily chart with 'RSI' and 'SMA' studies, and a 4-hour chart with 'Volume' study:
{
"tool": "generateChartImages",
"arguments": {
"symbol": "BINANCE:ETHUSDT",
"chartConfigs": [
{
"interval": "1D",
"studies": [
{ "name": "RSI" },
{ "name": "SMA" }
]
},
{
"interval": "4h",
"studies": [
{ "name": "Volume" }
]
}
]
}
}
Return Value:
The tool returns a JSON object where keys are the chart intervals and values are the URLs of the generated images.
{
"1D": "https://example.com/daily_chart.png",
"4h": "https://example.com/4h_chart.png",
"1h": "https://example.com/1h_chart.png"
}
To configure the MCP tool, you can specify the default chart configurations in the config.json file located in the root directory. This file allows you to set default intervals and studies for the generateChartImages tool.
{
"mcpServers": {
"chart-img-mcp": {
"command": "npx",
"args": [
"@gabriel3615/chart-img-mcp@latest"
],
"env": {
"CHART_IMG_API_KEY": "KEY_HERE"
}
}
}
}
To publish this package to npmjs, ensure your package.json name and version are unique and updated. Then run:
npm publish --access public
The prepublishOnly script will automatically run npm run build before publishing.
FAQs
MCP for generating chart images
We found that chart-img-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.