1
0
mirror of https://github.com/go-micro/go-micro.git synced 2026-04-30 19:15:24 +02:00
Commit Graph

126 Commits

Author SHA1 Message Date
Copilot ac47a4650a MCP gateway: add per-tool scopes, tracing, rate limiting, and audit logging (#2850)
* 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>
2026-02-11 21:01:31 +00:00
asim fe76f3ddb5 further mcp integrations 2026-02-11 14:12:21 +00:00
asim bed7c4cc57 fix tests 2026-02-11 12:59:18 +00:00
asim e7335f945a noop auth fixed 2026-02-11 11:46:02 +00:00
asim c9e582b966 go fmt 2026-02-11 11:25:43 +00:00
asim 7da9e58c81 fully functioning auth 2026-02-11 11:25:36 +00:00
Asim Aslam 547507b1a2 x 2026-02-04 14:14:41 +00:00
Asim Aslam bab115a0bf dev UX optimisations 2026-02-04 14:12:59 +00:00
Asim Aslam 27b98c450e Remove examples 2022-04-07 11:45:39 +01:00
zhaoyang b25d744f5c feat: delete redundant lines (#2364) 2021-11-24 17:41:54 +00:00
zhaoyang 685f9979a1 feat: modify the dependencies urls (#2363) 2021-11-24 16:43:05 +00:00
陈杨文 799b8d6a65 upgrade to go 1.17 (#2346) 2021-11-11 14:03:34 +00:00
Benjamin 5d5aee1f08 replace ioutil with io and os (#2327)
set the go version to 1.16 in pr.yml and tests.yml, so as to be consistent with the version in go.mod.
2021-10-30 19:24:40 +01:00
Johnson C d2a51d05c4 [feature] stream CloseSend (#2323)
* support stream CloseSend

* move CloseSend into Closer
2021-10-26 15:07:08 +01:00
Johnson C af3cfa0a4c remove unnecessary dependencies between plugins
remove unnecessary dependencies between plugins
upgrade go-micro.dev/v4 to v4.2.1
2021-10-23 16:20:42 +08:00
Asim Aslam 00f461141a fix examples go mod 2021-10-13 13:37:24 +01:00
Asim Aslam 62801c3d68 update 2021-10-13 13:31:23 +01:00
Asim Aslam f63e46a7d1 use 4.1.0 2021-10-12 13:22:08 +01:00
Asim Aslam 1cd7cfaa6c go-micro.dev/v4 (#2305) 2021-10-12 12:55:53 +01:00
Defoo Li a315fc2dda Fix missing content type (#2289) 2021-09-30 12:15:09 +01:00
Niek den Breeje ed9053ed94 Add cache example (#2232) 2021-09-01 10:08:43 +01:00
Niek den Breeje 9a77c06b44 Move from micro/cli/v2 to urfave/cli/v2 (#2224)
* Use urfave/cli/v2 instead of micro/cli/v2

Wherever possible we may want to eliminate the use of github.com/micro
imports.

* Fix broken cli test
2021-08-31 09:05:08 +01:00
Qiu Yu b977a51253 Examples: fix grpc config (#2207)
This change fixes grpc config example code which is currently broken.

Several pieces in the change:
- use yaml encoder to read config files
- rename *.yml to *.yaml to fix format (file suffix) for encoder lookup
- replace util/log package with logger as the former one is deprecated
2021-08-12 06:27:04 +01:00
dependabot[bot] 046d0785c9 Bump github.com/gin-gonic/gin from 1.6.3 to 1.7.0 in /examples (#2205)
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.6.3 to 1.7.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.6.3...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-11 13:57:15 +01:00
Qiu Yu a46dc0b856 Add yaml config example (#2203)
* examples: add yaml config

* examples: update go mod for yaml plugin
2021-08-11 13:31:29 +01:00
Jerry 93ba8cd0df continue fix pre version go get bug that unknown v3.5.1 (#2188)
* 1.fix plugins go get bug.
2.update all mode.
3.add tidy tools

* continue fix pre version go get bug that unknown v3.5.1
2021-06-30 09:24:00 +01:00
Jerry c13bb07171 1.fix plugins go get bug. (#2187)
2.update all mode.
3.add tidy tools
2021-06-30 07:21:03 +01:00
Jerry 4929a7c16e update etcd version (#2186)
Remove missing gRPC example from README.md (#2112)

Delete docker.yml

Delete Dockerfile

update plugins version & remove replace (#2118)

* update memory registry plugins version & remove replace

* update plugins version & remove replace

Co-authored-by: 申法宽 <shenfakuan@163.com>

update client/grpc plugins version & remove replace (#2119)

* update memory registry plugins version & remove replace

* update plugins version & remove replace

* update plugins/client/grpc/v3 version

Co-authored-by: 申法宽 <shenfakuan@163.com>

update etcd version (#2120)

update mod version

update

update pulgin registry mod version (#2121)

* update etcd version

* update mod version

* update

fix store delete

support for tls on http plugin (#2126)

improve code quality (#2128)

* Fix inefficient string comparison

* Fix unnecessary calls to Printf

* Canonicalize header key

* Replace `t.Sub(time.Now())` with `time.Until`

* Remove unnecessary blank (_) identifier

* Remove unnecessary use of slice

* Remove unnecessary comparison with bool

Update README.md

Update README.md

remove network package

update quic go mod

remove indirects

update etcd mod version

Update registry plugins mod version (#2130)

* update etcd version

* update mod version

* update

* update etcd mod version

Update README.md

Update README.md

Update README.md

fixing etcd stack in getToken (#2145)

when provide username and password, etcd will try to get auth token from server
if server is unavailble, etcd client will stack in
when dial timeout is set, it will return err instead of stack in

Update README.md

add http demo; http client can call http server; http client can call rpc server (#2149)

Add etcd to default registries when plugin is loaded (#2150)

Co-authored-by: Andrew Jones <andrew@gotoblink.com>

Update README.md

make rpcClient compatible with 32bit arm systems (#2156)

On ARM, 386, and 32-bit MIPS, it is the caller's responsibility to
arrange for 64-bit alignment of 64-bit words accessed
atomically. Only the first word in an allocated struct can
be relied upon to be 64-bit aligned.

optimize the process of switching grpc error to micro error (#2158)

Fix util/log/log.Infof format didn't work (#2160)

Co-authored-by: Cui Gang <cuigang@yunpbx.com>

fixing string field contains invalid UTF-8 issue (#2164)

fix k8s api memory leak (#2166)

fix http No release Broker (#2167)

* Update http.go

Exit before deregister is executed

* Create http.go

Exit before deregister is executed

fix: "Solve the problem that the resources have not been fully released due to early exit" (#2168)

* Update http.go

Exit before deregister is executed

* Create http.go

Exit before deregister is executed

* Solve the problem that the resources have not been fully released due to early exit

* Optimize some code

* Optimize some code

fix service default logger (#2171)

* Update http.go

Exit before deregister is executed

* Create http.go

Exit before deregister is executed

* Solve the problem that the resources have not been fully released due to early exit

* Optimize some code

* Optimize some code

* Optimize some code

* fix service default logger

Update README.md

get k8s pod (#2173)

Update README.md

fix:field (#2176)

* get k8s pod

* fix: filed

* field

Update README.md

add rmq message properties (#2177)

Co-authored-by: dtitov <dtitov@might24.ru>

Update README.md

grpc server add RegisterCheck (#2178)

fix 404 bug (#2179)

fix undefined: err (#2181)

Add registry and config/source plugins based on nacos/v2 (#2182)

* Add registry plugins implement by nacos/v2

* Add config/source plugins implement by nacos/v2

support hystrix fallback (#2183)

Windows event log plugin (#2180)

* add rmq message properties

* eventlog start

* start eventlog

* windows event logger

* readme

* readme

Co-authored-by: dtitov <dtitov@might24.ru>

support etcd auth with env args (#2184)

* support etcd auth with env args
set default registry address with env arg instead of 127.0.0.1

* fixing MICRO_REGISTRY_ADDRESS may empty issue

update mod version
2021-06-29 13:40:54 +01:00
orange-jacky 6ae252b892 add http demo; http client can call http server; http client can call rpc server (#2149) 2021-04-08 18:31:15 +01:00
Asim Aslam 57003414be remove network package 2021-02-26 08:13:12 +00:00
Josemy Duarte ca3dfc4580 Remove missing gRPC example from README.md (#2112) 2021-01-30 18:13:56 +00:00
Asim Aslam ad94eeb635 Update README.md 2021-01-20 21:30:26 +00:00
Asim Aslam 88be70a6af Update README.md 2021-01-20 21:30:10 +00:00
Asim Aslam 226833c4ab Update README.md 2021-01-20 21:29:36 +00:00
Asim Aslam 8e3b7a57d9 examples at v3 2021-01-20 21:28:48 +00:00
Asim Aslam dc8236ec05 update v3 plugins (#2105) 2021-01-20 21:01:10 +00:00
Asim Aslam d94936f6c9 v3 (#2104)
* v3

* revert plugins

* fixup some issues
2021-01-20 13:54:31 +00:00
Asim Aslam 5fe144bda8 Update README.md 2020-12-26 15:22:41 +00:00
Asim Aslam df2dab0169 Update README.md 2020-12-26 15:22:14 +00:00
Asim Aslam 7ab46b0850 rename imports 2020-12-26 15:21:29 +00:00
Asim Aslam a34c70de0e Add examples 2020-12-26 15:17:20 +00:00
Asim Aslam d1c12e4302 move go-micro examples links 2017-01-05 15:09:27 +00:00
Asim Aslam 4a1e5b34ee update service example readme 2016-12-08 12:34:02 +00:00
Asim 20feb95e18 Add the ability to switch out client/server 2016-11-18 17:29:26 +00:00
Asim c277a3ecc0 Add example of client call func wrap 2016-11-07 20:11:58 +00:00
Asim 32bf930ea1 update dockerfile 2016-10-08 10:26:11 +01:00
Asim d504abb7e2 Add readme to examples 2016-05-11 22:58:59 +01:00
Asim aea81315d0 Change QueueName to Queue 2016-05-10 10:55:18 +01:00
Asim 796dba3aac Fix up the http broker so it works concurrently and pubs async 2016-04-28 00:16:11 +01:00
Asim 4d4f842702 Change SelectFilter to Filter 2016-04-23 20:15:01 +01:00