---
title: MCP Server configuration
---

# MCP Server Configuration in AdminUI

## Overview

AdminUI provides Model Context Protocol (MCP) integration, enabling AI assistants and coding agents to interact with your IdentityServer configuration programmatically.

## What is MCP?

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). AdminUI implements MCP to expose tools that AI assistants can use to manage your identity infrastructure.

## MCP Tools

The AdminUI's MCP server exposes tools that enable AI assistants to:

- **Create, Read, Update, Delete (CRUD)** operations on clients, scopes, protected resources, and identity resources
- **User Management** - Create, update, and manage user accounts
- **Role Management** - Manage roles and role assignments
- **Claim Type Management** - Manage claim types and user claims
- **Clients Management** - Manage Clients
- **Resources Management** - Manage Identity and Protected resources and Scopes
- **Audit Queries** - Query audit logs for administrative actions (when audit logging is configured)

### Production Tools

Require a Production license. These tools don't allow creating secrets and passwords that should not be expose to the LLM or chat history.

### Development Tools

Require Development or Enterprise license. These tools allow unsafe functionality like creating secrets for Client and Protected Resources and passwords for Users.

## MCP Server Configuration

### McpOptions

The MCP server is configured using the `McpOptions` class, which provides the following settings:

- `Name`: The name of the MCP server (default: "AdminUI MCP Server API")
- `Title`: The title displayed to MCP clients (default: "AdminUI MCP Server API")
- `RoutePath`: The HTTP route path for the MCP endpoint (default: "/mcp")
- `Instructions`: Instructions for AI assistants on how to use this MCP server. You can see the [default instructions here](./Default_instructions.md)
- `DisableMcpServer`: Whether to disable the MCP server entirely (default: true)
- `EnableDevTools`: Adds some development tools (default: false)

### Configuration Example

To enable and configure the MCP server in your `appsettings.json`:

```json
{
  "McpOptions": {
    "DisableMcpServer": false,
    "Name": "My Organization AdminUI",
    "Title": "Identity Server Management",
    "RoutePath": "/mcp",
    "Instructions": "This MCP server provides tools to manage OAuth2/OIDC clients, SAML service providers, and identity resources. Always verify client types before performing updates."
  }
}
```

### Endpoint Authentication

When enabled, the MCP server endpoint is:
- **URL**: `https://your-adminui-domain/{RoutePath}`
- **Authentication**: Requires authorization (uses AdminUI's authentication)
- **Transport**: HTTP with JSON-RPC 2.0 protocol

### Customization

You can customize the MCP server behavior by implementing `IMcpServerOverrideService`:

```csharp
public interface IMcpServerOverrideService
{
    List<McpServerTool> OverrideTools(List<McpServerTool> tools);
    List<McpServerResource> OverrideResources(List<McpServerResource> resources);
    List<McpServerPrompt> OverridePrompts(List<McpServerPrompt> prompts);
}
```

This allows you to:
- Add custom tools specific to your organization
- Remove or modify existing tools
- Add documentation resources
- Define custom prompts for common workflows

## Security and Authorization

All MCP tools implement the same security as the API security. Currently, the only way to authenticate is with an access token in the bearer header of any request.


## Upcomming tools

- Tools to manage Dynamic Authentication.