# mcp-agent-template

> mcp-agent-template is an open-source MCP server for security. MCP server template adding role, allowlist and human-confirmation guardrails. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/amineutron/mcp-agent-template
- **MCP Registry name:** io.github.amineutron/mcp-agent-template
- **Categories:** [security](https://ai-powered.com/categories/security), [agent tooling](https://ai-powered.com/categories/agent-tooling)
- **Listing updated:** 2026-11-18

## About

The README presents this as a template for building MCP servers that an IT department can let an LLM agent use safely. Every tool call is checked against an allowlist policy file, a caller role (read-only, operator or admin) derived from MCP tool annotations, and per-parameter allowed values before it runs.

Destructive actions require explicit human approval through MCP elicitation. Anything other than a clear yes is treated as a refusal, and refusals are returned to the agent as readable errors rather than fake successes. Each call is written to a JSONL audit log with a correlation id linking the decision, confirmation and result, and secret-like parameters are masked.

The package ships two runnable examples, one enterprise-style with fictitious tickets, directory and inventory data, and one generic ops example for systemd and docker. It is local-first and self-hosted, and the README says it has no cloud service or telemetry. It is dual licensed under AGPL-3.0 with a commercial licence available for companies.

## Features

- **Allowlist policy enforcement:** Tools absent from the policy file are refused by default.
- **Role-based tool access:** Caller roles map to tool types, with read-only, operator and admin levels.
- **Human confirmation for destructive tools:** Destructive calls use MCP elicitation so a person approves before execution.
- **JSONL audit logging:** Calls are logged with correlation ids and secret-like parameters masked.
- **Per-parameter value limits:** Policy can restrict which values a given tool parameter may take.
- **Runnable example servers:** Enterprise and ops examples run on fictitious local data for testing.

## Good for

- Expose internal ticketing or inventory data to an AI agent with read-only defaults
- Require a human sign-off before an agent restarts services or deletes records
- Build an auditable MCP server for an on-premise IT environment
- Prototype guarded tool access before connecting a real directory or database

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-agent-template -- uvx mcp-agent-template
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-agent-template": {
      "command": "uvx",
      "args": [
        "mcp-agent-template"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-agent-template": {
      "command": "uvx",
      "args": [
        "mcp-agent-template"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-agent-template": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-agent-template"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-agent-template": {
      "command": "uvx",
      "args": [
        "mcp-agent-template"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-agent-template": {
      "command": "uvx",
      "args": [
        "mcp-agent-template"
      ]
    }
  }
}
```

## FAQ

### What does the default role allow?

The default role is lecteur, which is read-only, set through the MCP_AGENT_TEMPLATE_ROLE variable.

### How is the human confirmation handled?

With MCP_AGENT_TEMPLATE_CONFIRM set to elicit, the server asks the human through the client; with client, the client confirms itself using the destructiveHint annotation.

### Where is the audit log written?

To the directory set by MCP_AGENT_TEMPLATE_AUDIT_DIR, defaulting to ~/.local/state/mcp-agent-template, as a file with 0600 permissions.

### Is it free to use?

It is licensed under AGPL-3.0, which the README says is free for individuals, associations and education or research; companies need a commercial licence.

### Is mcp-agent-template free?

Yes. mcp-agent-template is open source, so you can use and self-host it for free.

### How do I add mcp-agent-template to Claude Code?

Run this command in your terminal: claude mcp add mcp-agent-template -- uvx mcp-agent-template

### What are the best alternatives to mcp-agent-template?

The closest alternatives to mcp-agent-template are mcpcut, mcp-gatehouse, Linux MCP daemon (mcpd), MCP Zero-Trust Gateway and KillerSkills.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [mcpcut](https://ai-powered.com/mcp/mcpcut): mcpcut is an open-source MCP server for security.
- [mcp-gatehouse](https://ai-powered.com/mcp/mcp-gatehouse): mcp-gatehouse is an open-source MCP server for security.
- [Linux MCP daemon (mcpd)](https://ai-powered.com/mcp/linux-mcp-daemon-mcpd): Linux MCP daemon (mcpd) is an open-source MCP server for cloud and infrastructure.
- [MCP Zero-Trust Gateway](https://ai-powered.com/mcp/mcp-zero-trust-gateway): MCP Zero-Trust Gateway is an open-source MCP server for security.
- [KillerSkills](https://ai-powered.com/mcp/killerskills): KillerSkills is a freemium MCP server for security.
- [Diogenes Agent Guardrails & Sandbox MCP](https://ai-powered.com/mcp/diogenes-agent-guardrails-and-sandbox-mcp): Diogenes Agent Guardrails & Sandbox MCP is a freemium MCP server for security.
- [Calllint](https://ai-powered.com/mcp/calllint): Calllint is an open-source MCP server for security.
- [AgentRaaS wrap](https://ai-powered.com/mcp/agentraas-wrap): AgentRaaS wrap is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-agent-template
