
MCP Server
punkpeye
public
iac memory mcp server
用于基础设施即代码(IaC)资源配置、分析和管理的MCP服务器。
Repository Info
1
Stars
0
Forks
1
Watchers
0
Issues
TypeScript
Language
-
License
About This Server
用于基础设施即代码(IaC)资源配置、分析和管理的MCP服务器。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
# iac-memory-mcp-server
MCP Server for Infrastructure-as-Code (IaC) resource management and analysis.
## Components
### Resources
The server implements a resource management system with:
- Custom resource:// URI scheme for accessing internal resources
- Each resource has a name, content, and configurable MIME type
- Resources can represent IaC configurations, documentation, and analysis results
### Prompts
The server provides IaC-specific prompts for resource discovery and analysis:
#### search_resources
Search for Infrastructure-as-Code resources across providers:
```python
result = await session.get_prompt("search_resources", {
"provider": "aws", # Cloud provider (aws, azure, gcp)
"resource_type": "s3_bucket" # Resource type to search
})
# Returns matching resources with schema versions and documentation
```
#### analyze_entity
Analyze infrastructure entities and their relationships:
```python
result = await session.get_prompt("analyze_entity", {
"entity_id": "entity-123", # ID of entity to analyze
"include_relationships": "true" # Optional: include related entities
})
# Returns detailed analysis including:
# - Entity configuration
# - Recorded observations
# - Related entities (if requested)
# - Relationship types and depths
```
### Tools
The server implements comprehensive CRUD operations:
Entity Management and Relationships:
- create_entity: Create new infrastructure entities
- read_entity: Retrieve entity details
- update_entity: Modify existing entities
- delete_entity: Remove entities and related data
- view_relationships: Analyze entity relationships and dependencies
```python
# View all relationships
result = await session.call_tool("view_relationships", {})
# View relationships for specific entity
result = await session.call_tool("view_relationships", {
"entity_id": "entity-123"
})
```
Resource Management:
- add_resource: Add new resources
```python
# Add a new resource with custom MIME type
result = await session.call_tool("add_resource", {
"name": "aws-s3-config",
"content": "bucket_name: my-bucket\nregion: us-east-1",
"mime_type": "application/yaml" # Optional
})
# Add plain text resource
result = await session.call_tool("add_resource", {
"name": "deployment-notes",
"content": "Deployment steps for production..."
})
```
## Configuration
The server can be configured through environment variables:
- `DATABASE_URL`: Path to SQLite database file (default: in-memory)
- `CLIENT_PORT`: Port for MCP Inspector client UI (default: 5173)
- `SERVER_PORT`: Port for MCP Inspector proxy server (default: 3000)
For development, you can also use a `.env` file:
```bash
DATABASE_URL=/path/to/db.sqlite
CLIENT_PORT=5173
SERVER_PORT=3000
```
## Quickstart
### Install
#### Claude Desktop
On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
<details>
<summary>Development/Unpublished Servers Configuration</summary>
```
"mcpServers": {
"iac-memory-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/home/herman/Documents/vscode/iac-memory-mcp-server",
"run",
"iac-memory-mcp-server"
]
}
}
```
</details>
<details>
<summary>Published Servers Configuration</summary>
```
"mcpServers": {
"iac-memory-mcp-server": {
"command": "uvx",
"args": [
"iac-memory-mcp-server"
]
}
}
```
</details>
## Development
### Building and Publishing
To prepare the package for distribution:
1. Sync dependencies and update lockfile:
```bash
uv sync
```
2. Build package distributions:
```bash
uv build
```
This will create source and wheel distributions in the `dist/` directory.
3. Publish to PyPI:
```bash
uv publish
```
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token: `--token` or `UV_PUBLISH_TOKEN`
- Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--password`/`UV_PUBLISH_PASSWORD`
### Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging
experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).
You can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:
```bash
npx @modelcontextprotocol/inspector uv --directory /home/herman/Documents/vscode/iac-memory-mcp-server run iac-memory-mcp-server
```
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Quick Start
1
Clone the repository
git clone https://github.com/punkpeye/iac-memory-mcp-server2
Install dependencies
cd iac-memory-mcp-server
npm install3
Follow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Ownerpunkpeye
Repoiac-memory-mcp-server
Language
TypeScript
License-
Last fetched8/8/2025
Recommended MCP Servers
💬
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
integrationsdiscordchat
🔗
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
integrationsautomationsaas
🕷️
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
apifycrawlerdata
🌐
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
testingqabrowsers
⚡
Zapier MCP
A Zapier server that provides automation capabilities for various apps.
zapierautomation