The Redfish MCP Server is a natural language interface designed for agentic applications to efficiently manage infrastructure that exposes Redfish API for this purpose. It integrates seamlessly with MCP (Model Content Protocol) clients, enabling AI-driven workflows to interact with structured and unstructured data of the infrastructure. Using this MCP Server, you can ask questions like:
- "List the available infrastructure components"
- "Get the data of ethernet interfaces of the infrastructure component X"
- Natural Language Queries: Enables AI agents to query the data of infrastrcuture components using natural language.
- Seamless MCP Integration: Works with any MCP client for smooth communication.
- Full Redfish Support: It wraps the Python Redfish library
This MCP Server provides tools to manage the data of infrastructure via the Redfish API.
list_endpoints
to query the Redfish API endpoints that are configured for the MCP Server.get_resource_data
to read the data of a specific resource (e.g. System, EthernetInterface, etc.)
Follow these instructions to install the server.
# Clone the repository
git clone
cd mcp-redfish
# Install dependencies using uv
uv venv
source .venv/bin/activate
uv sync
The Redfish MCP Server uses environment variables for configuration. The server includes comprehensive validation to ensure all settings are properly configured.
Name | Description | Default Value | Required |
---|---|---|---|
REDFISH_HOSTS |
JSON array of Redfish endpoint configurations | [{"address":"127.0.0.1"}] |
Yes |
REDFISH_PORT |
Default port for Redfish API (used when not specified per-host) | 443 |
No |
REDFISH_AUTH_METHOD |
Authentication method: basic or session |
session |
No |
REDFISH_USERNAME |
Default username for authentication | "" |
No |
REDFISH_PASSWORD |
Default password for authentication | "" |
No |
REDFISH_SERVER_CA_CERT |
Path to CA certificate for server verification | None |
No |
REDFISH_DISCOVERY_ENABLED |
Enable automatic endpoint discovery | false |
No |
REDFISH_DISCOVERY_INTERVAL |
Discovery interval in seconds | 30 |
No |
MCP_TRANSPORT |
Transport method: stdio , sse , or streamable-http |
stdio |
No |
MCP_REDFISH_LOG_LEVEL |
Logging level: DEBUG , INFO , WARNING , ERROR , CRITICAL |
INFO |
No |
The REDFISH_HOSTS
environment variable accepts a JSON array of endpoint configurations. Each endpoint can have the following properties:
[
{
"address": "192.168.1.100",
"port": 443,
"username": "admin",
"password": "password123",
"auth_method": "session",
"tls_server_ca_cert": "/path/to/ca-cert.pem"
},
{
"address": "192.168.1.101",
"port": 8443,
"username": "operator",
"password": "secret456",
"auth_method": "basic"
}
]
Per-host properties:
address
(required): IP address or hostname of the Redfish endpointport
(optional): Port number (defaults to globalREDFISH_PORT
)username
(optional): Username (defaults to globalREDFISH_USERNAME
)password
(optional): Password (defaults to globalREDFISH_PASSWORD
)auth_method
(optional): Authentication method (defaults to globalREDFISH_AUTH_METHOD
)tls_server_ca_cert
(optional): Path to CA certificate (defaults to globalREDFISH_SERVER_CA_CERT
)
There are several ways to set environment variables:
-
Using a
.env
File (Recommended):
Place a.env
file in your project directory with key-value pairs for each environment variable. This is secure and convenient, keeping sensitive data out of version control.# Copy the example configuration cp .env.example .env # Edit the .env file with your settings nano .env
Example
.env
file:# Redfish endpoint configuration REDFISH_HOSTS='[{"address": "192.168.1.100", "username": "admin", "password": "secret123"}, {"address": "192.168.1.101", "port": 8443}]' REDFISH_AUTH_METHOD=session REDFISH_USERNAME=default_user REDFISH_PASSWORD=default_pass # MCP configuration MCP_TRANSPORT=stdio MCP_REDFISH_LOG_LEVEL=INFO
-
Setting Variables in the Shell:
Export environment variables directly in your shell before running the application:export REDFISH_HOSTS='[{"address": "127.0.0.1"}]' export MCP_TRANSPORT="stdio" export MCP_REDFISH_LOG_LEVEL="DEBUG"
The server performs comprehensive validation on startup:
- JSON Syntax:
REDFISH_HOSTS
must be valid JSON - Required Fields: Each host must have an
address
field - Port Ranges: Ports must be between 1 and 65535
- Authentication Methods: Must be
basic
orsession
- Transport Types: Must be
stdio
,sse
, orstreamable-http
- Log Levels: Must be
DEBUG
,INFO
,WARNING
,ERROR
, orCRITICAL
If validation fails, the server will:
- Log detailed error messages
- Show a deprecation warning about falling back to legacy parsing
- Attempt to continue with basic configuration parsing
Note: The legacy fallback is deprecated and will be removed in future versions. Please ensure your configuration follows the validated format.
This MCP server can be configured to handle requests locally, running as a process and communicating with the MCP client via stdin
and stdout
.
This is the default configuration. The sse
and streamable-http
transport is also configurable so the server is available over the network.
Configure the MCP_TRANSPORT
variable accordingly.
export MCP_TRANSPORT="sse"
Then start the server.
uv run src/main.py
Test the server:
curl -i http://127.0.0.1:8000/sse
HTTP/1.1 200 OK
Integrate with your favorite tool or client. The VS Code configuration for GitHub Copilot is:
"mcp": {
"servers": {
"redfish-mcp": {
"type": "sse",
"url": "http://127.0.0.1:8000/sse"
},
}
},
You can configure Claude Desktop to use this MCP Server.
- Retrieve your
uv
command full path (e.g.which uv
) - Edit the
claude_desktop_config.json
configuration file- on a MacOS, at
~/Library/Application\ Support/Claude/
- on a MacOS, at
{
"mcpServers": {
"redfish": {
"command": "<full_path_uv_command>",
"args": [
"--directory",
"<your_mcp_server_directory>",
"run",
"src/main.py"
],
"env": {
"REDFISH_HOSTS": "[{\"address\": \"192.168.1.100\", \"username\": \"admin\", \"password\": \"secret123\"}]",
"REDFISH_AUTH_METHOD": "session",
"MCP_TRANSPORT": "stdio",
"MCP_REDFISH_LOG_LEVEL": "INFO"
}
}
}
}
You can troubleshoot problems by tailing the log file.
tail -f ~/Library/Logs/Claude/mcp-server-redfish.log
To use the Redfish MCP Server with VS Code, you need:
- Enable the agent mode tools. Add the following to your
settings.json
:
{
"chat.agent.enabled": true
}
- Add the Redfish MCP Server configuration to your
mcp.json
orsettings.json
:
// Example .vscode/mcp.json
{
"servers": {
"redfish": {
"type": "stdio",
"command": "<full_path_uv_command>",
"args": [
"--directory",
"<your_mcp_server_directory>",
"run",
"src/main.py"
],
"env": {
"REDFISH_HOSTS": "[{\"address\": \"192.168.1.100\", \"username\": \"admin\", \"password\": \"secret123\"}]",
"REDFISH_AUTH_METHOD": "session",
"MCP_TRANSPORT": "stdio"
}
}
}
}
// Example settings.json
{
"mcp": {
"servers": {
"redfish": {
"type": "stdio",
"command": "<full_path_uv_command>",
"args": [
"--directory",
"<your_mcp_server_directory>",
"run",
"src/main.py"
],
"env": {
"REDFISH_HOSTS": "[{\"address\": \"192.168.1.100\", \"username\": \"admin\", \"password\": \"secret123\"}]",
"REDFISH_AUTH_METHOD": "session",
"MCP_TRANSPORT": "stdio"
}
}
}
}
}
For more information, see the VS Code documentation.
You can use the MCP Inspector for visual debugging of this MCP Server.
npx @modelcontextprotocol/inspector uv run src/main.py
- AI Assistants: Enable LLMs to fetch infrastructure data via Redfish API .
- Chatbots & Virtual Agents: Retrieve data, and personalize responses.