RAM Prices MCP Server
Caches and serves DDR/DRAM weekly price series from memorys.com and historical memory technology data, with tools for refresh, validation, analytics, forecasting, and chart rendering.
README
RAM Prices MCP Server
Lightweight Model Context Protocol (MCP) server that caches and serves weekly DDR/DRAM price series from memorys.com, plus historical memory technology data from hblok.net. It scrapes per-quarter pages, stores history in SQLite, and exposes tools for refresh, validation, analytics, forecasting, and chart rendering.
Features
- Discovers available quarters and caches price history in SQLite (no re-download of old data unless forced).
- Tools for refresh, integrity checks, validation, resampling, returns, rolling stats, regime detection, forecasting (naive/ETS/ARIMA/trend), and PNG chart rendering.
- Forecasts fall back to naive when
statsmodelsis unavailable. - Memory.csv tooling for filtering by memory type and exploring historical costs.
- Exposes results in CSV/JSONL for downstream analysis.
Requirements
- Python 3.10+ recommended.
- Dependencies: see
requirements.txt(mcp,requests,matplotlib;statsmodelsoptional but recommended).
Installation
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Configuration
RAM_MCP_DB_PATH: path to SQLite cache (default~/.cache/ram-mcp/prices.sqlite).RAM_MCP_DEFAULT_PRODUCT_ID: default memorys.com product ID (default100227).- TTLs:
RAM_MCP_BASEPAGE_TTL_HOURS,RAM_MCP_CURQ_TTL_HOURS,RAM_MCP_OLDQ_TTL_DAYS. MCP_TRANSPORT:stdio(default) orstreamable-httpfor HTTP transport.
Running the server
python ram_prices_mcp_server.py # MCP_TRANSPORT=stdio
# or
MCP_TRANSPORT=streamable-http python ram_prices_mcp_server.py # exposes an HTTP MCP endpoint
Server logs go to stderr; do not rely on stdout in MCP clients.
Module layout
ram_prices_mcp_server.py: MCP tool definitions and entrypoint only.ram_mcp/config.py: configuration/constants and defaults.ram_mcp/storage.py: SQLite cache and persistence.ram_mcp/http_client.py: HTTP session/retry logic.ram_mcp/memorys.py: memorys.com refresh/parsing.ram_mcp/memory_csv.py: memory.csv ingestion and cache.ram_mcp/series.py: time-series transforms/analytics.ram_mcp/forecast.py: ETS/ARIMA/trend forecasting.ram_mcp/charts.py: PNG chart rendering.ram_mcp/validation.py: input validation helpers.
Key MCP tools
ram_refresh/ram_refresh_range: refresh cache (optionally force re-download).ram_cache_status,ram_integrity_check,ram_verify_sorting,ram_validate: health checks for coverage, ordering, and data quality.ram_get_history,ram_get_series,ram_returns,ram_growth,ram_rolling_stats,ram_regime_detect: analysis helpers.ram_forecast,ram_forecast_compare: cached forecasts (naive/ETS/ARIMA/trend).ram_export: export cached points as CSV/JSONL.ram_memory_types,ram_memory_history: explore memory.csv by type/year.ram_render_price_chart,ram_render_memory_chart: PNG chart rendering (supports optional forecast overlay).
Example workflows
# Refresh default product (respect TTLs)
python ram_prices_mcp_server.py # start the server, then from client call:
ram_refresh
# Export cached data
ram_export export_format=csv > ddr_prices.csv
Client configuration examples (mcp.json)
LM Studio:
{
"servers": {
"ram-prices": {
"transport": {
"type": "stdio",
"command": "python",
"args": ["ram_prices_mcp_server.py"]
}
}
}
}
Claude Desktop (macOS/Windows) — same stdio transport:
{
"servers": {
"ram-prices": {
"transport": {
"type": "stdio",
"command": "python",
"args": ["ram_prices_mcp_server.py"],
"env": { "RAM_MCP_DB_PATH": "C:/Users/you/.cache/ram-mcp/prices.sqlite" }
}
}
}
}
HTTP client / proxy (MCP over HTTP):
{
"servers": {
"ram-prices-http": {
"transport": {
"type": "http",
"url": "http://127.0.0.1:8000"
},
"command": "python",
"args": ["ram_prices_mcp_server.py"],
"env": { "MCP_TRANSPORT": "streamable-http" }
}
}
}
Generic mcpServers layout (alternate clients):
{
"mcpServers": {
"ram-prices": {
"command": "python",
"args": ["/path/to/project/ram_prices_mcp_server.py"],
"env": {
"RAM_MCP_DEFAULT_PRODUCT_ID": "100227",
"RAM_MCP_DB_PATH": "/path/to/project/prices.sqlite",
"RAM_MCP_BASEPAGE_TTL_HOURS": "12",
"RAM_MCP_CURQ_TTL_HOURS": "6"
}
}
}
}
Testing & linting
- Run unit tests:
pytest. - Use
ram_validate,ram_verify_sorting, andram_integrity_checkafter refreshes to sanity-check data. - Suggested linting:
rufforflake8; aim for zero warnings.
Data sources
- memorys.com price series: https://en.memorys.com/price/ews/
- Memory technology history CSV: https://hblok.net/storage_data/memory.csv
Contributing
- See
AGENTS.mdfor contributor guidelines (structure, style, PR expectations). - Keep the user agent stable and honor TTLs to avoid hammering memorys.com.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。