jamesward
MCP Serverjameswardpublic

mcp agent spring ai

提供一个运行在ECS上的Spring AI MCP服务器和客户端的示例。

Repository Info

1
Stars
0
Forks
1
Watchers
0
Issues
Kotlin
Language
-
License

About This Server

提供一个运行在ECS上的Spring AI MCP服务器和客户端的示例。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Sample: MCP Agent with Spring AI and Bedrock

Provides a sample Spring AI MCP Server that runs on ECS; which is used by a Spring AI Agent using Bedrock; which also runs on ECS and is exposed publicly via a Load Balancer.

flowchart LR
    subgraph aws[AWS]
        alb[Application Load Balancer]
        
        subgraph vpc[VPC]
            server[MCP Server - ECS Service]
            client[MCP Client / Bedrock Agent - ECS Service]
        end
        
        subgraph services[AWS Services]
            bedrock[Bedrock]
        end
    end
    
    internet((Internet))
    
    %% Connections
    internet <--> alb
    alb --> client
    client <--> bedrock
    client <--> server

    %% Styling
    style aws fill:#f5f5f5,stroke:#232F3E,stroke-width:2px
    style vpc fill:#E8F4FA,stroke:#147EBA,stroke-width:2px
    style services fill:#E8F4FA,stroke:#147EBA,stroke-width:2px

    style alb fill:#FF9900,color:#fff,stroke:#FF9900
    style server fill:#2196f3,color:#fff,stroke:#2196f3
    style client fill:#2196f3,color:#fff,stroke:#2196f3
    style bedrock fill:#FF9900,color:#fff,stroke:#FF9900
    style internet fill:#fff,stroke:#666,stroke-width:2px

    %% Link styling
    linkStyle default stroke:#666,stroke-width:2px

Setup

  1. Setup Bedrock in the AWS Console, request access to Nova Pro
  2. Setup auth for local development

Run Locally

Start the MCP Server:

./gradlew :server:bootRun

Start the MCP Client / Agent:

./gradlew :client:bootRun

Make a request to the server REST endpoint:

In IntelliJ, open the client.http file and run the request.

Or via curl:

curl -X POST --location "http://localhost:8080/inquire" \
    -H "Content-Type: application/json" \
    -d '{"question": "Get employees that have skills related to Java, but not Java"}'

Run on AWS

Prereqs:

  • Create an ECR Repo named mcp-agent-spring-ai-server and one named mcp-agent-spring-ai-client
  • Auth docker to ECR
  • Install Rain

Build and push the MCP Server & MCP Client to ECR:

export ECR_REPO=<your account id>.dkr.ecr.us-east-1.amazonaws.com

./gradlew :server:bootBuildImage --imageName=$ECR_REPO/mcp-agent-spring-ai-server

docker push $ECR_REPO/mcp-agent-spring-ai-server:latest


./gradlew :client:bootBuildImage --imageName=$ECR_REPO/mcp-agent-spring-ai-client

docker push $ECR_REPO/mcp-agent-spring-ai-client:latest

Deploy the Agent:

rain deploy infra.cfn mcp-agent-spring-ai

End-to-end Test with curl:

curl -X POST --location "http://YOUR_LB_HOST/inquire" \
-H "Content-Type: application/json" \
-d '{"question": "Get employees that have skills related to Java, but not Java"}'

Quick Start

1

Clone the repository

git clone https://github.com/jamesward/mcp-agent-spring-ai
2

Install dependencies

cd mcp-agent-spring-ai
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerjamesward
Repomcp-agent-spring-ai
LanguageKotlin
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation