alire-mcp
MCP server for the Alire Ada package manager, enabling crate search, project dependency inspection, building, and dependency management through natural language.
README
Alire MCP
A Python Model Context Protocol server for Alire, the Ada package manager.
The server exposes a curated set of Alire operations to MCP clients. It does
not expose an unrestricted shell or arbitrary alr argument execution.
Features
- Search for and inspect crates in the Alire index
- Inspect project dependency solutions and trees
- Build Alire projects
- Add, remove, and update dependencies
- Initialize new executable or library crates
- Fetch published crate sources
- Non-interactive subprocess execution with no shell
- Optional workspace-root confinement
- Configurable time and output limits
- Read-only and destructive MCP tool annotations
Requirements
- Python 3.10 or later
- Alire (
alr) installed and available onPATH
Verify Alire before starting the server:
alr --version
Installation
Install from a source checkout:
python3 -m pip install .
For an isolated development environment:
python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'
Run the stdio server:
alire-mcp
The server communicates using MCP messages on standard input and standard output. Diagnostic output from Alire is captured and returned by each tool, not written into the MCP transport stream.
MCP client configuration
A typical MCP client configuration is:
{
"mcpServers": {
"alire": {
"command": "alire-mcp",
"args": [],
"env": {
"ALIRE_MCP_WORKSPACE_ROOT": "/absolute/path/to/ada/workspaces"
},
"disabled": false,
"autoApprove": []
}
}
}
If the executable is installed in a virtual environment, use its absolute
path for command:
{
"mcpServers": {
"alire": {
"command": "/absolute/path/to/alire-mcp/.venv/bin/alire-mcp",
"args": [],
"env": {
"ALIRE_MCP_WORKSPACE_ROOT": "/absolute/path/to/ada/workspaces"
},
"disabled": false,
"autoApprove": []
}
}
}
Restart or reload the MCP client after changing its configuration.
Tools
| Tool | Effect |
|---|---|
alire_version |
Show detailed Alire version and environment information |
search_crates |
Search crate names and descriptions |
show_crate |
Show metadata for a crate or exact release |
project_dependencies |
Inspect direct, solved, tree, graph, or version dependency views |
build_project |
Build a project |
update_dependencies |
Update all or selected dependencies |
add_dependency |
Add a dependency constraint to a manifest |
remove_dependency |
Remove a dependency from a manifest |
initialize_crate |
Create an executable or library crate |
fetch_crate |
Fetch a crate release |
Every tool result contains:
command: the exact argument vector usedcwd: the effective working directoryexit_code: Alire's process exit statussuccess: whether the exit status was zerostdoutandstderr: captured outputstdout_truncatedandstderr_truncated: output-limit indicators
A nonzero Alire exit code is returned as command data so an MCP client can inspect Alire's diagnostic text. Server-level failures, such as an invalid workspace path or timeout, are reported as tool errors.
Configuration
The server is configured through environment variables:
| Variable | Default | Description |
|---|---|---|
ALIRE_MCP_ALR |
alr |
Alire executable name or path |
ALIRE_MCP_WORKSPACE_ROOT |
unset | Restrict project directories to this directory tree |
ALIRE_MCP_TIMEOUT |
300 |
Per-command timeout in seconds |
ALIRE_MCP_MAX_OUTPUT_BYTES |
1000000 |
Maximum captured bytes for each output stream |
When ALIRE_MCP_WORKSPACE_ROOT is configured:
- omitted tool directories use the workspace root;
- relative directories resolve below the workspace root;
- absolute directories outside the root are rejected;
- symlink resolution cannot escape the root.
Without a workspace root, omitted directories inherit the MCP server process working directory and explicitly supplied paths may point to any accessible directory.
Security
Alire MCP applies the following boundaries:
- Commands are launched with
asyncio.create_subprocess_exec; no shell is involved. - Global
--non-interactive,--no-color, and--no-ttyoptions are always used. - Standard input is disabled for child processes.
- Tool parameters are validated and map to a fixed set of Alire commands.
- Commands have a timeout and bounded captured output.
- MCP annotations identify read-only and potentially destructive operations.
Alire itself may download, compile, and execute code from package sources.
Treat third-party crates as untrusted and review requested mutating operations.
For stronger isolation, run this server in a container or restricted user
account and configure ALIRE_MCP_WORKSPACE_ROOT.
Development
Install development dependencies:
python3 -m pip install -e '.[dev]'
Run tests:
pytest
Run linting and formatting checks:
ruff check .
ruff format --check .
Run type checking:
mypy
Build distribution artifacts:
python3 -m build
License
Alire MCP is distributed under the MIT License.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。