We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我用cursor的settings配置了一个mcp.json,配置如下:
我的本地服务,使用SrpingAI的@tool来注册工具,那么我这个工具怎么获取到cursor中配置的env参数PM-ID呢?
The text was updated successfully, but these errors were encountered:
env是 stdio那种本地启动的,env就是修改你电脑的环境变量,所以sse方式,远程访问是无法获取到的
Sorry, something went wrong.
可以将环境参数设置到 version 版本字段中,这样就可以在服务端获取到你的env参数了。
stdio 直接代码 注入获取 getEnv 就行了
自定义HandlerInterceptor解析env并将其放到InheritableThreadLocal中,再讲其注册到WebMvcConfigurer的addInterceptors中;使用时从InheritableThreadLocal中获取
你但凡听一下徐庶老师我讲的 MCP鉴权你都不会问这个问题:https://www.bilibili.com/video/BV1ir55zQEsF/?spm_id_from=333.337.search-card.all.click
mcp server端直接 System.getenv("PM-ID")
No branches or pull requests
我用cursor的settings配置了一个mcp.json,配置如下:
我的本地服务,使用SrpingAI的@tool来注册工具,那么我这个工具怎么获取到cursor中配置的env参数PM-ID呢?
The text was updated successfully, but these errors were encountered: