Metals
БесплатноНе проверенMCP wrapper for Metals (Scala language server) that adds file editing and refactoring tools such as rename-symbol, add-import, and remove-unused-imports.
Описание
MCP wrapper for Metals (Scala language server) that adds file editing and refactoring tools such as rename-symbol, add-import, and remove-unused-imports.
README
MCP wrapper for Metals (Scala language server) that adds file editing and refactoring tools.
Prerequisites
- Node.js 22+
metals-mcpbinary on PATH (or setMETALS_MCP_PATH)
Install
npm install
Usage
Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"metals": {
"command": "npx",
"args": ["tsx", "src/index.ts", "--workspace", "/path/to/scala/project"]
}
}
}
Or globally in ~/.claude.json:
{
"mcpServers": {
"metals": {
"command": "npx",
"args": ["--prefix", "/path/to/metals-mcp", "tsx", "src/index.ts", "--workspace", "/path/to/scala/project"]
}
}
}
Manual
npx tsx src/index.ts --workspace /path/to/scala/project
Tools
File operations: read-file, write-file, edit-file, list-files
Refactoring: rename-symbol, add-import, remove-unused-imports
All Metals tools are also proxied transparently when Metals connects.
Configuration
| Option | Description |
|---|---|
--workspace <path> |
Scala project root (required) |
METALS_MCP_PATH |
Custom path to metals-mcp binary |
ERR_MODULE_NOT_FOUND or "Failed to reconnect to metals"
If the MCP server is configured in .mcp.json with a relative path for the entry point:
{
"mcpServers": {
"metals": {
"command": "npx",
"args": ["--prefix", "/path/to/metals-lsp", "tsx", "src/index.ts"]
}
}
}
The npx --prefix flag sets the package lookup directory, but the working directory remains the project being edited. The relative src/index.ts resolves against the workspace, not the plugin directory, causing the module-not-found error.
Fix: Use an absolute path for the entry point:
{
"mcpServers": {
"metals": {
"command": "npx",
"args": ["--prefix", "/path/to/metals-lsp", "tsx", "/path/to/metals-lsp/src/index.ts"]
}
}
}
Установка Metals
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/eloquentix/metals-mcpFAQ
Metals MCP бесплатный?
Да, Metals MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Metals?
Нет, Metals работает без API-ключей и переменных окружения.
Metals — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Metals в Claude Desktop, Claude Code или Cursor?
Открой Metals на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Metals with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
