sxhxliang / mcp-access-point

Turn a web server into an MCP server in one click without making any code changes.
https://deepwiki.com/OpenAgentX/mcp-access-point
MIT License
71 stars 15 forks source link

支持配置header吗? #3

Closed wweggplant closed 2 months ago

wweggplant commented 2 months ago

需要添加api-key, 这个还挺常见的需求

sxhxliang commented 2 months ago

这个需求是什么场景,能举个例子吗

wweggplant commented 2 months ago

比如我的场景是想使用gitlab的api, 需要再header中添加PRIVATE-TOKEN。https://docs.gitlab.com/api/rest/

curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/share/17"
sxhxliang commented 2 months ago

比如我的场景是想使用gitlab的api, 需要再header中添加PRIVATE-TOKEN。https://docs.gitlab.com/api/rest/

curl --request DELETE --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/projects/5/share/17"

支持了,在配置文件中增加 header就可以了

sxhxliang commented 2 months ago

比如我的场景是想使用gitlab的api, 需要再header中添加PRIVATE-TOKEN。https://docs.gitlab.com/api/rest/ curl --request DELETE --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/projects/5/share/17"

支持了,在配置文件中增加 header就可以了

还有个问题,就是现在还没有DNS解析,只支持IP:PORT 方式,这两天会增加域名支持

sxhxliang commented 2 months ago

比如我的场景是想使用gitlab的api, 需要再header中添加PRIVATE-TOKEN。https://docs.gitlab.com/api/rest/

curl --request DELETE --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/projects/5/share/17"

可以了,用最新版的配置文件