Skip to main content
Glama

aip_register

Register a new AI agent identity with the Agent Identity Protocol by specifying platform and username to enable verification and secure communication.

Instructions

Register a new AIP identity for your agent.

Args: platform: Platform name (e.g. 'github', 'moltbook', 'discord') username: Your username on that platform

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYes
usernameYes

Implementation Reference

  • Implementation of the aip_register tool which registers a new identity using AIPClient and saves credentials to disk.
    @mcp.tool()
    def aip_register(platform: str, username: str) -> dict:
        """Register a new AIP identity for your agent.
    
        Args:
            platform: Platform name (e.g. 'github', 'moltbook', 'discord')
            username: Your username on that platform
        """
        from aip_identity.client import AIPClient
    
        # Check if credentials already exist
        existing = _find_credentials()
        if existing:
            return {
                "already_registered": True,
                "did": existing["did"],
                "message": "You already have an AIP identity. Use aip_whoami() to see it.",
            }
    
        try:
            client = AIPClient.register(platform, username, service_url=_SERVICE_URL)
        except Exception as e:
            return {"registered": False, "error": str(e)}
    
        # Save credentials
        creds_path = Path.home() / ".aip" / "credentials.json"
        creds_path.parent.mkdir(parents=True, exist_ok=True)
        client.save(str(creds_path))
        creds_path.chmod(0o600)
    
        return {
            "registered": True,
            "did": client.did,
            "credentials_path": str(creds_path),
            "message": "Identity registered and credentials saved.",
        }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/The-Nexus-Guard/aip-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server