* Initial plan
* Add MCP Playground page to web UI with tool discovery and calling
- Add playground.html template with chat-style agent prompt interface
- Add /playground route handler in server
- Add /api/mcp/tools endpoint to list available MCP tools
- Add /api/mcp/call endpoint to invoke MCP tools via RPC
- Add Playground link to sidebar navigation
- Playground auto-discovers services from registry and renders them as
callable tools with input forms and activity logging
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add playground.html template and fix .gitignore micro pattern
Fix .gitignore pattern 'micro' -> '/micro' to only ignore root-level
binary, not paths containing 'micro' as a component.
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Address code review: use crypto/rand for trace IDs, fix var redecl, remove dup comment
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Rename Playground to Agent, fix styling, add LLM-powered prompt
- Rename /playground to /agent, move Agent link to top of sidebar menu
- Fix template styling: use existing form/input/button CSS from styles.css
instead of inline styles and form-plain class
- Add /api/agent/settings GET/POST endpoints for model API key, model
name, and base URL configuration (stored in server store)
- Add /api/agent/prompt POST endpoint that sends user prompt to
OpenAI-compatible LLM API with tool definitions from registry,
executes any tool calls via RPC, and returns results with a
follow-up LLM summary
- Show available tools in a table using existing table styles
- Prompt section is placed above settings for primary workflow
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Address code review: handle unmarshal errors, extract system prompt, improve param descriptions
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add Anthropic model support to the agent
Support both OpenAI and Anthropic APIs in the agent prompt handler:
- Add provider selector (OpenAI/Anthropic) to settings UI and backend
- Auto-detect provider from base URL when not explicitly set
- Anthropic: use /v1/messages endpoint, x-api-key header, input_schema
format for tools, content blocks for responses, tool_use/tool_result
message format for follow-ups
- OpenAI: unchanged /v1/chat/completions with Bearer auth
- Default models: gpt-4o (OpenAI), claude-sonnet-4-20250514 (Anthropic)
- Provider-specific defaults for base URLs
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Remove duplicate Anthropic follow-up message construction
Co-authored-by: asim <17530+asim@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
Implement Q2 2026 roadmap items for AI-native microservices:
MCP stdio transport:
- JSON-RPC 2.0 over stdio for Claude Code integration
- Methods: initialize, tools/list, tools/call
- Auto-detection: stdio (no address) vs HTTP/SSE (with address)
micro mcp command:
- 'micro mcp serve' - start MCP server (stdio or HTTP)
- 'micro mcp list' - list available tools
- 'micro mcp test' - test a tool (placeholder)
- Enables Claude Code users to add microservices as tools
Gateway refactor:
- Created gateway/api package (reusable, 150 lines)
- Moved gateway logic from cmd/micro/server/gateway.go
- HandlerRegistrar pattern for flexibility
- cmd/micro/server/gateway.go now compatibility wrapper (72 lines)
- 50% code reduction, better separation of concerns
- Library users can now use gateway in custom apps
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Major Features:
- Unified gateway architecture (micro run + micro server use same code)
- MCP (Model Context Protocol) integration as library package
- AI-accessible microservices with 3 lines of code
Gateway Unification:
- Created reusable gateway module (cmd/micro/server/gateway.go)
- Updated micro run to use unified gateway (removed duplicate code)
- Conditional authentication (disabled in dev, required in prod)
- Reduced code duplication, simplified maintenance
MCP Integration:
- New library package: gateway/mcp
- Automatic service discovery → MCP tools
- HTTP/SSE transport support (stdio coming soon)
- Works for both library users and CLI users
- CLI flags: --mcp-address for micro run and micro server
Documentation:
- ADR-010: Unified Gateway Architecture
- CLI & Gateway Guide for users
- MCP Gateway README and examples
- Blog post: Making Your Microservices AI-Native with MCP
Breaking Changes: None (fully backward compatible)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Add systemd-based deployment support
- micro init --server: Initialize server to receive deployments
- Creates /opt/micro/{bin,data,config} directories
- Generates systemd template unit (micro@.service)
- Creates 'micro' system user
- micro deploy: Deploy services via SSH + systemd
- Builds linux/amd64 binaries automatically
- Copies via rsync/scp to server
- Manages services via systemctl
- Helpful error messages for common issues
- micro status --remote: Check remote service status
- micro logs --remote: Stream remote logs via journalctl
- micro stop --remote: Stop services on remote server
- Config: Added 'deploy' blocks to micro.mu for named targets
The deployment model:
- systemd is the process supervisor (battle-tested)
- SSH is the transport (standard, secure)
- No custom daemons or platforms needed
Co-authored-by: Shelley <shelley@exe.dev>
* Add deployment documentation
- docs/deployment.md: Comprehensive guide for server deployment
- README.md: Updated deployment section with full workflow
Co-authored-by: Shelley <shelley@exe.dev>
* Add deployment section to CLI documentation
Co-authored-by: Shelley <shelley@exe.dev>
* Fix systemd template escaping and rsync permission warnings
- Fix %i escaping in systemd template (was being interpreted by fmt.Sprintf)
- Handle rsync exit code 23/24 gracefully (metadata permission warnings)
- Add --omit-dir-times to rsync to avoid directory timestamp errors
Co-authored-by: Shelley <shelley@exe.dev>
* Add install script for micro CLI
Co-authored-by: Shelley <shelley@exe.dev>
* Fix non-constant format string in deploy error
Co-authored-by: Shelley <shelley@exe.dev>
---------
Co-authored-by: Shelley <shelley@exe.dev>
micro build:
- Default: builds Go binaries to ./bin/
- Cross-compile with --os and --arch
- Docker is optional via --docker flag
micro deploy:
- Requires --ssh user@host
- Copies pre-built binaries (if ./bin/ exists)
- Or syncs source and builds on remote
- No Docker dependency
Go binaries are self-contained. No runtime needed.
Co-authored-by: Shelley <shelley@exe.dev>
micro run now starts an HTTP gateway alongside your services:
- Web dashboard at http://localhost:8080
- API proxy at /api/{service}/{method}
- Health checks at /health
- Service listing at /services
The experience is now:
$ micro new helloworld
$ cd helloworld
$ micro run
Open http://localhost:8080 to see and call your services.
New flags:
--address :3000 # Custom gateway port
--no-gateway # Disable gateway (services only)
Updated documentation to make this the central experience.
Co-authored-by: Shelley <shelley@exe.dev>
- Add micro.mu DSL and micro.json config file support
- Implement hot reload with file watching (--no-watch to disable)
- Start services in dependency order (topological sort)
- Environment management (--env flag, MICRO_ENV var)
- Health check waiting before starting dependents
- Graceful shutdown in reverse dependency order
Config file example (micro.mu):
service users
path ./users
port 8081
service posts
path ./posts
port 8082
depends users
env development
STORE_ADDRESS file://./data
Closes#2828
Co-authored-by: Shelley <shelley@exe.dev>
* fix: remove deprecated rand.Seed calls
Go 1.20+ automatically seeds the global random number generator.
These calls are no-ops and generate warnings with newer Go versions.
Removed from:
- selector/strategy.go
- registry/cache/cache.go
- broker/memory.go
- broker/http.go
- cmd/cmd.go
- transport/memory.go
Co-authored-by: Shelley <shelley@exe.dev>
* fix: handle previously ignored errors
- MySQL store: properly handle prepared statement errors in initDB()
- Consul registry: handle client creation errors in Client() method
These silent failures could cause hard-to-debug issues in production.
Co-authored-by: Shelley <shelley@exe.dev>
* feat(genai): improve provider interface with context and streaming
Breaking changes:
- Generate() and Stream() now require context.Context as first parameter
- Stream.Close() added for proper resource cleanup
Improvements:
- Proper context support for cancellation and timeouts
- Real SSE streaming for OpenAI and Gemini text generation
- Better error handling with wrapped errors and API error responses
- Thread-safe provider registry with sync.RWMutex
- New options: WithMaxTokens, WithTemperature, WithTimeout
- Stream has proper Close() method for cleanup
- Results can include Error field for per-chunk errors
Provider updates:
- OpenAI: true streaming with SSE parsing, proper HTTP client with timeout
- Gemini: true streaming with streamGenerateContent endpoint
- Default model updated to gpt-4o-mini (OpenAI) and gemini-2.0-flash (Gemini)
Co-authored-by: Shelley <shelley@exe.dev>
* feat(tls): make TLS secure by default, configurable via environment
BREAKING: TLS now verifies certificates by default. Set MICRO_TLS_INSECURE=true
to restore previous behavior (NOT recommended for production).
Changes:
- Add util/tls.Config(), SecureConfig(), InsecureConfig(), ConfigFromEnv() helpers
- Update all components to use ConfigFromEnv() instead of hardcoded InsecureSkipVerify
- Set MinVersion to TLS 1.2 for all TLS configs
Affected components:
- broker/http
- broker/rabbitmq
- registry/etcd
- registry/consul
- transport/grpc
This improves security posture while allowing opt-out for development environments.
Co-authored-by: Shelley <shelley@exe.dev>
* feat(tls): add TLS helpers with opt-in secure mode
NOT a breaking change - keeps InsecureSkipVerify=true as default for
local development compatibility.
New util/tls helpers:
- Config() - returns config based on MICRO_TLS_SECURE env var
- SecureConfig() - certificate verification enabled
- InsecureConfig() - certificate verification disabled (dev only)
For production security, use one of:
- Set MICRO_TLS_SECURE=true with proper CA-signed certs
- Use a service mesh (Istio, Linkerd) for automatic mTLS
- Configure TLSConfig directly with your certificates
Also: Changed CLI alias from 'g' to 'gen' for clarity
- micro generate handler -> micro gen handler
Co-authored-by: Shelley <shelley@exe.dev>
* refactor(cli): rename generate directory to gen for consistency
Directory name now matches the command alias:
cmd/micro/cli/gen/ -> micro gen handler
Co-authored-by: Shelley <shelley@exe.dev>
---------
Co-authored-by: Shelley <shelley@exe.dev>
* genai interface
* x
* x
* text to speech
* Re-add events package (#2761)
* Re-add events package
* run redis as a dep
* remove redis events
* fix: data race on event subscriber
* fix: data race in tests
* fix: store errors
* fix: lint issues
* feat: default stream
* Update file.go
---------
Co-authored-by: Brian Ketelsen <bketelsen@gmail.com>
* .
* copilot couldn't make it compile so I did
* copilot couldn't make it compile so I did
* x
---------
Co-authored-by: Brian Ketelsen <bketelsen@gmail.com>
* Re-add events package
* run redis as a dep
* remove redis events
* fix: data race on event subscriber
* fix: data race in tests
* fix: store errors
* fix: lint issues
* feat: default stream
* Update file.go
---------
Co-authored-by: Brian Ketelsen <bketelsen@gmail.com>
* feat: more plugins
* chore(ci): split out benchmarks
Attempt to resolve too many open files in ci
* chore(ci): split out benchmarks
* fix(ci): Attempt to resolve too many open files in ci
* fix: set DefaultX for cli flag and service option
* fix: restore http broker
* fix: default http broker
* feat: full nats profile
* chore: still ugly, not ready
* fix: better initialization for profiles
* fix(tests): comment out flaky listen tests
* fix: disable benchmarks on gha
* chore: cleanup, comments
* chore: add nats config source
- Removed existing mDNS test file and replaced it with a new implementation.
- Added a new `mdns_registry.go` file that contains the MDNS registry logic.
- Updated the default registry to use the new MDNS registry.
- Refactored tests to accommodate the new MDNS registry implementation.
- Implemented service registration, deregistration, and service discovery using mDNS.
- Added encoding and decoding functions for mDNS TXT records.
- Implemented a watcher for monitoring service changes in the MDNS registry.
go install github.com/micro/go-micro/cmd/protoc-gen-micro@latest
should be used, instand of
`go install github.com/micro/go-micro/cmd/protoc-gen-micro`
* [fix] etcd config source prefix issue (#2389)
* http transport data race issue (#2436)
* [fix] #2431 http transport data race issue
* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.
* [fix] Use pool connection close timeout
* [fix] replace Close with private function
* [fix] Do not close the transport client twice in stream connection , the transport client is closed in the rpc codec
* [fix] tests
---------
Co-authored-by: Johnson C <chengqiaosheng@gmail.com>