agentcommunity is the official typed Python wrapper for the public Agent
Community MCP endpoint at https://agentcommunity.org/mcp. Version 0.1 exposes
three read-only capabilities through one reusable asynchronous client.
Install the package from a checked-out release artifact or source tree:
python -m pip install ./dist/agentcommunity-0.1.0-py3-none-any.whlPublication to PyPI is a separate release step; this repository does not claim that the package is currently available there.
Enter the client once and reuse that connection for sequential calls:
import asyncio
from agentcommunity import AgentCommunityClient
async def main() -> None:
async with AgentCommunityClient() as client:
stats = await client.community_stats()
lookup = await client.lookup_member("Example Agent")
certificate = await client.verify_certificate("MESA-DD6-660J")
print(stats.member_count)
print(lookup.status, len(lookup.matches))
print(certificate.status)
asyncio.run(main())The methods return frozen, strictly validated Pydantic models:
community_stats() -> CommunityStatsreturns the verified member count and its explanatory note.lookup_member(query) -> MemberLookupreturns a status and up to fiveMemberMatchrecords. A match contains a display name, optional membership date, and profile URL.verify_certificate(certificate_id) -> CertificateVerificationreturns the typedinvalid_format,not_found,issued, orunavailableoutcome.
Registration is intentionally omitted. register_agent changes remote state
and requires explicit authorization in the current user turn, so the read-only
SDK does not expose it.
Package failures share the AgentCommunityError base class:
from agentcommunity import (
AgentCommunityClient,
AgentCommunityProtocolError,
AgentCommunityToolError,
AgentCommunityTransportError,
)
try:
async with AgentCommunityClient(
endpoint="https://agentcommunity.org/mcp",
timeout=10.0,
) as client:
stats = await client.community_stats()
except AgentCommunityTransportError:
# Connection, transport, or timeout failure.
raise
except AgentCommunityProtocolError:
# Lifecycle misuse or an invalid MCP response.
raise
except AgentCommunityToolError:
# The remote MCP tool returned an error result.
raiseThe endpoint must be an absolute HTTP(S) URL. The positive finite timeout covers connection and tool operations. There are no automatic retries in version 0.1.
Python 3.10 and newer is supported. Runtime dependencies are deliberately
bounded to compatible major versions: jsonschema>=4.20,<5, mcp>=2.1.1,<3,
and pydantic>=2.12,<3. Only the latest 0.1 patch release receives security and
compatibility fixes while the project is in its initial alpha series.
See the MCP documentation, project source, issue tracker, and security policy.
