mcp-kotlin

mcp-kotlin

3.1

If you are the rightful owner of mcp-kotlin and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP-Kotlin Server is a versatile server implementation in Kotlin that supports both A2A and MCP protocols, designed to facilitate agentic applications with multiple connection methods.

MCP-Kotlin Server

A flexible MCP (Model Context Protocol) server implementation in Kotlin that supports both A2A and MCP protocols.
This agent is built using a2ajava library, which is a "swiss knife" for building agentic applications in multiple languages such as Java and Kotlin, supporting multiple protocols.

Features

  • Dual protocol support (A2A and MCP)
  • Multiple connection methods
  • Standard MCP compliance
  • Extensible agent system
  • Built-in example agents (Route Planner, Weather Agent)

Connection Options

1. Direct URL Connection

This works with visual studio agent for tools calling

{
    "routeplanningagent": {
        "url": "http://localhost:8080"       
    }
}

2. Pure Java Connection

{
    "routeplanningagent": {
        "command": "java",
        "args": [
            "-jar",
            "/work/a2a-mcp-bridge/target/mcp-connector-full.jar",
            "http://localhost:8080"
        ],
        "timeout": 30000
    }
}

3. Custom NodeJS Connection

{
    "routeplanningagent": {
        "command": "node",
        "args": [
            "/work/mcp-kotlin/src/main/resources/mcpserver.js"
        ]
    }
}

4. Pass-through NodeJS Connection

{
    "routeplanningagent": {
        "command": "node",
        "args": [
            "/work/mcp-kotlin/src/main/resources/a2ajava.cjs",
            "http://localhost:8080"
        ],
        "timeout": 30000
    }
}

MCP Server Endpoints

Core Endpoints

List Tools
GET /v1/tools

Lists all available tools with their schemas. Returns a JSON object with a "tools" array.

Call Tool
POST /v1/tools/call

Executes a specific tool with given parameters. Accepts a JSON body with "name", "parameters", and "request_id".

Screenshots

Tool Integration Overview

Shows the integration between the MCP server and Claude's interface.

Tool Calling Process

Demonstrates the process flow of how tools are called from the client to the server.

Call Tool Example

Illustrates an example of a tool being called with specific parameters.

Claude Chat Integration

Shows how the MCP server integrates with Claude's chat interface.

Claude Tools Interface

Displays the available tools in Claude's interface.

Tool Listing

Shows the list of available tools returned by the /v1/tools endpoint.

Getting Started

  1. Clone the repository
  2. Build the project using Gradle
  3. Configure your connection method
  4. Start the server
  5. Test the endpoints using provided example agents

License

This project is licensed under the terms provided in the LICENSE file.