
ubie-oss/mcp-proxy
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
薄いMCPプロキシ
概要
薄いMCPプロキシ。 クライアントは、ストリーミング輸送なしでHTTP経由でMCPサーバーを接続することができます。 シンプルなインフラに置くことができます。 設定ファイルを作成します。 フォーマットはClaude'sと似ています。 $VARNAME は環境変数に置換されます。 jsonとyamlの両方に対応しています。 extensions を使用して、各 MCP サーバーにどのツールが使用できるかを制御できます。 ツール構成: - 許可: ここにリストされているツールのみが許可されます。 このリストが空か指定されていない場合、すべてのツールが許可されます(拒否されていない)。 - deny: ここでリストされているツールは、許可リストにある場合でもブロックされます。 許可リストと拒否リストが指定されると、拒否リストは優先されます。 つまり、許可リストに表示しても、拒否リストのツールはブロックされます.
概要(AI 翻訳)
薄いMCPプロキシ。 クライアントは、ストリーミング輸送なしでHTTP経由でMCPサーバーを接続することができます。 シンプルなインフラに置くことができます。
インストール方法
使い方
mcp 設定ファイルを用意する
設定ファイルを作成します。 Claude の形式は Claude’s に似ています。[$VARNAME]] は環境変数に置換されます。 [jsonとyamlの両方に対応しています。
##許可/拒否リストでフィルタリングするツール
[_extensions.tools] 設定を使用して、各 MCP サーバーにどのツールが使用できるかを制御することができます。
- [
allow]: ここに記載されているツールのみが許可されます。 このリストが空か指定されていない場合、すべてのツールが許可されます(拒否されていない)。
[allow と deny の両方のリストが指定されている場合、deny リストは優先されます。 つまり、許可リストに表示しても、拒否リストのツールはブロックされます。
config で mcp-proxy を実行
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
mcp-proxy
A thin MCP proxy. It allows clients to connect MCP servers via HTTP without streaming transport. It enables to put it on a simple infrastructure.
How to install
go install github.com/ubie-oss/mcp-proxy
How to use
Prepare your mcp config file
Create a config file. The format is similar to Claude’s. $VARNAME will be replaced with environment variables. It supports both json and yaml.
{
"mcpServers": {
"server1": {
"command": "npx",
"args": ["module1"],
"env": {
"VAR1": "$SERVER1_VAR1",
"VAR2": "$SERVER1_VAR2"
}
},
"server2": {
"command": "npx",
"args": ["module2"],
"env": {
"VAR1": "$SERVER2_VAR1",
"VAR2": "$SERVER2_VAR2"
},
"_extensions": {
"tools": {
"allow": [
"tool1",
"tool2"
],
"deny": [
"tool11",
"tool12"
]
}
}
}
}
}
mcpServers:
server1:
command: "npx"
args:
- "module1"
env:
VAR1: $SERVER1_VAR1
VAR2: $SERVER1_VAR2
server2:
command: "npx"
args:
- "module2"
env:
VAR1: $SERVER2_VAR1
VAR2: $SERVER2_VAR2
_extensions:
tools:
allow:
- tool1
- tool2
deny:
- tool11
- tool12
Tool filtering with allow/deny lists
You can control which tools are available to each MCP server using the _extensions.tools configuration:
allow: Only tools listed here will be allowed. If this list is empty or not specified, all tools are allowed (unless denied).deny: Tools listed here will be blocked, even if they are in the allow list.
When both allow and deny lists are specified, the deny list takes precedence. That is, tools in the deny list will be blocked even if they also appear in the allow list.
Run mcp-proxy with the config
go run . -config config.json -port 9090
インストール
npx module1設定
{
"mcpServers": {
"server1": {
"command": "npx",
"args": ["module1"],
"env": {
"VAR1": "$SERVER1_VAR1",
"VAR2": "$SERVER1_VAR2"
}
},
"server2": {
"command": "npx",
"args": ["module2"],
"env": {
"VAR1": "$SERVER2_VAR1",
"VAR2": "$SERVER2_VAR2"
},
"_extensions": {
"tools": {
"allow": [
"tool1",
"tool2"
],
"deny": [
"tool11",
"tool12"
]
}
}
}
}
}