Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Anthropic.SDK.Tests/Anthropic.SDK.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
<ItemGroup>
<PackageReference Include="Google.Cloud.AIPlatform.V1" Version="3.24.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.9.1" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.10.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.65.0" />
<PackageReference Include="Microsoft.SemanticKernel.Abstractions" Version="1.65.0" />
<PackageReference Include="Microsoft.SemanticKernel.Abstractions" Version="1.66.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.8.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.8.2" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
Expand Down
10 changes: 5 additions & 5 deletions Anthropic.SDK/Anthropic.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Grant Hamm</Authors>
<Product>Claude API</Product>
<Description>A C# / .NET library to use with Anthropic's Claude API. Supports Streaming, Tools, Batching, and Semantic Kernel Integration</Description>
<Description>A C# / .NET library to use with Anthropic's Claude API. Supports Streaming, Tools, Batching, and Semantic Kernel/Agent Framework</Description>
<Copyright>This library is licensed MIT, in the public domain</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/tghamm/Anthropic.SDK</PackageProjectUrl>
<RepositoryUrl>https://github.com/tghamm/Anthropic.SDK</RepositoryUrl>
<PackageTags>Claude, AI, ML, API, Anthropic</PackageTags>
<Title>Claude API</Title>
<PackageReleaseNotes>
Skills, Code Execution, File API Support, Haiku 4.5 Constant, bug fixes.
Skills, Code Execution, File API Support, Haiku 4.5 Constant, Resilience/Logging, bug fixes.
</PackageReleaseNotes>
<PackageId>Anthropic.SDK</PackageId>
<Version>5.7.1</Version>
<Version>5.8.0</Version>
<AssemblyVersion>5.5.0.0</AssemblyVersion>
<FileVersion>5.7.1.0</FileVersion>
<FileVersion>5.8.0.0</FileVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
Expand All @@ -36,7 +36,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.9.1" />
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.10.1" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
</ItemGroup>

Expand Down
14 changes: 2 additions & 12 deletions Anthropic.SDK/Messaging/ChatClientHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static MessageParameters CreateMessageParameters(IChatClient client, IEnu
case HostedMcpServerTool mcpt:
MCPServer mcpServer = new()
{
Url = mcpt.Url.ToString(),
Url = mcpt.ServerAddress,
Name = mcpt.ServerName,
};

Expand All @@ -117,17 +117,7 @@ public static MessageParameters CreateMessageParameters(IChatClient client, IEnu
mcpServer.ToolConfiguration.AllowedTools.AddRange(mcpt.AllowedTools);
}

if (mcpt.Headers?.TryGetValue("Authorization", out string authHeader) is true)
{
ReadOnlySpan<char> actual = authHeader.AsSpan().Trim();
int spacePos = actual.IndexOf(' ');
if (spacePos > 0)
{
authHeader = actual.Slice(spacePos + 1).Trim().ToString();
}

mcpServer.AuthorizationToken = authHeader;
}
mcpServer.AuthorizationToken = mcpt.AuthorizationToken;

(parameters.MCPServers ??= []).Add(mcpServer);
break;
Expand Down
Loading