Docs
Choose your preferred AI platform and authentication method to get started with Agentsfera.
C# SDK
Use the official C# SDK to integrate this server into your .NET applications and services.
Installation
Install the official MCP C# SDK using your package manager:
dotnet add package ModelContextProtocol --prerelease
C# SDK
using ModelContextProtocol.Client;
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Add("Authorization", "Bearer sk-7aefcd76-44c0-4687-a0a9-43599d050fdd");
httpClient.DefaultRequestHeaders.Add("user-session-id", "your-user-unique-id");
var transport = new SseClientTransport(new()
{
Endpoint = new Uri("https://api.agentsfera.ai"),
Name = "undefined"
}, httpClient);
var client = await McpClientFactory.CreateAsync(transport);
// Print the list of tools available from the server
foreach (var tool in await client.ListToolsAsync())
{
Console.WriteLine($"{tool.Name} ({tool.Description})");
}
No API keys found. Create an API key first to use the C# SDK integration.