Back to Home
AgentRing icon

gym-mcp-server

Verified Safe

by AgentRing

Overview

Expose any Gymnasium environment as an MCP (Model Context Protocol) server via HTTP/REST and MCP endpoints for AI agent integration.

Installation

Run Command
python -m gym_mcp_server --env CartPole-v1 --host localhost --port 8000

Security Notes

The server uses `importlib.import_module` to dynamically load environment classes specified by the `--entry-point` command-line argument at startup. While this is a common Python extensibility pattern and not directly exposed via an API endpoint, it means that if an attacker could control the server's startup command (e.g., via a misconfigured deployment), they could potentially load arbitrary Python code. API endpoints (`/reset`, `/step`, etc.) are protected by FastAPI's Pydantic validation and internal checks against the Gymnasium action space, mitigating common injection risks. No obvious hardcoded secrets or other direct code execution vulnerabilities from user input via HTTP were found.

Similar Servers

Stats

Interest Score26
Security Score8
Cost ClassMedium
Avg Tokens500
Stars1
Forks0
Last Update2026-01-06

Tags

GymnasiumMCPAI AgentsReinforcement LearningREST API