MCP 2026-07-28 ("Modern") Servers
The MCP server Boot starters can expose your tools, resources, prompts and completions through a server that implements the 2026-07-28 MCP specification revision. This revision is a redesign of the protocol:
-
It is stateless. There is no initialize handshake and no session. Every request carries the protocol version and the client capabilities in its
_metablock, and the client learns what the server offers throughserver/discover. -
It is POST only. A request is answered with a JSON document, or with a short-lived
text/event-streamwhen the handler pushes progress notifications before its result. -
Server-initiated input (elicitation, sampling, roots) is a multi round-trip request (MRTR). A handler answers with an
InputRequiredResult, and the client retries the same call with the collectedinputResponsesand the server’s sealedrequestState. -
List-changed and resource-updated notifications are delivered over a dedicated
subscriptions/listenstream. -
Ping and in-call elicitation or sampling no longer exist.
-
Logging is deprecated and per request: a server may send log messages only on the stream of a request whose client asked for them, see Migration Notes.
The modern server is selected with spring.ai.mcp.server.protocol=MODERN and is available for WebMVC, WebFlux and STDIO.
The same annotated beans and `ToolCallback`s you use with the other protocols are served unchanged.
The modern server requires the MCP Java SDK 2.2.0 line or later.
Both API types are supported: spring.ai.mcp.server.type=SYNC (the default) serves blocking handler methods, type=ASYNC serves reactive ones, see The Asynchronous API Type.
|
WebMVC Server
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
</dependency>
spring:
ai:
mcp:
server:
protocol: MODERN
modern:
mcp-endpoint: /mcp
Configuration Properties
The common properties (spring.ai.mcp.server.name, version, instructions, type, capabilities., tool-callback-converter, tool-response-mime-type) and the MCP annotation scanner properties apply as they do for the other protocols.
spring.ai.mcp.server.type picks the programming model: SYNC (the default) registers the McpSync primitives and in-memory repositories, ASYNC their McpAsync* twins.
spring.ai.mcp.server.tool-callback-converter=false stops ToolCallback beans from being exposed as MCP tools.
It does not affect @McpTool, @McpResource, @McpPrompt or @McpComplete methods, which are controlled by the annotation scanner property spring.ai.mcp.server.annotation-scanner.enabled.
spring.ai.mcp.server.expose-mcp-client-tools=true re-exposes the tools of the application’s MCP clients; for modern client connections, see the warning about re-exposed tools first.
The following properties are specific to the modern server.
mcp-endpoint, keep-alive-interval and max-request-size apply to the WebMVC and WebFlux transports only, not to STDIO.
| Property | Description | Default |
|---|---|---|
|
The HTTP endpoint the server listens on (POST only). |
|
|
The protocol versions accepted in |
|
|
How long clients may cache the |
|
|
Who may reuse a cached |
|
|
How long clients may cache |
|
|
Who may reuse cached list results. |
|
|
Maximum number of entries per list page served by the in-memory repositories. Unset returns everything on one page. |
unset |
|
Interval between keep-alive comments on streaming responses. Zero disables keep-alives. |
|
|
Maximum accepted request body size. |
|
|
The secret used to seal the multi round-trip |
- |
|
How long a sealed |
|
|
Whether |
|
|
Whether the server advertises per-resource subscriptions ( |
|
Programming Model
Tools, Resources, Prompts and Completions
Beans with @McpTool, @McpResource, @McpPrompt and @McpComplete methods, as well as ToolCallback and ToolCallbackProvider beans, are exposed exactly as on the stateless server.
Methods keep their return types.
Results typed with the legacy McpSchema classes are converted to the modern schema on the way out, so one set of beans can serve both server generations.
The conversion is a compatibility floor, not a ceiling. Every primitive also accepts the modern types directly, and those pass through untouched:
| Primitive | Modern parameters | Modern return types |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
On type=ASYNC the notifier is McpAsyncNotifier and every return type may be wrapped in a Mono; see The Asynchronous API Type.
Use the modern types whenever a feature has no legacy equivalent: multi round-trip requests on any primitive, and per-response cache hints on resource reads.
For resources whose cache hints are static, set them on the annotation instead.
ttlMs (default 0, not cacheable) and cacheScope (default PRIVATE) are applied to every legacy return value the callback converts.
A method that returns a modern ReadResourceResult keeps the hints it built itself.
On a legacy server these attributes are ignored with a warning at startup.
@McpResource(uri = "catalog://products", ttlMs = 60_000, cacheScope = CacheScope.PUBLIC)
public String products() {
return catalog.asJson();
}
@McpResource(uri = "catalog://products", name = "products", description = "Product catalog")
public ReadResourceResult products(String uri) {
return ReadResourceResult.builder(List.of(TextResourceContents.builder(uri, loadCatalog()).build()))
.ttlMs(60_000)
.cacheScope(CacheScope.PUBLIC)
.build();
}
Bidirectional parameters of the session-based servers (McpSyncServerExchange, McpSyncRequestContext) are not available, as there is no session to call back on.
Methods that declare them are skipped with a warning.
Request Context
A tool, resource, prompt or completion method can declare a McpModernRequestContext parameter.
It gives access to the protocol version, the client capabilities and info, the request _meta, the progress token, the transport context and the multi round-trip fields.
Nothing in it blocks, so the same type serves sync and async methods; McpModernSyncRequestContext is an alias of it that sync methods may declare instead.
Declaring the context does not change the shape of the response: the method still answers with a plain JSON result.
Progress and Streaming Responses
On the modern protocol a handler chooses the shape of its response, a single result or a stream of notifications that ends with the result, and the server never turns one into the other.
Annotated methods make the same choice through their signature: a tool, resource or prompt method that declares the SDK McpSyncNotifier parameter is served as a streaming response (text/event-stream), and the notifications it pushes reach the client before the result.
A method without that parameter is a plain result, whatever else it declares.
Completion methods are always plain results and cannot declare the notifier.
@McpTool(name = "index", description = "Indexes the given paths")
public String index(McpSyncNotifier notifier, @McpToolParam(description = "paths") List<String> paths) {
for (int i = 0; i < paths.size(); i++) {
notifier.progress(i + 1, (double) paths.size(), paths.get(i));
index(paths.get(i));
}
return "Indexed " + paths.size() + " paths";
}
The shape is fixed by the signature, not by the request: a method that declares the notifier answers over text/event-stream on every call, as an SDK handler that returns McpSyncResponse.streaming does.
A progress notification is delivered only when the request carried a progressToken in _meta; McpModernRequestContext.progressToken() tells whether it did, and without one the stream carries the result alone.
Declare the notifier only where the method reports progress.
|
Multi Round-Trip Requests
To ask the client for input, return an InputRequiredResult from a tool, resource or prompt method.
The client retries the call with the answers, which the context exposes through inputResponses() and inputResponse(key, type); the latter returns null on the first call, before the client has answered.
The requestState you attach is sealed by the server and verified on retry, so it cannot be tampered with.
@McpTool(name = "book", description = "Books a table")
public CallToolOutcome book(McpModernRequestContext ctx, @McpToolParam(description = "guests") int guests) {
ElicitResult confirmation = ctx.inputResponse("confirm", ElicitResult.class);
if (confirmation == null) {
return InputRequiredResult.builder()
.elicit("confirm", ElicitFormRequest.builder("Book a table for " + guests + "?",
Map.of("type", "object", "properties", Map.of("ok", Map.of("type", "boolean")))).build())
.requestState("guests=" + guests)
.build();
}
boolean booked = confirmation.action() == ElicitResult.Action.ACCEPT
&& Boolean.TRUE.equals(confirmation.content().get("ok"));
return CallToolResult.builder().addContent(TextContent.builder(booked ? "Booked" : "Not booked").build()).build();
}
The answer to an elicitation is an ElicitResult, so a method checks its action before it acts: the user may also decline or cancel.
Methods that only need the raw fields can declare the modern request type (CallToolRequest, ReadResourceRequest or GetPromptRequest) instead of the context.
Required Client Capabilities
A modern client declares its capabilities in every request, and a server may only ask for input whose capability the request declares.
Declare the capabilities a method cannot work without in requiredCapabilities on @McpTool, @McpResource or @McpPrompt:
@McpTool(name = "summarize", description = "Asks the client's model for a summary",
requiredCapabilities = McpClientCapability.SAMPLING)
public CallToolOutcome summarize(McpModernRequestContext ctx) {
...
}
The server checks the attribute before the method runs and answers a request that lacks any of the capabilities with JSON-RPC error -32021 Missing required client capability, listing the missing ones.
The method does not run, and a method that declares McpSyncNotifier does not open a stream.
Input the method can do without needs no entry; ask for it only when ctx.clientCapabilities() declares it, for example supportsSampling(), and fall back otherwise.
A method that returns an InputRequiredResult asking for an undeclared capability is still answered with -32021, but only after it has run.
The first time this happens for a method, a warning recommends the attribute.
A method that declares requiredCapabilities but returns a type that cannot carry an InputRequiredResult is reported with a warning at startup.
The attribute covers roots, sampling and form and URL elicitation; a method that depends on an experimental or extension capability is registered programmatically with the SDK ClientCapabilities.
The legacy servers ignore the attribute with a warning, as they do for the resource cache hints.
The Asynchronous API Type
spring.ai.mcp.server.type=ASYNC switches the annotated methods, the repositories and the ToolCallback adapter to their reactive twins.
A method may return a Mono, a CompletableFuture or CompletionStage, or a Publisher of any return type the sync model accepts, modern or legacy.
An MCP request has one result, and that sets the rule for streams.
A method declared to return a Flux is rejected at startup; return a Mono of the result instead, for example a Mono<List<String>> or a Mono<CompleteResult>.
A method declared to return a Publisher or Object is resolved from the value it returns, so a Mono behind either of them is a single value, and a publisher that emits more than one element fails the call rather than losing elements.
A tool reports the failure as an error result, and a resource, prompt or completion answers -32603.
A method pushes progress by declaring the SDK McpAsyncNotifier, whose methods return Mono<Void>; as with McpSyncNotifier, that parameter alone makes the response a stream.
The request context is the same McpModernRequestContext.
@McpTool(name = "index", description = "Indexes the given paths")
public Mono<String> index(McpAsyncNotifier notifier, @McpToolParam(description = "paths") List<String> paths) {
return Flux.range(0, paths.size())
.concatMap(i -> notifier.progress(i + 1, (double) paths.size(), paths.get(i)).then(index(paths.get(i))))
.then(Mono.just("Indexed " + paths.size() + " paths"));
}
A plain, blocking return type is accepted on the async server too.
The method then runs through McpModernAsyncUtils.fromBlocking: on the calling thread when the request is served blocking (the WebMVC transport), and on Reactor’s boundedElastic scheduler otherwise, so a WebFlux event loop is never blocked.
ToolCallback beans are wrapped the same way.
The sync server, on the other hand, skips methods with an asynchronous return type (a Mono, Flux or other Publisher, or a CompletionStage) with a warning.
A method that declares the notifier of the other programming model is skipped with a warning as well, and rejected when its callback is built directly.
The async server serves the same primitives from the asynchronous repositories: McpAsyncToolRepository, McpAsyncResourceRepository and McpAsyncPromptRepository, backed by default by InMemoryAsyncToolRepository, InMemoryAsyncResourceRepository and InMemoryAsyncPromptRepository, and fed by the McpAsyncTool, AsyncResourceRegistration, AsyncResourceTemplateRegistration and McpAsyncPrompt list beans described below.
The type property only picks these defaults: a repository bean of either flavour is served on either type, which lets a type=SYNC application serve one primitive from a non-blocking repository.
A sync and an async repository bean for the same primitive fail the application at startup.
A repository reads only the list beans of its own flavour.
List beans of the other type, for example a List<McpSyncTool> on type=ASYNC, fail the application at startup when the in-memory repository serves the primitive.
Next to an application-defined repository of the other flavour, for example the annotated methods on type=ASYNC next to a McpSyncToolRepository bean, the server starts and logs a warning, because such a repository may serve a catalogue of its own on purpose.
The transports are the same for both types.
The WebFlux transport is non-blocking end to end on type=ASYNC; the WebMVC transport subscribes on the container thread and waits for the result, as it does for sync handlers, so McpRequestContext.isBlocking() is true there.
|
Runtime Changes and Subscriptions
Each primitive is served by an SDK repository bean: McpSyncToolRepository, McpSyncResourceRepository and McpSyncPromptRepository.
A repository lists definitions and finds a definition together with its handler: McpSyncTool, McpSyncPrompt and McpSyncResource are the SDK’s pairs of definition and handler, and the server validates the request and dispatches to the handler itself.
Unless you define a bean of that type yourself, the auto-configuration registers an in-memory repository per primitive (InMemorySyncToolRepository, InMemorySyncResourceRepository, InMemorySyncPromptRepository) and the McpChangeFeed that backs subscriptions/listen.
Inject an in-memory repository to add or remove primitives at runtime; the matching list-changed notification is broadcast to listening clients.
Call InMemorySyncResourceRepository.resourceUpdated(uri) to notify subscribers of a resource change.
On type=ASYNC the in-memory repositories are InMemoryAsyncToolRepository, InMemoryAsyncResourceRepository and InMemoryAsyncPromptRepository, with the same add, remove and resourceUpdated(uri) methods.
The Primitive List Beans
The annotated methods and the ToolCallback beans do not reach the server directly.
The auto-configuration publishes them as list beans of the SDK primitive types, and the in-memory repositories are built from those lists.
The lists are the contract between the scanning side and the repository side: a repository you define yourself can build on the same lists, as the wrapper in Filtering per Caller does, and a list bean you define yourself is merged into the in-memory repository.
| Bean type | Produced from | Consumed by |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
SyncResourceRegistration and SyncResourceTemplateRegistration pair a resource or template definition with its McpSyncResource, which carries no definition of its own.
On type=ASYNC the contract is the same with the asynchronous twins: List<McpAsyncTool> (beans modernAsyncTools and modernAsyncToolCallbacks), List<AsyncResourceRegistration> (modernAsyncResources), List<AsyncResourceTemplateRegistration> (modernAsyncResourceTemplates) and List<McpAsyncPrompt> (modernAsyncPrompts), consumed by the InMemoryAsync*Repository beans.
There can be several beans of each list type, so inject them as ObjectProvider<List<McpSyncTool>> and flatten, as the examples below do.
@Autowired InMemorySyncToolRepository tools;
void addLater() {
tools.add(McpSyncTool.of(
Tool.builder("late", Map.of("type", "object")).description("Added at runtime").build(),
(ctx, request) -> McpSyncResponse.result(
CallToolResult.builder().addContent(TextContent.builder("late").build()).build())));
}
Completions
Completions have no list bean and no repository of their own.
A completion handler travels with the prompt or resource template it completes, and the prompt and resource repositories serve completion/complete from it.
Each @McpComplete method is attached to the @McpPrompt method or @McpResource template that it names, and the application fails to start when there is none; a static resource has no variables, so naming its URI fails as well.
A completion whose prompt or template method is skipped, for example a method with an asynchronous return type on type=SYNC, is skipped too, with a warning.
One method completes every argument of its prompt or template and reads the argument from CompleteRequest.argument().name().
A prompt or template defined in code takes its handler through withCompletionHandler, on McpSyncPrompt or SyncResourceTemplateRegistration (and their asynchronous twins):
@Bean
List<SyncResourceTemplateRegistration> cityResources() {
return List.of(SyncResourceTemplateRegistration
.of(ResourceTemplate.builder("weather://{city}", "weather").build(), this::readWeather)
.withCompletionHandler((ctx, request) -> CompleteResult.of(
new CompleteResult.Completion(cities.startingWith(request.argument().value())))));
}
The server answers -32602 for a prompt or template it does not know and for an argument the prompt or template does not declare, and no values for a prompt or template without a handler.
spring.ai.mcp.server.capabilities.completion=false builds the in-memory prompt and resource repositories with completionSupported(false), and the server then neither advertises completions nor answers completion/complete.
| For an application that registers completions as in Spring AI 2.1.0-RC2, see Upgrade Notes. |
Filtering per Caller
To show each caller a different subset without giving up the annotated catalogue, define a repository bean of your own that builds the in-memory repository from the same list beans the auto-configuration would use, and wraps it.
The auto-configured in-memory repository backs off because a McpSyncToolRepository bean exists.
A wrapper that filters list and returns null from find hides a primitive completely: it is not listed, and a call, read or get for it answers Unknown tool, Unknown resource or Unknown prompt (-32602), as for a primitive that does not exist.
The transport context the wrapper receives through McpRequestContext is empty unless a McpTransportContextExtractor<ServerRequest> bean fills it (see Customizing the Server and the Transport).
The example below reads X-Role through McpTransportContexts.header(ctx, name), so it needs an extractor that copies that header:
@Bean
McpTransportContextExtractor<ServerRequest> roleHeaderExtractor() {
return request -> McpTransportContexts.fromHeaders(List.of("X-Role"), request.headers().asHttpHeaders()::get);
}
A header is only as trustworthy as whatever sets it: a client can send any X-Role it likes, so a filter like this one belongs behind a gateway or a security filter that overwrites the header after authenticating the caller.
@Bean
McpSyncToolRepository toolRepository(ObjectProvider<List<McpSyncTool>> tools, McpChangeFeed changes) {
McpSyncToolRepository inMemory = InMemorySyncToolRepository.builder()
.tools(tools.stream().flatMap(List::stream).toList())
.changeBroadcaster(changes)
.build();
return new McpSyncToolRepository() {
@Override
public ToolsPage list(McpRequestContext ctx, String cursor) {
ToolsPage page = inMemory.list(ctx, cursor);
List<Tool> allowed = page.tools().stream().filter(tool -> allowed(ctx, tool)).toList();
return new ToolsPage(allowed, page.nextCursor(), page.ttlMs(), CacheScope.PRIVATE);
}
@Override
public McpSyncTool find(McpRequestContext ctx, String name) {
McpSyncTool tool = inMemory.find(ctx, name);
return tool != null && allowed(ctx, tool.definition()) ? tool : null;
}
private boolean allowed(McpRequestContext ctx, Tool tool) {
return "admin".equals(McpTransportContexts.header(ctx, "x-role")) || !tool.name().startsWith("admin_");
}
};
}
The ObjectProvider collects every List<McpSyncTool> bean, so the wrapper serves the annotated tools and the ToolCallback`s alike.
A listing that depends on the caller must be returned with `cacheScope: private, as above, so that a shared cache never serves one caller’s view to another.
A wrapper that filters a page after the repository has paged it can return a short page; filter before paging, or leave spring.ai.mcp.server.modern.page-size unset so that everything is served on one page.
Resource subscriptions on subscriptions/listen are matched by the SDK without consulting the repository, so a hidden resource’s update notifications still reach a client that subscribed to its URI.
To narrow them per caller as well, set a SubscriptionRestriction with restrictSubscriptions(…) in a McpServerCustomizer<McpServer.Builder>.
supportsCompletion(), and on a resource repository findTemplate, are default methods of the SDK interfaces, so a prompt or resource wrapper must delegate them or it silently turns completion off.
In return, a prompt that the wrapper hides from find, or a template it hides from findTemplate, is hidden from completion too.
|
Custom Repositories
To back a primitive with your own store (a database, a remote catalog, a tool gateway), implement the SDK repository interface and define it as a bean.
The interfaces have two methods, list and find; the resource repository adds listTemplates and supportsSubscribe, and find(ctx, uri) serves listed resources and template matches alike.
The prompt and resource repositories serve completion/complete only when supportsCompletion() returns true.
The completion handler of a prompt comes from the McpSyncPrompt that find returns, and that of a resource template from the McpSyncResourceTemplate that findTemplate(ctx, uriTemplate) returns.
supportsCompletion() and findTemplate are default methods that leave completion off, so a prompt repository that completes its prompts overrides supportsCompletion(), and a resource repository that completes its templates overrides both.
The in-memory repository for that primitive backs off and the primitive lists are no longer collected for it, so your repository is the single source of truth.
Repositories for the other primitives are unaffected.
The list ttlMs and cacheScope of a page left null come from spring.ai.mcp.server.modern.list-ttl and list-cache-scope.
@Component
public class CatalogToolRepository implements McpSyncToolRepository {
private final ToolCatalog catalog;
public CatalogToolRepository(ToolCatalog catalog) {
this.catalog = catalog;
}
@Override
public ToolsPage list(McpRequestContext ctx, String cursor) {
ToolCatalog.Page page = catalog.page(tenant(ctx), cursor, 100);
return new ToolsPage(page.tools(), page.nextCursor(), null, CacheScope.PRIVATE);
}
@Override
public McpSyncTool find(McpRequestContext ctx, String name) {
ToolCatalog.Entry entry = catalog.find(tenant(ctx), name); // definition + handler, on call
return entry != null ? McpSyncTool.of(entry.tool(), entry::call) : null;
}
private String tenant(McpRequestContext ctx) {
return McpTransportContexts.header(ctx, "x-tenant");
}
}
A McpSyncTool or McpSyncPrompt can also declare the client capabilities it cannot work without, with of(definition, requiredCapabilities, handler), the programmatic counterpart of the requiredCapabilities attribute; the server answers a client that did not declare them with -32021 before the handler runs.
A McpSyncResource takes them with of(requiredCapabilities, handler), and SyncResourceRegistration.of(resource, requiredCapabilities, handler) and SyncResourceTemplateRegistration.of(…) do the same for registered resources.
A repository that implements one of the asynchronous SDK interfaces (McpAsyncToolRepository, McpAsyncResourceRepository, McpAsyncPromptRepository) is served the same way, on either type; its list and find return Mono`s, and an empty `find means "not found".
Customizing the Server and the Transport
-
A
McpServer.Buildercan be customized before the server is built with aMcpServerCustomizer<McpServer.Builder>. Use it to add extension features or to replace the request state codec. -
Transport builders can be customized using
McpServerCustomizer<WebMvcModernServerTransport.Builder>andMcpServerCustomizer<WebFluxMcpTransport.Builder>. -
All matching customizer beans are applied, ordered by
@OrderorOrdered. -
A
RequestStateCodecbean replaces the HMAC codec configured from the properties. -
The HTTP transports validate the headers of every request with the SDK’s
DefaultServerTransportSecurityValidatorby default, which allows no origin, so it answers403to every request that carries anOriginheader, for example a request from a browser page. AServerHttpHeaderValidatorbean replaces it, for example aDefaultServerTransportSecurityValidatorbuilt with the allowed origins and hosts, orServerHttpHeaderValidator.NOOPto turn the check off. -
The
McpTransportContextthat handlers, repositories andToolCallback`s see is empty by default: no request header, cookie or credential reaches them unless the application puts it there. A `McpTransportContextExtractor<ServerRequest>bean derives the context from the incoming request;McpTransportContexts.fromHeaders(names, request.headers().asHttpHeaders()::get)copies named headers underMcpTransportContexts.HEADERS, whereMcpTransportContexts.header(ctx, name)reads them. On WebMVC the extractor is also the place to resolve the caller once, for example fromServerRequest.principal(), and store a principal instead of raw headers. On WebFlux the extractor runs on the event loop andServerRequest.principal()returns aMono, so the principal cannot be resolved there without blocking. To bind the sealedrequestStateto that principal too, define aRequestStateCodecbean built withHmacRequestStateCodec.builder().principalExtractor(…); the auto-configured codec binds the state to the method and primitive only. -
The transports are plain
WebMvcModernServerTransportandWebFluxMcpTransportbeans and can be built manually from aMcpRequestManagerwhen more control is needed.
Migration Notes
Compared to the session-based servers:
-
ctx.elicit(…),ctx.sample(…),ctx.roots()andctx.ping()have no direct equivalent. Elicitation, sampling and roots are multi round-trip requests;pingis gone. -
Logging is deprecated and per request: the client opts in with the
io.modelcontextprotocol/logLevelkey of the request_meta, whichMcpModernRequestContext.requestMeta()exposes. A method that declares the notifier may then send log messages on that request’s stream withnotifier.notify(McpSchema.METHOD_NOTIFICATION_MESSAGE, new McpSchema.LoggingMessageParams(…)). -
Progress requires a streaming response, which a method opts into by declaring
McpSyncNotifier(McpAsyncNotifierontype=ASYNC);McpModernRequestContextcarries the request data only. -
type=ASYNCis supported: reactive methods return `Mono`s, and blocking ones are moved off the event loop; see The Asynchronous API Type. -
Clients must send the
Mcp-Method,MCP-Protocol-Versionand, fortools/call,prompts/getandresources/read, theMcp-Nameheader consistent with the body. Requests that disagree are rejected with JSON-RPC error-32020. -
server/discoverreplacesinitialize; its caching hints and the list caching hints are controlled by the properties above.