IaC Memory MCP Server
The IaC Memory MCP Server is a persistent memory storage system for Infrastructure-as-Code (IaC) components that enables version tracking, relationship mapping, and resource management for Terraform and Ansible.
Key capabilities:
Terraform Management: Store and retrieve provider/resource information, track version history, check cross-version compatibility, and manage documentation
Ansible Management: Store and retrieve collection/module information, track version history, check cross-version compatibility, and manage documentation
Entity Management: Create, update, and delete infrastructure entities while tracking relationships and observations
Resource Organization: Hierarchical URI-based resource access with dynamic templates for standardized patterns
Advanced Features: Schema validation, temporal metadata tracking, automated relationship analysis, and search functionality
Integration: Designed to enhance Claude AI's capabilities across development and production environments
Enables interaction with Ansible collections and modules, supporting operations like retrieving collection information, listing modules, checking version compatibility, and adding or updating collection and module definitions with schema validation.
Uses SQLite as the persistent storage backend for Infrastructure-as-Code components, allowing configuration through the DATABASE_URL environment variable.
Provides tools for managing Terraform providers and resources, including retrieving provider information, listing resources, checking version compatibility, and adding or updating provider and resource definitions with schema validation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@IaC Memory MCP Server show me the latest version of the AWS Terraform provider"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
IaC Memory MCP Server
A Model Context Protocol (MCP) server that enhances Claude AI's capabilities by providing persistent memory storage for Infrastructure-as-Code (IaC) components, with a focus on version tracking and relationship mapping for Terraform and Ansible resources.
This was a personal project to determine the state of AI's ability if the person using it (me)
doesn't have subject matter expertise (lack of Python knowledge). Since it has become rather cost
prohibitive, I do not intend to develop or maintain this project further.
Overview
The IaC Memory MCP Server addresses the challenge of maintaining accurate, version-aware context for IaC components by providing:
Persistent storage and version tracking for IaC components
Hierarchical resource organization with URI-based access
Comprehensive relationship mapping between components
Version-specific documentation management
Schema validation and temporal metadata tracking
Automated relationship analysis and insights
Related MCP server: Chronos MCP
Core Components
Resource Management
The server implements a sophisticated resource management system with hierarchical URIs:
Resource URI Structure
resources://<platform>/<category>/<name>Supported platforms:
terraform
ansible
iac (for general infrastructure entities)
Example URIs:
resources://terraform/providers/aws
resources://terraform/resources/aws/s3_bucket
resources://ansible/collections/community.aws
resources://ansible/modules/community.aws/s3_bucketResource Templates
The server provides dynamic resource templates for standardized access patterns:
Terraform provider information:
resources://terraform/providers/{provider_name}Resource type details:
resources://terraform/resources/{provider_name}/{resource_type}Ansible collection data:
resources://ansible/collections/{collection_name}Module information:
resources://ansible/modules/{collection_name}/{module_name}
Prompts
The server implements four specialized prompts for IaC component discovery and analysis:
search_resources
Purpose: Search for IaC resources
Arguments:
provider: Provider nameresource_type: Resource type
Returns: Information about specific resources for the given provider
analyze_entity
Purpose: Analyze an entity and its relationships
Arguments:
entity_id: Entity IDinclude_relationships: Include relationships
Returns: Detailed entity analysis including name, type, and observations
terraform_provider
Purpose: Get information about a Terraform provider
Arguments:
provider_name: Name of the Terraform provider (required)version: Specific version to query (optional)
Returns: Detailed provider information for the specified version
ansible_module
Purpose: Get information about an Ansible module
Arguments:
collection_name: Name of the Ansible collection (required)module_name: Name of the module (required)version: Specific version to query (optional)
Returns: Detailed module information for the specified version
Tools
The server implements comprehensive tooling for IaC component management:
Terraform Tools
get_terraform_provider_info: Retrieve detailed provider information including version and resourceslist_provider_resources: List all resources available for a specific providerget_terraform_resource_info: Get detailed information about a specific resource typeadd_terraform_provider: Register new providers with versioningadd_terraform_resource: Add resource definitions with schemasupdate_provider_version: Update provider versions with new documentation
Ansible Tools
get_ansible_collection_info: Get detailed information about an Ansible collectionlist_ansible_collections: List all available Ansible collectionsget_collection_version_history: View version history of a collectionget_ansible_module_info: Get detailed information about a specific modulelist_collection_modules: List all modules in a collectionget_module_version_compatibility: Check version compatibility of modulesadd_ansible_collection: Register new Ansible collectionsadd_ansible_module: Add new modules with validation and documentation
Entity Operations
create_entity: Create new infrastructure entitiesupdate_entity: Modify existing entity configurationsdelete_entity: Remove entities with relationship cleanupview_relationships: Analyze entity dependencies and relationships
Configuration
The server supports configuration through environment variables:
DATABASE_URL: SQLite database locationMCP_DEBUG: Enable debug logging when setMCP_TEST_MODE: Enable test mode for database resets
For development, create a .env file:
DATABASE_URL=sqlite:////path/to/db.sqlite
MCP_DEBUG=1
MCP_TEST_MODE=1Integration with Claude Desktop
Development Setup
"mcpServers": {
"iac-memory": {
"command": "uv",
"args": [
"--directory",
"/path/to/iac-memory-mcp-server",
"run",
"iac-memory-mcp-server"
]
"env": {
"DATABASE_URL": "sqlite:////home/herman/iac.db"
}
}
}Production Setup
"mcpServers": {
"iac-memory": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/AgentWong/iac-memory-mcp-server.git",
"python",
"-m",
"iac_memory_mcp_server"
],
"env": {
"DATABASE_URL": "sqlite:////home/herman/iac.db"
}
}
}Development
Local Development
# Install dependencies
uv sync
# Run tests
uv run pytest
# Development server with MCP Inspector
npx @modelcontextprotocol/inspector uv run iac-memory-mcp-serverLicense
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
23 toolsadd_ansible_collectionB
Add a new Ansible collection to the memory store with version and documentation information
Inputs: name (required), version (required), source_url (required), doc_url (required).
add_ansible_moduleC
Add a new Ansible module definition with its schema and version information
Inputs: collection (required), name (required), module_type (required), schema (required), +2 more.
add_terraform_providerB
Add a new Terraform provider to the memory store with version and documentation information
Inputs: name (required), version (required), source_url (required), doc_url (required).
add_terraform_resourceC
Add a new Terraform resource definition with its schema and version information
Inputs: name (required), resource_type (required), schema (required), version (required), +2 more.
create_entityC
Create a new entity in the knowledge graph with optional initial observations
Inputs: name (required), type (required), observation.
delete_entityC
Remove an entity and its relationships from the knowledge graph
Inputs: id (required).
get_ansible_collection_infoC
Retrieve comprehensive information about an Ansible collection
Inputs: collection_name (required).
get_ansible_module_infoC
Retrieve comprehensive information about an Ansible module including schema and documentation
Inputs: collection_name (required), module_name (required).
get_collection_version_historyA
Retrieve version history for a specific Ansible collection
Inputs: collection_name (required).
get_module_version_compatibilityC
Check module compatibility across collection versions
Inputs: collection_name (required), module_name (required), version (required).
get_provider_version_historyB
Retrieve version history for a specific Terraform provider
Inputs: provider_name (required).
get_resource_version_compatibilityC
Check resource compatibility across provider versions
Inputs: provider_name (required), resource_name (required), version (required).
get_terraform_provider_infoC
Retrieve comprehensive information about a Terraform provider
Inputs: provider_name (required).
get_terraform_resource_infoC
Retrieve comprehensive information about a Terraform resource including schema and documentation
Inputs: provider_name (required), resource_name (required).
list_ansible_collectionsC
List all cached Ansible collections with basic metadata
Inputs: filter_criteria.
list_provider_resourcesC
List all resources associated with a specific Terraform provider
Inputs: provider_name (required), filter_criteria.
list_terraform_providersB
List all cached Terraform providers with basic metadata
Inputs: filter_criteria.
update_collection_versionC
Update an existing Ansible collection's version information and documentation links
Inputs: collection_id (required), new_version (required), new_source_url, new_doc_url.
update_entityC
Update an existing entity's properties and add new observations
Inputs: id (required), name, type, observation.
update_module_versionC
Update an existing Ansible module's schema and related information
Inputs: module_id (required), new_schema (required), new_version, new_doc_url.
update_provider_versionC
Update an existing Terraform provider's version information and documentation links
Inputs: provider_name (required), new_version (required), new_source_url, new_doc_url.
update_resource_schemaC
Update an existing Terraform resource's schema and related information
Inputs: resource_id (required), new_schema (required), new_version, new_doc_url.
view_relationshipsC
Retrieve all relationships and observations for a specific entity
Inputs: entity_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Most tools have distinct purposes targeting specific IaC components (Ansible vs. Terraform) and operations (add/get/list/update). However, there is some potential overlap between 'create_entity' and the various 'add_' tools, as both involve storing information, though 'create_entity' seems more generic for a knowledge graph. The descriptions help clarify boundaries, but an agent might need to infer when to use 'create_entity' versus the specific 'add_' tools.
Tool names follow a highly consistent verb_noun pattern throughout, with clear and predictable conventions. All tools use snake_case, and verbs like 'add', 'get', 'list', 'update', 'delete', and 'view' are applied consistently across similar resource types (e.g., 'add_ansible_collection', 'get_ansible_collection_info', 'list_ansible_collections'). This makes the tool set easy to navigate and understand.
With 23 tools, the count is on the higher side for an MCP server, bordering on heavy. While the server covers both Ansible and Terraform domains comprehensively, the number of tools might feel overwhelming or lead to redundancy (e.g., separate tools for version history and compatibility checks). A more streamlined set could improve usability without losing functionality, placing it in the borderline range.
The tool surface provides complete CRUD/lifecycle coverage for both Ansible and Terraform components, including adding, retrieving, listing, updating, and deleting entities. It also handles version management, compatibility checks, and relationship viewing for a knowledge graph. No obvious gaps exist; agents can perform all expected operations for managing IaC metadata and entities without dead ends.
Related MCP Connectors
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Persistent, governed institutional memory for Claude Code — specs, decisions, learnings.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides persistent memory capabilities for Claude Code using Neo4j graph database to track development tasks, code patterns, solutions, and their relationships across sessions and projects, enabling contextual assistance and pattern recognition.11-
- AlicenseNot gradedqualityDmaintenanceProvides Claude with a persistent local memory and structured knowledge graph to track project states, tasks, and historical decisions across different chat sessions. It enables users to recall information using keyword relevance, time-travel queries, and dependency analysis for complex project management.MIT

SAE4U Memoryofficial
AlicenseAqualityCmaintenanceProvides persistent memory for Claude with hierarchical categorization, cross-corpus recall, session journals, and customizable persona, enabling memory continuity across sessions.7MIT- AlicenseAqualityDmaintenancePersistent memory and automatic git snapshots for Claude Code, capturing decisions, patterns, and architecture across sessions.10121 npm100MIT