Skip to main content
Glama
lkb2k

Gradle Tomcat MCP Server

by lkb2k

Gradle Tomcat MCP Server

A Model Context Protocol (MCP) server for managing Gradle-based Tomcat applications with log querying capabilities.

Features

  • Process Management: Start, stop, restart, and monitor Tomcat processes via Gradle

  • Log Management: Capture, store, and query application logs with filtering

  • Real-time Monitoring: Stream logs and process status updates

  • MCP Integration: Full integration with Claude and other MCP clients

Related MCP server: Gradle MCP Server

Installation

npm install -g mcp-gradle-tomcat

Local Installation

npm install mcp-gradle-tomcat

From Source

git clone https://github.com/your-username/mcp-gradle-tomcat.git
cd mcp-gradle-tomcat
npm install

Quick Start

1. Add to Claude Configuration

Add this to your Claude configuration file (~/.claude/config.json):

{
  "mcpServers": {
    "gradle-tomcat": {
      "command": "mcp-gradle-tomcat",
      "env": {
        "GRADLE_WORKING_DIR": "/path/to/your/gradle/project"
      }
    }
  }
}

2. Use with Claude

Once configured, you can use these commands in Claude:

  • "Start Tomcat" - Launches your Gradle application

  • "Stop Tomcat" - Gracefully stops the running application

  • "Get Tomcat status" - Shows process status and uptime

  • "Get recent logs" - Retrieves application logs with filtering

  • "Restart Tomcat" - Stops and starts the application

Manual Usage

Direct Execution

# Set your project directory
export GRADLE_WORKING_DIR="/path/to/your/gradle/project"

# Run the MCP server
mcp-gradle-tomcat

Testing Tools

# Test individual tools
npm test

Configuration

Configuration can be set via environment variables:

  • GRADLE_WORKING_DIR: Working directory for Gradle commands (default: current directory)

  • GRADLE_COMMAND: Gradle command to run (default: appRun)

  • TOMCAT_PORT: Expected Tomcat port (default: 8080)

  • MAX_LOG_BUFFER_SIZE: Maximum log entries in memory (default: 1000)

  • LOG_DIR: Directory for log files (default: ./logs)

Available Tools

start_tomcat

Launch Tomcat via Gradle

  • gradle_command (optional): Gradle command to run

  • working_directory (optional): Working directory

stop_tomcat

Terminate Tomcat process

  • force (optional): Force termination with SIGKILL

restart_tomcat

Stop and start Tomcat

  • force (optional): Force termination during stop

  • gradle_command (optional): Gradle command for restart

get_tomcat_status

Check Tomcat process status

  • No parameters

get_logs

Retrieve log entries

  • lines (optional): Number of recent log lines (default: 100)

  • level (optional): Minimum log level (DEBUG, INFO, WARN, ERROR)

  • since (optional): ISO 8601 timestamp to filter from

  • source (optional): Filter by source (stdout, stderr)

clear_logs

Clear log buffer and files

  • confirm (required): Must be true to confirm

Architecture

src/
├── server.js          # Main MCP server
├── process-manager.js # Tomcat lifecycle management  
├── log-manager.js     # Log capture and querying
├── tools/             # MCP tool implementations
└── config.js          # Configuration management

License

MIT

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables interaction with Gradle projects through the Gradle Wrapper, allowing users to list projects and tasks, execute builds, run tests, and clean artifacts with real-time progress reporting and comprehensive error details.
    Last updated
    7
    1
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Enables management of Hostinger services, allowing users to deploy WordPress sites, themes, and plugins, as well as manage JavaScript and static website deployments. It also provides tools for retrieving billing catalog items and monitoring application deployment logs.
    Last updated
    89,931
    MIT

View all related MCP servers

Related MCP Connectors

  • Build and manage Cloudgate workflow-APIs: controllers, actions, workflow graphs, and databases.

  • Deploy apps on your cloud. Create environments, configure infrastructure, and monitor jobs.

  • A MCP server built for developers enabling Git based project management with project and personal…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lkb2k/mcp-gradle'

If you have feedback or need assistance with the MCP directory API, please join our Discord server