Any MCP Client

Provides an MCP client that connects to MCP servers for AI-powered chat using Spring AI with Anthropic or OpenAI models.
  • other

44

GitHub Stars

other

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ogulcanarbc-spring-ai-mcp-client": {
      "command": "node",
      "args": [
        "any-mcp-server/build/index.js"
      ]
    }
  }
}

The MCP client enables you to connect an AI-powered chat experience to MCP servers using Spring AI. It negotiates protocol versions, discovers capabilities, transports messages via JSON-RPC, and supports multiple models (OpenAI and Anthropic). This makes it easy to run an MCP-enabled chat client that adapts to different servers and features.

How to use

You run the MCP client and connect to a configured MCP server. The client negotiates protocol compatibility, discovers available features, and then uses the server to handle chat messages. You can access the chat endpoint to start conversations and leverage tools exposed by the MCP server for advanced interactions.

How to install

Prerequisites you need before installing the MCP client: Java 17 or newer, and either Maven or Gradle for building the project. Docker is optional if you want to run the server in a container. You also need API keys for the AI providers you want to use (Anthropic or OpenAI).

Steps to install and run the MCP client locally:

# 1. Clone the MCP client repository
git clone <repo-url>
cd spring-ai-mcp-client

# 2. Prepare MCP server configuration (see next snippet)

Configuration and run flow

Configure the MCP server connection and client behavior using the provided configuration files. The server connection is defined in a JSON file that lists the MCP server entry, including how to start the server. The client configuration specifies the MCP server name, protocol details, and integration with Spring AI.

{
  "mcpServers":{
    "any-mcp-server":{
      "command":"node",
      "args":[
        "any-mcp-server/build/index.js"
      ]
    }
  }
}

Run the application

Build and run the application using Maven. This starts the Spring Boot application that hosts the MCP client.

mvn clean install
mvn spring-boot:run

Usage endpoint and example requests

Once the application is running, you can access the chat endpoint to initiate conversations.

# Access the chat endpoint
curl -X GET "http://localhost:8081/ai?message=Hello" -H "Accept: application/json"

Notes and considerations

This client supports multiple models and handles protocol negotiation, capability discovery, and tool execution. Ensure your API keys for Anthropic or OpenAI are set in the appropriate configuration properties before starting the application.

Available tools

versionNegotiation

Negotiate protocol version to ensure compatibility between the MCP client and the server.

capabilityNegotiation

Determine and adapt to the features supported by the connected MCP server.

jsonRpcTransport

Handle message transport using JSON-RPC to exchange requests and responses.

toolDiscovery

Discover available tools exposed by the MCP server and enable their use in conversations.

resourceManagement

Manage access to resources required during a chat session.

promptSystem

Interact with the prompt system to shape and guide AI responses.

rootsManagement

Optional feature to manage root contexts for conversations.

samplingSupport

Optional feature to enable sampling behavior in responses.

modelSupport

Support for OpenAI and Anthropic models within conversations.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational