> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gym.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Environment API

> API reference for MCP server interactions

The MCP Environment API provides endpoints for tool-based agent interactions with 45+ MCP servers.

<Info>
  Contact Scale to receive Docker images for your environments. Images are distributed as tar files that can be loaded into your local Docker registry.
</Info>

## Endpoints

<CardGroup cols={2}>
  <Card title="List Tools" icon="list" href="/api-reference/mcp/list-tools">
    Discover all available tools across MCP servers
  </Card>

  <Card title="Call Tools" icon="play" href="/api-reference/mcp/call-tools">
    Execute a specific tool with arguments
  </Card>

  <Card title="Show Data" icon="database" href="/api-reference/mcp/show-data">
    Inspect server database state
  </Card>

  <Card title="Health Check" icon="heart-pulse" href="/api-reference/mcp/health">
    Check service health status
  </Card>
</CardGroup>

## Session Scoping

All MCP operations are scoped by tags. The most common tag is `assignmentId`, which creates isolated data storage across all servers for that session.

| Tag            | Description                                   |
| -------------- | --------------------------------------------- |
| `assignmentId` | Primary session identifier for data isolation |
| `userId`       | Optional user identifier                      |

## Base URL

The MCP environment API is typically available at:

* **Local development**: `http://localhost:3004`

## Next Steps

<CardGroup cols={2}>
  <Card title="MCP Tutorial" icon="graduation-cap" href="/tutorials/mcp-agent">
    Learn to use MCP servers
  </Card>

  <Card title="MCP Server Reference" icon="server" href="/environments/mcp/overview">
    Explore all 45+ servers
  </Card>
</CardGroup>
