* 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>
* Initial plan
* Add MCP per-tool scopes, tracing, rate limiting, and audit logging
- Add Scopes field to Tool struct for per-tool scope requirements
- Add Auth (auth.Auth) integration to Options for token inspection
- Add trace ID generation (UUID) propagated via metadata to downstream RPCs
- Add per-tool rate limiting with configurable requests/sec and burst
- Add AuditFunc callback for immutable tool-call audit records
- Extract tool scopes from registry endpoint metadata ("scopes" key)
- Update both HTTP and stdio transports with auth/trace/rate/audit
- Add comprehensive tests for all new functionality
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Revert unrelated example go.mod changes
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Remove auto-generated example go.sum files
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Add WithEndpointScopes helper, gateway-level ToolScopes, and documentation
- Add server.WithEndpointScopes() for declaring per-endpoint auth scopes at
handler registration time
- Add mcp.Options.ToolScopes for gateway-level scope overrides without
changing individual services
- Update documented example to show WithEndpointScopes usage
- Update examples/mcp/README.md with scopes, tracing, and rate-limiting docs
- Update gateway/mcp/DOCUMENTATION.md with scopes section and FAQ
- Add tests for both new features
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Fix ToolScopes doc comment: clarify override (not merge) semantics
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Revert unrelated example go.mod/go.sum changes
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* Rename ToolScopes to Scopes in MCP Options
The field name "Scopes" is more universal and consistent with how
auth scopes are used throughout go-micro. Updated all code references,
tests, and documentation.
Co-authored-by: asim <17530+asim@users.noreply.github.com>
* MCP gateway: add per-tool scopes, tracing, rate limiting, and audit logging
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>
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>