Token导航 LogoToken导航TokenDH.com
MCP Gateway Node Fe logo
运维云端未说明官方级别未说明来源级核验

MCP Gateway Node Fe

MCP Server

一个基于Node.js的API网关,用于转发请求到后端工具集,支持JWT认证和请求检查。

工具数

1

提示词数

0

GitHub Stars

1

资源数

0
API网关JavaScript微服务

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ocdOnDev

提供方

ocdOnDev

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

A node.js api-gateway that forwards calls to a backend set of tools. Mind that the tools are called via a http call as well and not via a path on the server. This makes the whole grid more scalable Why the api-gateway? things can be done like inspection of the request and abstraction of the logic etc. a json webtoken is needed to execute the request. for this test/demo to work: generate a jwt just call 'gentoken userid role' so: gentoken agent agent for a jw token for use agent in the role agent, or gentoken user-1 for a token for user-1 in the role agent (and ommitting both results in a token. for user limited-agent in the role agent) Currently no checking is performed when an API is called on our side / site against the webtoken Of course in real life the token is generated via authentication and the appropriate role(s) is / are then connected to the jwt (APIs checking the token against their logic)

the server runs on port 8443 with an self-signed certificate

start using: node server.js & get the proces: ps aux | grep node kill process: kill

to start the api that gives access to the tools: (python project)

uvicorn app:app --host 0.0.0.0 --port 8080 &

to test the python backend, run from a shell

curl -X POST http://macboobies.local:8080/mcp/tools/invoke -H "Content-Type: application/json" -d '{ "tool": "get_weather", "args": { "location": "Amsterdam" } }'

if that works then the python backend works fine

store a temporary token by calling from the shell:

gentoken (gentoken is registered as an alias to alias: gentoken="node ~/gateway/generate-token.js")

this will generate a token for the user limited-agent in the role agent

to run the tools via the api-gateway, call the following from a shell:

curl -k -X POST https://localhost:8443/tool/weather -H "Authorization: Bearer $JWT_TOKEN" -H "Content-Type: application/json" -d '{"city": "Amsterdam"}'

the tool-call is then rerouted to the correct address and then executed

TL;DR

node server.js & uvicorn app:app --host 0.0.0.0 --port 8080 &

gentoken

curl -X POST http://macboobies.local:8080/mcp/tools/invoke -H "Content-Type: application/json" -d '{ "tool": "get_weather", "args": { "location": "Amsterdam" } }'

curl -v -k -X POST http://macboobies.local:8181/tool/weather -H "Authorization: Bearer $JWT_TOKEN" -H "Content-Type: application/json" -d '{"location": "Amsterdam"}'

curl -v -k -X POST https://macboobies.local:8443/tool/weather -H "Authorization: Bearer $JWT_TOKEN" -H "Content-Type: application/json" -d '{"location": "Amsterdam"}'

curl -X POST http://macboobies.local:8080/ -H "Authorization: Bearer $JWT_TOKEN" -H "Content-Type: application/json" -d '{"location": "Berlin"}'

curl -v -k -X POST https://api.birdkokane.com/tool/weather -H "Authorization: Bearer $JWT_TOKEN" -H "Content-Type: application/json" -d '{"location": "Amsterdam"}'

目录标签

目录标签

API网关JavaScript微服务本地部署请求转发JWT认证Node.js

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明token部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP