agent-mcp-gateway 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of agent-mcp-gateway might be problematic. Click here for more details.
- {agent_mcp_gateway-0.1.1.dist-info → agent_mcp_gateway-0.1.3.dist-info}/METADATA +46 -4
- {agent_mcp_gateway-0.1.1.dist-info → agent_mcp_gateway-0.1.3.dist-info}/RECORD +7 -7
- src/audit.py +1 -1
- src/main.py +1 -1
- {agent_mcp_gateway-0.1.1.dist-info → agent_mcp_gateway-0.1.3.dist-info}/WHEEL +0 -0
- {agent_mcp_gateway-0.1.1.dist-info → agent_mcp_gateway-0.1.3.dist-info}/entry_points.txt +0 -0
- {agent_mcp_gateway-0.1.1.dist-info → agent_mcp_gateway-0.1.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-mcp-gateway
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: An MCP gateway that aggregates your existing MCP servers and lets you define which servers and individual tools each agent or subagent can access. Solves Claude Code's MCP context window waste where all tool definitions load upfront instead of being discovered when actually needed.
|
|
5
5
|
Project-URL: Homepage, https://github.com/roddutra/agent-mcp-gateway
|
|
6
6
|
Project-URL: Documentation, https://github.com/roddutra/agent-mcp-gateway#readme
|
|
@@ -553,7 +553,7 @@ OAuth-protected downstream servers (Notion, GitHub) are automatically supported
|
|
|
553
553
|
| `GATEWAY_RULES` | Path to gateway rules configuration file | `.mcp-gateway-rules.json`, fallback: `./config/.mcp-gateway-rules.json` | `export GATEWAY_RULES=~/.claude/rules.json` |
|
|
554
554
|
| `GATEWAY_DEFAULT_AGENT` | Default agent identity when `agent_id` not provided (optional) | None | `export GATEWAY_DEFAULT_AGENT=developer` |
|
|
555
555
|
| `GATEWAY_DEBUG` | Enable debug mode to expose `get_gateway_status` tool | `false` | `export GATEWAY_DEBUG=true` |
|
|
556
|
-
| `GATEWAY_AUDIT_LOG` | Path to audit log file |
|
|
556
|
+
| `GATEWAY_AUDIT_LOG` | Path to audit log file | `~/.cache/agent-mcp-gateway/logs/audit.jsonl` | `export GATEWAY_AUDIT_LOG=./audit.jsonl` |
|
|
557
557
|
| `GATEWAY_TRANSPORT` | Transport protocol (stdio or http) | `stdio` | `export GATEWAY_TRANSPORT=stdio` |
|
|
558
558
|
| `GATEWAY_INIT_STRATEGY` | Initialization strategy (eager or lazy) | `eager` | `export GATEWAY_INIT_STRATEGY=eager` |
|
|
559
559
|
|
|
@@ -604,7 +604,7 @@ uv run python main.py
|
|
|
604
604
|
```
|
|
605
605
|
Loading MCP server configuration from: .mcp.json
|
|
606
606
|
Loading gateway rules from: .mcp-gateway-rules.json
|
|
607
|
-
Audit log will be written to:
|
|
607
|
+
Audit log will be written to: ~/.cache/agent-mcp-gateway/logs/audit.jsonl
|
|
608
608
|
|
|
609
609
|
Initializing proxy connections to downstream servers...
|
|
610
610
|
- 2 proxy client(s) initialized
|
|
@@ -1062,9 +1062,51 @@ The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is an int
|
|
|
1062
1062
|
|
|
1063
1063
|
#### Install and Run
|
|
1064
1064
|
|
|
1065
|
+
**For PyPI Installation (uvx):**
|
|
1066
|
+
|
|
1067
|
+
```bash
|
|
1068
|
+
# Run Inspector with gateway from PyPI
|
|
1069
|
+
# With environment variables for custom config paths
|
|
1070
|
+
GATEWAY_MCP_CONFIG=~/.config/agent-mcp-gateway/mcp.json \
|
|
1071
|
+
GATEWAY_RULES=~/.config/agent-mcp-gateway/mcp-gateway-rules.json \
|
|
1072
|
+
GATEWAY_DEFAULT_AGENT=researcher \
|
|
1073
|
+
npx @modelcontextprotocol/inspector uvx agent-mcp-gateway
|
|
1074
|
+
|
|
1075
|
+
# Or with default config paths (searches current directory and fallback locations)
|
|
1076
|
+
npx @modelcontextprotocol/inspector uvx agent-mcp-gateway
|
|
1077
|
+
|
|
1078
|
+
# With debug mode enabled
|
|
1079
|
+
GATEWAY_DEBUG=true npx @modelcontextprotocol/inspector uvx agent-mcp-gateway
|
|
1080
|
+
```
|
|
1081
|
+
|
|
1082
|
+
**For PyPI Installation (uv tool):**
|
|
1083
|
+
|
|
1065
1084
|
```bash
|
|
1066
|
-
# Run Inspector with
|
|
1085
|
+
# Run Inspector with installed gateway
|
|
1086
|
+
GATEWAY_MCP_CONFIG=~/.config/agent-mcp-gateway/mcp.json \
|
|
1087
|
+
GATEWAY_RULES=~/.config/agent-mcp-gateway/mcp-gateway-rules.json \
|
|
1088
|
+
GATEWAY_DEFAULT_AGENT=researcher \
|
|
1089
|
+
npx @modelcontextprotocol/inspector agent-mcp-gateway
|
|
1090
|
+
|
|
1091
|
+
# Or with default config paths
|
|
1092
|
+
npx @modelcontextprotocol/inspector agent-mcp-gateway
|
|
1093
|
+
```
|
|
1094
|
+
|
|
1095
|
+
**For Local Development:**
|
|
1096
|
+
|
|
1097
|
+
```bash
|
|
1098
|
+
# Run Inspector with local gateway project
|
|
1099
|
+
# Environment variables are optional - defaults to .mcp.json and .mcp-gateway-rules.json in project directory
|
|
1100
|
+
GATEWAY_MCP_CONFIG=.mcp.json \
|
|
1101
|
+
GATEWAY_RULES=.mcp-gateway-rules.json \
|
|
1102
|
+
GATEWAY_DEFAULT_AGENT=researcher \
|
|
1067
1103
|
npx @modelcontextprotocol/inspector uv run python main.py
|
|
1104
|
+
|
|
1105
|
+
# Or with default config paths
|
|
1106
|
+
npx @modelcontextprotocol/inspector uv run python main.py
|
|
1107
|
+
|
|
1108
|
+
# With debug mode to test get_gateway_status tool
|
|
1109
|
+
npx @modelcontextprotocol/inspector uv run python main.py --debug
|
|
1068
1110
|
```
|
|
1069
1111
|
|
|
1070
1112
|
This opens a web interface where you can:
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
src/CONFIG_README.md,sha256=RDrVI5aP5Wld0_HsHoc8tdyC1IO_JzhFee_3yuLhBwo,9201
|
|
2
2
|
src/__init__.py,sha256=_xMCrvLcZjUcPIDAoeorVOwswrLgrKtrf_g1178faM8,55
|
|
3
|
-
src/audit.py,sha256=
|
|
3
|
+
src/audit.py,sha256=P_YMhSifH66Fm_HXt6wFuFRmk0ekzXXzJOAc9zTinwQ,3034
|
|
4
4
|
src/config.py,sha256=e0PO0iguUXQcXYm2p68bYssBbg03ty6gl6yCpK2wdL0,32299
|
|
5
5
|
src/config_watcher.py,sha256=z8MsOexNEEsmCtk7NBcKpkaLyYLbDfJF10euh3pAvIk,11603
|
|
6
6
|
src/gateway.py,sha256=nKuG8ph3I-7MyCbuOyV8TZKJoiM_b3HWPCL2RBTjIuY,21282
|
|
7
|
-
src/main.py,sha256=
|
|
7
|
+
src/main.py,sha256=2wiFy_eLb0S88LpzWKMRcXlgQmvfsERAjMSV_1RGXyI,23581
|
|
8
8
|
src/metrics.py,sha256=SD4e5zo4Gtd1Gqp7SIHo7DBZTrvqaY-iKtf4qAPTy_k,9896
|
|
9
9
|
src/middleware.py,sha256=iaHxe7lW0nSz3k-ieNyO4n5MtPKSGChEg_qRlHr3X8Q,7257
|
|
10
10
|
src/policy.py,sha256=aJGPWOBQoQlR_hAodY6nGXiqq8k2m0tO8Ped0VF7d7c,19051
|
|
11
11
|
src/proxy.py,sha256=eIZuHBJoZRmnm4lcXId3xIvxhl5Z1drmGHBEu88KvMg,24912
|
|
12
12
|
src/config/.mcp-gateway-rules.json.example,sha256=t53srRy_JPHojDonjhVtkB_WhLTg_oTLqxLq5i6m_ww,855
|
|
13
13
|
src/config/.mcp.json.example,sha256=_Gy7bflSOw15A2LfXpprSf29gGcve4zjDka-vuPVN2c,842
|
|
14
|
-
agent_mcp_gateway-0.1.
|
|
15
|
-
agent_mcp_gateway-0.1.
|
|
16
|
-
agent_mcp_gateway-0.1.
|
|
17
|
-
agent_mcp_gateway-0.1.
|
|
18
|
-
agent_mcp_gateway-0.1.
|
|
14
|
+
agent_mcp_gateway-0.1.3.dist-info/METADATA,sha256=tDIBE-tSgPM8besGiBVmnNNoBlTPaAeZJxYwOCfHw7c,48441
|
|
15
|
+
agent_mcp_gateway-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
16
|
+
agent_mcp_gateway-0.1.3.dist-info/entry_points.txt,sha256=Rb9I44QKFEI6-38dCb1sPwSAzQlAzUBZKDQqjb-FHTI,52
|
|
17
|
+
agent_mcp_gateway-0.1.3.dist-info/licenses/LICENSE,sha256=XPIqCRndYgq7mXJ2NlfnvN0IoqQGXpK2gnHIqyvuPws,1078
|
|
18
|
+
agent_mcp_gateway-0.1.3.dist-info/RECORD,,
|
src/audit.py
CHANGED
|
@@ -12,7 +12,7 @@ from typing import Any, Callable
|
|
|
12
12
|
class AuditLogger:
|
|
13
13
|
"""Logs gateway operations for security auditing and debugging."""
|
|
14
14
|
|
|
15
|
-
def __init__(self, log_path: str = "
|
|
15
|
+
def __init__(self, log_path: str = "~/.cache/agent-mcp-gateway/logs/audit.jsonl"):
|
|
16
16
|
"""Initialize audit logger with log file path.
|
|
17
17
|
|
|
18
18
|
Args:
|
src/main.py
CHANGED
|
@@ -405,7 +405,7 @@ def main():
|
|
|
405
405
|
# Get configuration file paths from environment or use defaults
|
|
406
406
|
_mcp_config_path = get_mcp_config_path()
|
|
407
407
|
_gateway_rules_path = get_gateway_rules_path()
|
|
408
|
-
audit_log_path = os.environ.get("GATEWAY_AUDIT_LOG", "
|
|
408
|
+
audit_log_path = os.environ.get("GATEWAY_AUDIT_LOG", "~/.cache/agent-mcp-gateway/logs/audit.jsonl")
|
|
409
409
|
|
|
410
410
|
# Get default agent ID for fallback chain (optional)
|
|
411
411
|
default_agent_id = os.getenv("GATEWAY_DEFAULT_AGENT")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|