Skip to content

Local Development (Java)

🐍 Looking for Python? See Python Local Development | 📘 Looking for TypeScript? See TypeScript Local Development

Develop MCP Mesh agents locally with Java/Spring Boot

Development Workflow

graph LR
    A[Install] --> B[Scaffold]
    B --> C[Run]
    C --> D[Call & Debug]
    D --> C

Guides

Guide What You'll Learn
Getting Started Install meshctl CLI and set up a Java project
Scaffold Agents Generate agents with meshctl scaffold
Run Agents Start agents with debug mode, hot reload
Inspect the Mesh View agents, tools, and dependencies
Call & Debug Tools Call tools and trace distributed calls
Troubleshooting Java-specific issues and solutions

Quick Reference

# Install CLI
npm install -g @mcpmesh/cli

# Scaffold a Java agent (interactive wizard)
meshctl scaffold

# Or non-interactive
meshctl scaffold --name hello --agent-type basic --lang java

# Run (recommended)
meshctl start hello/
meshctl start -w hello/                # hot reload
meshctl start --debug hello/           # debug mode

# Inspect
meshctl list                           # agents
meshctl list --tools                   # all tools
meshctl status                         # wiring details

# Call
meshctl call greeting '{"name":"World"}'
meshctl call --trace greeting          # with tracing

# Debug
meshctl trace <trace-id>               # view call tree
meshctl logs my-agent -f               # follow logs
meshctl man --list                     # built-in docs