Skip to content

Add support for Secured Agents#127

Merged
alexheifetz merged 1 commit intomainfrom
secured-agents
Mar 24, 2026
Merged

Add support for Secured Agents#127
alexheifetz merged 1 commit intomainfrom
secured-agents

Conversation

@alexheifetz
Copy link
Contributor

This pull request adds a new secured agent MCP server example to the examples-kotlin project, demonstrating OAuth2 JWT-based security for agent endpoints. It introduces a new MarketIntelligenceAgent with fine-grained authority requirements, provides a secure profile and configuration, and includes local JWT key generation and validation setup.

Security and configuration enhancements:

  • Added a new Maven dependency on embabel-agent-mcp-security in examples-common/pom.xml to enable security features.
  • Introduced a new Spring Boot profile constant SECURED_PROFILE in McpServers.kt for activating secured configuration.
  • Added application-secured.yml with OAuth2 JWT resource server configuration, server port, and application metadata for the secured profile.

Secured agent server and agent implementation:

  • Added KotlinAgentSecuredMcpServerApplication.kt, a new Spring Boot application entry point that runs the secured MCP server with Docker and JWT security profiles.
  • Implemented MarketIntelligenceAgent.kt, a new agent requiring the market:admin authority, which produces structured market intelligence reports with a multi-step LLM pipeline and detailed data classes for report structure.

Local JWT key management and testing:

  • Added a keys directory with instructions (README.txt) and a sample public key (public.pem) for local JWT validation; included a Python script (generate_token.py) to generate test JWTs using the private key. [1] [2] [3]

Build configuration:

  • Added a new Maven profile enable-secured-agent-mcp-server in examples-kotlin/pom.xml to build and run the secured agent server example, including required dependencies and main class setup.

@alexheifetz alexheifetz merged commit d07da8d into main Mar 24, 2026
6 checks passed
@alexheifetz alexheifetz deleted the secured-agents branch March 24, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant