> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# IMcpEndpointRegistry

> Manages the registration and discovery of MCP endpoints.

export function DocsBadge({text, variant = 'neutral'}) {
  const variantClasses = {
    success: 'mint-bg-green-500/10 mint-text-green-600 dark:mint-text-green-400 mint-border-green-500/20',
    neutral: 'mint-bg-slate-500/10 mint-text-slate-600 dark:mint-text-slate-400 mint-border-slate-500/20',
    info: 'mint-bg-blue-500/10 mint-text-blue-600 dark:mint-text-blue-400 mint-border-blue-500/20',
    warning: 'mint-bg-amber-500/10 mint-text-amber-600 dark:mint-text-amber-400 mint-border-amber-500/20',
    danger: 'mint-bg-red-500/10 mint-text-red-600 dark:mint-text-red-400 mint-border-red-500/20'
  };
  const classes = variantClasses[variant] || variantClasses.neutral;
  return <span className={`mint-inline-flex mint-items-center mint-px-2 mint-py-0.5 mint-rounded-full mint-text-xs mint-font-medium mint-tracking-wide mint-border mint-ml-1.5 mint-align-middle mint-whitespace-nowrap ${classes}`}>
      {text}
    </span>;
}

## Definition

**Assembly:** Microsoft.OData.Mcp.Core.dll

**Namespace:** Microsoft.OData.Mcp.Core.Routing

## Syntax

```csharp theme={"dark"}
Microsoft.OData.Mcp.Core.Routing.IMcpEndpointRegistry
```

## Summary

Manages the registration and discovery of MCP endpoints.

## Methods

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  GetAllEndpoints <DocsBadge text="Abstract" variant="warning" />

Gets all registered endpoints.

#### Syntax

```csharp theme={"dark"}
System.Collections.Generic.IEnumerable<Microsoft.OData.Mcp.Core.Routing.McpRouteEntry> GetAllEndpoints()
```

#### Returns

Type: `System.Collections.Generic.IEnumerable<Microsoft.OData.Mcp.Core.Routing.McpRouteEntry>`
A collection of all registered endpoints.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  GetMcpUrl <DocsBadge text="Abstract" variant="warning" />

Gets the MCP URL for a given OData route.

#### Syntax

```csharp theme={"dark"}
string GetMcpUrl(string routeName, System.Nullable<Microsoft.OData.Mcp.Core.Routing.McpCommand> command = null)
```

#### Parameters

| Name        | Type                                                           | Description                 |
| ----------- | -------------------------------------------------------------- | --------------------------- |
| `routeName` | `string`                                                       | The OData route name.       |
| `command`   | `System.Nullable<Microsoft.OData.Mcp.Core.Routing.McpCommand>` | The MCP command (optional). |

#### Returns

Type: `string?`
The MCP URL, or null if not found.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  HasEndpoint <DocsBadge text="Abstract" variant="warning" />

Checks if a route has an MCP endpoint registered.

#### Syntax

```csharp theme={"dark"}
bool HasEndpoint(string routeName)
```

#### Parameters

| Name        | Type     | Description           |
| ----------- | -------- | --------------------- |
| `routeName` | `string` | The OData route name. |

#### Returns

Type: `bool`
True if the route has an MCP endpoint; otherwise, false.

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Register <DocsBadge text="Abstract" variant="warning" />

Registers an MCP endpoint.

#### Syntax

```csharp theme={"dark"}
void Register(Microsoft.OData.Mcp.Core.Routing.McpRouteEntry route)
```

#### Parameters

| Name    | Type                                             | Description                  |
| ------- | ------------------------------------------------ | ---------------------------- |
| `route` | `Microsoft.OData.Mcp.Core.Routing.McpRouteEntry` | The route entry to register. |

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  TryGetEndpoint <DocsBadge text="Abstract" variant="warning" />

Attempts to get an endpoint by path.

#### Syntax

```csharp theme={"dark"}
bool TryGetEndpoint(string path, out Microsoft.OData.Mcp.Core.Routing.McpRouteEntry route, out Microsoft.OData.Mcp.Core.Routing.McpCommand command)
```

#### Parameters

| Name      | Type                                              | Description              |
| --------- | ------------------------------------------------- | ------------------------ |
| `path`    | `string`                                          | The request path.        |
| `route`   | `Microsoft.OData.Mcp.Core.Routing.McpRouteEntry?` | The matched route entry. |
| `command` | `Microsoft.OData.Mcp.Core.Routing.McpCommand`     | The MCP command.         |

#### Returns

Type: `bool`
True if an endpoint was found; otherwise, false.
