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

# MCP Tools

> Give agents access to APIs, databases, and services

## What is MCP?

**Model Context Protocol (MCP)** is an open standard for connecting AI agents to external systems. Think of it as a universal adapter for your infrastructure.

<Note>
  MCP servers handle authentication and permissions. Agents never see your credentials directly.
</Note>

## Why MCP?

| Approach         | Security     | Maintenance        | Ecosystem    |
| ---------------- | ------------ | ------------------ | ------------ |
| Direct API       | Full access  | Custom code        | Limited      |
| **MCP Protocol** | Fine-grained | Standard interface | 100+ servers |

## Architecture

```
Agent → Station MCP Client → MCP Server → External Service
                ↓
        Validates permissions
```

**Key Benefits:**

* Agents only see results, never credentials
* Grant specific operations (read vs write)
* Same servers work with Claude Desktop, Cursor, and Station

## Configuring MCP Servers

Add servers to your environment's `template.json`:

```json theme={null}
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem@latest", "/workspace"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "{{GITHUB_TOKEN}}"
      }
    }
  }
}
```

## Popular MCP Servers

### Filesystem

```json theme={null}
{
  "filesystem": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-filesystem@latest", "/path/to/allow"]
  }
}
```

### GitHub

```json theme={null}
{
  "github": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github"],
    "env": {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "{{GITHUB_TOKEN}}"
    }
  }
}
```

### PostgreSQL

```json theme={null}
{
  "postgres": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-postgres", "{{DATABASE_URL}}"]
  }
}
```

### AWS

```json theme={null}
{
  "aws": {
    "command": "uvx",
    "args": ["mcp-server-aws"],
    "env": {
      "AWS_ACCESS_KEY_ID": "{{AWS_ACCESS_KEY_ID}}",
      "AWS_SECRET_ACCESS_KEY": "{{AWS_SECRET_ACCESS_KEY}}",
      "AWS_REGION": "us-east-1"
    }
  }
}
```

## Using Template Variables

Store secrets in `variables.yml`:

```yaml theme={null}
GITHUB_TOKEN: ghp_xxxxxxxxxxxx
DATABASE_URL: postgresql://user:pass@localhost/db
AWS_ACCESS_KEY_ID: AKIA...
AWS_SECRET_ACCESS_KEY: secret...
```

Reference in `template.json` with `{{VARIABLE_NAME}}`:

```json theme={null}
{
  "env": {
    "GITHUB_PERSONAL_ACCESS_TOKEN": "{{GITHUB_TOKEN}}"
  }
}
```

## Discovering Tools

After configuring MCP servers:

```bash theme={null}
# List all available tools
stn mcp tools

# Sync tools (after config changes)
stn env sync
```

## Using Tools in Agents

Reference tools by name in your agent's `tools` array:

```yaml theme={null}
---
tools:
  - "__read_file"
  - "__write_file"
  - "__search_files"
  - "__github_create_issue"
---
```

<Warning>
  Agents can only use tools explicitly listed in their `tools` array.
</Warning>

## Station MCP Tools

When you connect Station as an MCP server to your AI assistant (Claude Desktop, Cursor, etc.), Station provides **41 built-in tools** for managing agents:

### Agent Management (11 tools)

| Tool                   | Description                              |
| ---------------------- | ---------------------------------------- |
| `create_agent`         | Create new agents with prompts and tools |
| `update_agent`         | Modify agent configuration               |
| `update_agent_prompt`  | Update agent system prompt               |
| `delete_agent`         | Remove an agent                          |
| `list_agents`          | List all agents (with filters)           |
| `get_agent_details`    | Get full agent configuration             |
| `get_agent_schema`     | Get agent's input schema                 |
| `add_tool`             | Add MCP tool to agent                    |
| `remove_tool`          | Remove tool from agent                   |
| `add_agent_as_tool`    | Create multi-agent hierarchies           |
| `remove_agent_as_tool` | Break agent hierarchy links              |

### Agent Execution (4 tools)

| Tool                 | Description                  |
| -------------------- | ---------------------------- |
| `call_agent`         | Execute an agent with task   |
| `list_runs`          | List agent execution history |
| `inspect_run`        | Get detailed run information |
| `list_runs_by_model` | Filter runs by AI model      |

### Evaluation & Testing (7 tools)

| Tool                      | Description                           |
| ------------------------- | ------------------------------------- |
| `generate_and_test_agent` | Generate test scenarios and run agent |
| `batch_execute_agents`    | Run multiple agents in parallel       |
| `evaluate_benchmark`      | Run LLM-as-judge evaluation           |
| `evaluate_dataset`        | Evaluate entire dataset               |
| `export_dataset`          | Export runs for analysis              |
| `list_benchmark_results`  | List evaluation results               |
| `get_benchmark_status`    | Check evaluation status               |

### Reports & Analytics (4 tools)

| Tool              | Description                        |
| ----------------- | ---------------------------------- |
| `create_report`   | Create team performance report     |
| `generate_report` | Run benchmarks and generate report |
| `list_reports`    | List all reports                   |
| `get_report`      | Get report details                 |

### Environment Management (3 tools)

| Tool                 | Description            |
| -------------------- | ---------------------- |
| `create_environment` | Create new environment |
| `delete_environment` | Delete environment     |
| `list_environments`  | List all environments  |

### MCP Server Management (5 tools)

| Tool                                 | Description                 |
| ------------------------------------ | --------------------------- |
| `add_mcp_server_to_environment`      | Add MCP server config       |
| `update_mcp_server_in_environment`   | Update MCP server           |
| `delete_mcp_server_from_environment` | Remove MCP server           |
| `list_mcp_servers_for_environment`   | List configured servers     |
| `list_mcp_configs`                   | List all MCP configurations |

### Tool Discovery (2 tools)

| Tool             | Description                     |
| ---------------- | ------------------------------- |
| `discover_tools` | Discover tools from MCP servers |
| `list_tools`     | List available tools            |

### Scheduling (3 tools)

| Tool              | Description                         |
| ----------------- | ----------------------------------- |
| `set_schedule`    | Schedule agent with cron expression |
| `remove_schedule` | Remove agent schedule               |
| `get_schedule`    | Get agent schedule details          |

### Bundles (1 tool)

| Tool                             | Description                   |
| -------------------------------- | ----------------------------- |
| `create_bundle_from_environment` | Package environment as bundle |

### Faker System (1 tool)

| Tool                      | Description                        |
| ------------------------- | ---------------------------------- |
| `faker_create_standalone` | Create AI-powered mock data server |

<Tip>
  To see all available tools in your AI assistant, just ask: "Show me all Station MCP tools available"
</Tip>

## Next Steps

<CardGroup cols={2}>
  <Card title="Agent Development" icon="robot" href="/station/agents">
    Create agents that use these tools
  </Card>

  <Card title="Multi-Agent Teams" icon="users" href="/station/multi-agent-teams">
    Build teams with specialized tools
  </Card>
</CardGroup>
