Explore the deployed live demo:
https://vishalmysore-a2amcpdemo.hf.space/.well-known/agent.json
a2ajava is a powerfull agentic sdk, which is swiss knife to build agentic applicaiton , annotation-based Java library built to implement Agent-to-Agent (A2A) protocol and also
Model Context Protocol (MCP). It enables the exposure of secure, semantically described agents over JSON-RPC with minimal configuration.
You can see the project a2ajava here
@PreAuthorizeIt bridges the gap between Java backend services and AI agents needing structured capability descriptions.
Run these curl commands to explore dynamic access control using A2A + MCP + Security:
curl -u user:password https://vishalmysore-a2amcpdemo.hf.space/.well-known/agent.json
Returns a list of user-accessible tools like booking cars or checking status.
curl -u admin:admin https://vishalmysore-a2amcpdemo.hf.space/.well-known/agent.json
Includes advanced capabilities like canceling bookings or scheduling maintenance.
curl https://vishalmysore-a2amcpdemo.hf.space/.well-known/agent.json
Returns only tools publicly exposed without login.
curl -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":9}' https://vishalmysore-a2amcpdemo.hf.space/
curl -u user:password -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":9}' https://vishalmysore-a2amcpdemo.hf.space/
curl -u admin:admin -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":9}' https://vishalmysore-a2amcpdemo.hf.space/
curl -u admin:admin -H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "cancelCarBooking",
"arguments": {
"provideAllValuesInPlainEnglish": {
"arg0": "2233"
}
}
},
"id": 25
}' \
https://vishalmysore-a2amcpdemo.hf.space/
curl -u user:password -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"bookCar","arguments":{"provideAllValuesInPlainEnglish":{"arg0":"sedan","arg1":"toronto","arg2":"vancouver"}}},"id":1}' \
https://vishalmysore-a2amcpdemo.hf.space/
Explore the full source code, setup instructions, and more at: