Docs
Choose your preferred AI platform and authentication method to get started with Agentsfera.
Python SDK
Use the official Python SDK to integrate this server into your Python applications and services.
Installation
Install the official MCP Python SDK using your package manager:
uv add mcp
Python SDK
"""
Run from the repository root:
uv run main.py
"""
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
# Connect to Agentsfera MCP server
async with streamablehttp_client(
"https://api.agentsfera.ai",
headers={
"Authorization": "Bearer sk-7aefcd76-44c0-4687-a0a9-43599d050fdd",
"Content-Type": "application/json",
"user-session-id": "your-user-unique-id"
}
) as (read_stream, write_stream, _):
# Create a session using the client streams
async with ClientSession(read_stream, write_stream) as session:
# Initialize the connection
await session.initialize()
# List available tools
tools = await session.list_tools()
print(f"Available tools: {[tool.name for tool in tools.tools]}")
if __name__ == "__main__":
asyncio.run(main())
No API keys found. Create an API key first to use the Python SDK integration.