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

# MCPs (Model Context Protocol)

> Extend Zenflow Work agents with additional tools and integrations using MCPs.

## Overview

Model Context Protocol (MCP) is an open standard that allows AI agents to interact with external tools and services. Zenflow supports MCPs to extend agent capabilities beyond code editing.

<Card title="What MCPs enable" icon="plug" horizontal>
  Give agents access to databases, APIs, file systems, development tools, and custom integrations—all through a standardized protocol.
</Card>

## Built-in MCPs

Zenflow includes several MCPs out of the box:

| MCP             | Capabilities                       |
| --------------- | ---------------------------------- |
| **Git**         | Clone, commit, push, branch, merge |
| **File System** | Read, write, search files          |
| **Terminal**    | Execute shell commands             |
| **Browser**     | Navigate, interact with web pages  |
| **Search**      | Search code across repositories    |

## Adding Custom MCPs

### From the MCP Library

1. Go to **Settings → Agent Tools**
2. Browse the MCP library
3. Click **Install** on the desired MCP
4. Configure any required settings (API keys, endpoints)

### Manual Configuration

For custom or private MCPs:

1. Go to **Settings → Agent Tools → Add Custom**
2. Enter the MCP configuration:

```json theme={"system"}
{
  "name": "my-custom-mcp",
  "command": "npx",
  "args": ["-y", "@myorg/mcp-server"],
  "env": {
    "API_KEY": "${MY_API_KEY}"
  }
}
```

3. Save and restart the agent

## Popular MCPs

<CardGroup cols={2}>
  <Card title="Database" icon="database">
    Query PostgreSQL, MySQL, SQLite directly from agents
  </Card>

  <Card title="Jira" icon="ticket">
    Create issues, update status, link to tasks
  </Card>

  <Card title="Slack" icon="message">
    Send notifications, read channel history
  </Card>

  <Card title="AWS" icon="cloud">
    Manage S3, Lambda, EC2 resources
  </Card>
</CardGroup>

## MCP Permissions

Control what agents can access:

| Permission Level      | Description                    |
| --------------------- | ------------------------------ |
| **Read-only**         | Agent can query but not modify |
| **Read-write**        | Full access to the tool        |
| **Approval required** | Human must approve each action |
| **Disabled**          | MCP available but not active   |

Configure in **Settings → Agent Tools → \[MCP Name] → Permissions**.

## Security Considerations

<Warning>
  MCPs grant agents real-world capabilities. Review permissions carefully:

  * Limit write access to necessary tools only
  * Use approval mode for sensitive operations
  * Rotate API keys regularly
  * Audit agent actions in chat logs
</Warning>

### Sandboxing

Zenflow runs MCPs in isolated environments:

* Separate process per MCP
* Limited system access
* Configurable resource limits
* Network restrictions available

## Creating Custom MCPs

Build MCPs for your internal tools:

1. Implement the MCP server spec
2. Define available tools and their schemas
3. Handle tool invocations
4. Package and distribute

Resources:

* [MCP Specification](https://modelcontextprotocol.io)
* [Example Servers](https://github.com/modelcontextprotocol/servers)

## Troubleshooting

<AccordionGroup>
  <Accordion title="MCP not connecting" icon="plug">
    Verify that:

    * The command path is correct
    * Required dependencies are installed
    * Environment variables are set
    * Network access is available (if remote)
  </Accordion>

  <Accordion title="Agent not using the MCP" icon="robot">
    Check that:

    * The MCP is enabled for the project
    * The agent has permission to use it
    * The tool is relevant to the current task
  </Accordion>

  <Accordion title="Actions failing" icon="xmark">
    Review the error in the chat log. Common issues:

    * Invalid API credentials
    * Rate limiting
    * Permission denied
    * Malformed requests
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="GitHub Integration" icon="code-branch" href="/zenflow-work/integrations/github">
    Connect to GitHub
  </Card>

  <Card title="Integrations Overview" icon="puzzle-piece" href="/zenflow-work/integrations">
    Browse all integrations
  </Card>
</CardGroup>
