# McpServerRequest

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.mcpserverrequest/
> Summary: McpServerRequest: Request to create/update an MCP server.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.AspNetCore.dll</code></div>

Request to create/update an MCP server.

```csharp
public sealed record McpServerRequest : IEquatable<McpServerRequest>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.mcpserverrequest/">McpServerRequest</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;McpServerRequest&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

**There is no secret field.** A credential header's value is
not sent; only the name of the configuration key the value is to be read
from is sent (`HeaderConfigurationKeys`). The value is resolved
through `IConfiguration` at runtime and is never written to the
database.

## Constructors

### <a id="Tracon_McpServerRequest__ctor"></a> McpServerRequest\(\)

```csharp
public McpServerRequest()
```

## Properties

### <a id="Tracon_McpServerRequest_Description"></a> Description

Description.

```csharp
public string? Description { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_McpServerRequest_Enabled"></a> Enabled

Whether the server is enabled.

```csharp
public bool Enabled { get; init; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_McpServerRequest_Endpoint"></a> Endpoint

Server address. Only `http` and `https` are accepted.

```csharp
public required string Endpoint { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_McpServerRequest_HeaderConfigurationKeys"></a> HeaderConfigurationKeys

Credential request headers, as a map from the header name to the NAME
of the configuration key its value is read from, for example
`{"X-Api-Key": "Tracon:McpSecrets:acme:SearchKey"}`. Every name must
sit inside the caller's tenant key space. A response returns the map
unmasked: it carries no value. Absent or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) keeps the
stored map; `{}` removes it.

```csharp
public IReadOnlyDictionary<string, string>? HeaderConfigurationKeys { get; init; }
```

#### Property Value

 [IReadOnlyDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [string](https://learn.microsoft.com/dotnet/api/system.string)\>?

### <a id="Tracon_McpServerRequest_Headers"></a> Headers

Extra request headers, sent as given with every request to the server.
The values are stored as plain text, so a header whose name looks like
a credential (`Authorization`, `X-Api-Key`, `Cookie`, any
name ending in `-key`) is rejected with `400`: declare it in
`HeaderConfigurationKeys`. Send every header with its real
value on each save: a response masks the values as `***`, and a
value of `***` is rejected with `400`. Absent or
[null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) keeps the stored headers; `{}` removes them.

```csharp
public IReadOnlyDictionary<string, string>? Headers { get; init; }
```

#### Property Value

 [IReadOnlyDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [string](https://learn.microsoft.com/dotnet/api/system.string)\>?

### <a id="Tracon_McpServerRequest_OAuthAuthorizationMode"></a> OAuthAuthorizationMode

OAuth authorization flow.

```csharp
[JsonPropertyName("oauthAuthorizationMode")]
public McpOAuthAuthorizationMode OAuthAuthorizationMode { get; init; }
```

#### Property Value

 [McpOAuthAuthorizationMode](/api/tracon.mcpoauthauthorizationmode/)

### <a id="Tracon_McpServerRequest_OAuthClientId"></a> OAuthClientId

OAuth client identifier.

```csharp
[JsonPropertyName("oauthClientId")]
public string? OAuthClientId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_McpServerRequest_OAuthClientSecretConfigurationKey"></a> OAuthClientSecretConfigurationKey

Configuration key the OAuth client secret's value is read from. The
value itself is not sent; only the key's name is.

```csharp
[JsonPropertyName("oauthClientSecretConfigurationKey")]
public string? OAuthClientSecretConfigurationKey { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_McpServerRequest_OAuthEnabled"></a> OAuthEnabled

Whether OAuth authentication is enabled. While on,
`HeaderConfigurationKeys` may not name `Authorization`.

```csharp
[JsonPropertyName("oauthEnabled")]
public bool OAuthEnabled { get; init; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

#### Remarks

`[JsonPropertyName]` is given deliberately — same reason as
[McpServerDefinition.OAuthEnabled](/api/tracon.mcpserverdefinition/#Tracon_McpServerDefinition_OAuthEnabled): the camelCase policy
produces an unexpected result for a name like "OAuth" that starts with
two capital letters.

### <a id="Tracon_McpServerRequest_OAuthScopes"></a> OAuthScopes

Space-separated list of OAuth scopes.

```csharp
[JsonPropertyName("oauthScopes")]
public string? OAuthScopes { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_McpServerRequest_RequiresApproval"></a> RequiresApproval

Whether this server's tools require approval. Default [true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

```csharp
public bool RequiresApproval { get; init; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_McpServerRequest_Transport"></a> Transport

Transport mode.

```csharp
public McpTransportMode Transport { get; init; }
```

#### Property Value

 [McpTransportMode](/api/tracon.mcptransportmode/)

## Methods

### <a id="Tracon_McpServerRequest_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_McpServerRequest_Equals_Tracon_McpServerRequest_"></a> Equals\(McpServerRequest?\)

```csharp
public bool Equals(McpServerRequest? other)
```

#### Parameters

`other` [McpServerRequest](/api/tracon.mcpserverrequest/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_McpServerRequest_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_McpServerRequest_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_McpServerRequest_op_Equality_Tracon_McpServerRequest_Tracon_McpServerRequest_"></a> operator ==\(McpServerRequest?, McpServerRequest?\)

```csharp
public static bool operator ==(McpServerRequest? left, McpServerRequest? right)
```

#### Parameters

`left` [McpServerRequest](/api/tracon.mcpserverrequest/)?

`right` [McpServerRequest](/api/tracon.mcpserverrequest/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_McpServerRequest_op_Inequality_Tracon_McpServerRequest_Tracon_McpServerRequest_"></a> operator \!=\(McpServerRequest?, McpServerRequest?\)

```csharp
public static bool operator !=(McpServerRequest? left, McpServerRequest? right)
```

#### Parameters

`left` [McpServerRequest](/api/tracon.mcpserverrequest/)?

`right` [McpServerRequest](/api/tracon.mcpserverrequest/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
