Itential MCP Server
Project description
🔌 Itential - MCP Server
A Model Context Protocol (MCP) server that provides tools for connecting LLMs to Itential Platform. Enable AI assistants to manage network automations, orchestrate workflows, and monitor platform health.
📒 Features
- Multiple Transport Methods: Choose between stdio (default) or SSE transport for MCP server
- Dynamic Tool Loading: Automatically discovers and registers tools without modifying core code
- Flexible Authentication: Supports both basic authentication and OAuth for Itential Platform
- Configurable: Set options via command line parameters or environment variables
- Containerized: Run as a Docker container with configurable environment
- Extensible: Easy to add new tools without deep knowledge of the code base
🔍 Requirements
- Python 3.10 or higher
- Access to an Itential Platform Instance
- For development -
uvandmake
🔧 Installation
The itential-mcp application can be installed using either PyPI or it can be
run directly from source.
PyPI Installation
To install it from PyPI, simply use pip:
pip install itential-mcp
Local Development
The repository can also be clone the repository to your local environment to
work with the MCP server. The project uses uv and make so both tools
would need to be installed and available in your environment.
The following commands can be used to get started.
git clone https://github.com/itential/itential-mcp
cd itential-mcp
make build
Build Container Image
Build and run as a container:
# Build the container image
make container
# Run the container with environment variables
docker run -p 8000:8000 \
--env ITENTIAL_MCP_SERVER_TRANSPORT=sse \
--env ITENTIAL_MCP_SERVER_HOST=0.0.0.0 \
--env ITENTIAL_MCP_SERVER_PORT=8000 \
--env ITENTIAL_MCP_PLATFORM_HOST=URL \
--env ITENTIAL_MCP_PLATFORM_CLIENT_ID=CLIENT_ID \
--env ITENTIAL_MCP_PLATFORM_CLIENT_SECRET=CLIENT_SECRET \
itential-mcp:devel
📝 Basic Usage
Start the MCP server with default settings (stdio transport):
itential-mcp --transport --host 0.0.0.0 --port 8000
Start with SSE transport:
itential-mcp --transport sse --host 0.0.0.0 --port 8000
General Options
| Option | Description | Default |
|---|---|---|
--config |
Path to the config file | none |
Server Options
| Option | Description | Default |
|---|---|---|
--transport |
Transport protocol (stdio, sse, streamable-http) | stdio |
--host |
Host address to listen on | localhost |
--port |
Port to listen on | 8000 |
--path |
The streamable HTTP path to use | /mcp |
--log-level |
Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL) | INFO |
--include-tags |
Tags to include registered tools | none |
--exclude-tags |
Tags to exclude registered tools | experimental,beta |
Platform Configuration
| Option | Description | Default |
|---|---|---|
--platform-host |
Itential Platform hostname | localhost |
--platform-port |
Platform port (0 = auto-detect) | 0 |
--platform-disable-tls |
Disable TLS for platform connection | false |
--platform-disable-verify |
Disable certificate verification | false |
--platform-timeout |
Connection timeout | 30 |
--platform-user |
Username for authentication | admin |
--platform-password |
Password for authentication | admin |
--platform-client-id |
OAuth client ID | none |
--platform-client-secret |
OAuth client secret | none |
Environment Variables
All command line options can also be set using environment variables prefixed with ITENTIAL_MCP_SERVER_. For example:
export ITENTIAL_MCP_SERVER_TRANSPORT=sse
export ITENTIAL_MCP_PLATFORM_HOST=platform.example.com
itential-mcp # Will use the environment variables
Configuration file
The server configuration can also be specified using a configuration file. The
configuration file can be used to pass in all the configuration parameters. To
use a configuration file, simply pass in the --config <path> command line
argument where <path> points to the configuration file to load.
The format and values for the configuration file are documented here
When configuration options are specified in multiple places the following precedence for determinting the value to be used will be honored from highest to lowest:
- Environment variable
- Command line option
- Configuration file
- Default value
💡 Available Tools
The MCP server provides the following tools for interaction with Itential Platform:
System Tools
get_health: Retrieve platform health status including memory, CPU usage, and service status
Workflow Engine Tools
get_job_metrics: Get aggregated workflow job metricsget_task_metrics: Get aggregated workflow task metrics
Workflow Management Tools
get_workflows: List available workflowsstart_workflow: Start a workflow with provided variables and permissions
Job Tools
get_jobs: List all jobs (with optional filtering)describe_job: Get details about a specific job (based on job_id)
Command Template Tools
get_command_templates: List all configured command templatesdescribe_command_template: Get details about a specific command templaterun_command_template: Run a command template against a set of devices
Device Tools
get_devices: Get a list of devices from Itential Platformrun_command: Run a command against one or more devices
Note: See here for information about how to properly expose workflows to the MCP server
🛠️ Adding new Tools
Adding a new tool is simple:
- Create a new Python file in the
src/itential_mcp/tools/directory or add a function to an existing file - Define an async function with a
Contextparameter annotation:
from fastmcp import Context
async def my_new_tool(ctx: Context) -> dict:
"""
Description of what the tool does
Args:
ctx (Context): The FastMCP Context object
Returns:
dict: The response data
Raises:
None
"""
# Get the platform client
client = ctx.request_context.lifespan_context.get("client")
# Make API requests
res = await client.get("/your/api/path")
# Return JSON-serializable results
return res.json()
Tools are automatically discovered and registered when the server starts.
Running Tests
Run the test suite with:
make test
For test coverage information:
make coverage
Contributing
Contributions are welcome! Please read our Code of Conduct before contributing.
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -am 'Add new feature' - Push to the branch:
git push origin feature/my-feature - Submit a pull request
Before submitting:
- Run
make premergeto ensure tests pass and code style is correct - Add documentation for new features
- Add tests for new functionality
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Copyright (c) 2025 Itential, Inc
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file itential_mcp-0.2.0.tar.gz.
File metadata
- Download URL: itential_mcp-0.2.0.tar.gz
- Upload date:
- Size: 87.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0da8a916125aed4f24c906f37c5802823eabd0bf65f4d205070728b770bf3aef
|
|
| MD5 |
f9c0811a9179c011e1fb0e9fd6f38c5f
|
|
| BLAKE2b-256 |
f095c69055d5d72940bb3277159b9fa73a020863aa6b94270859e0b5b677d51c
|
File details
Details for the file itential_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: itential_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 56.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc0c3312bedf79c71e0a4539878f4df8242647856945fdb64c621f3498ba7037
|
|
| MD5 |
9c06a60b17093df973641bf24aa3dcba
|
|
| BLAKE2b-256 |
7a09f57d1d92e3c865667489c5b9429899102489cee3e8b617458c5cfc382c7e
|