Redfish MCP Server
Overview
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"
Features
- 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
Tools
This MCP Server provides tools to manage the data of infrastructure via the Redfish API.
list_endpointsto query the Redfish API endpoints that are configured for the MCP Server.get_resource_datato read the data of a specific resource (e.g. System, EthernetInterface, etc.)
Installation
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
Configuration
To configure this Redfish MCP Server, consider the following environment variables:
| Name | Description | Default Value |
|---|---|---|
REDFISH_HOSTS |
The list of Redfish API endpoints | [{"address:"127.0.0.1"}] |
REDFISH_PORT |
The port used for the REdfish API | 443 |
REDFISH_USERNAME |
Redfish username | "" |
REDFISH_PASSWORD |
Redfish password | "" |
REDFISH_SERVER_CA_CERT |
CA certificate for verifying server | None |
MCP_TRANSPORT |
Use the stdio or sse or streamable-http transport |
stdio |
There are several ways to set environment variables:
- Using a
.envFile: Place a.envfile in your project directory with key-value pairs for each environment variable. Tools likepython-dotenv,pipenv, anduvcan automatically load these variables when running your application. This is a convenient and secure way to manage configuration, as it keeps sensitive data out of your shell history and version control (if.envis in.gitignore).
For example, create a .env file with the following content from the .env.example file provided in the repository:
cp .env.example .env
Then edit the .env file to set your Redfish configuration
OR,
- Setting Variables in the Shell: You can export environment variables directly in your shell before running your application. For example:This method is useful for temporary overrides or quick testing.
Transports
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"
},
}
},
Integration with Claude Desktop
Manual configuration
You can configure Claude Desktop to use this MCP Server.
- Retrieve your
uvcommand full path (e.g.which uv) - Edit the
claude_desktop_config.jsonconfiguration 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": "<the_list_of_your_redfish_endpoints>",
"REDFISH_PORT": "<your_redfish_port>",
"REDFISH_PASSWORD": "<your_redfish_password>",
"REDFISH_SERVER_CA_CERT": "<your_redfish_server_ca_path>",
}
}
}
}
Troubleshooting
You can troubleshoot problems by tailing the log file.
tail -f ~/Library/Logs/Claude/mcp-server-redfish.log
Integration with VS Code
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.jsonorsettings.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": "<the_list_of_your_redfish_endpoints>",
"REDFISH_PORT": "<your_redfish_port>",
"REDFISH_PASSWORD": "<your_redfish_password>",
}
}
}
}
// 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": "<the_list_of_your_redfish_endpoints>",
"REDFISH_PORT": "<your_redfish_port>",
"REDFISH_PASSWORD": "<your_redfish_password>",
}
}
}
}
}
For more information, see the VS Code documentation.
Testing
You can use the MCP Inspector for visual debugging of this MCP Server.
npx @modelcontextprotocol/inspector uv run src/main.py
Example Use Cases
- AI Assistants: Enable LLMs to fetch infrastructure data via Redfish API .
- Chatbots & Virtual Agents: Retrieve data, and personalize responses.