# Security

Security considerations specific to vCon MCP Server.

## Supabase Keys

| Key                         | Access Level              | Use Case                     |
| --------------------------- | ------------------------- | ---------------------------- |
| `SUPABASE_SERVICE_ROLE_KEY` | Full access, bypasses RLS | Server-side deployments      |
| `SUPABASE_ANON_KEY`         | Restricted, RLS enforced  | Client-facing with user auth |

**Recommendation**: Use `SUPABASE_SERVICE_ROLE_KEY` for trusted server deployments.

## Tool Access Control

### Profiles

Control which MCP tools are available:

```bash
MCP_TOOLS_PROFILE=readonly   # Read-only operations
MCP_TOOLS_PROFILE=user       # CRUD without admin ops
MCP_TOOLS_PROFILE=full       # All tools (default)
```

### Disable Specific Tools

```bash
MCP_DISABLED_TOOLS=delete_vcon,execute_sql
```

### Available Profiles

| Profile    | Description                          |
| ---------- | ------------------------------------ |
| `full`     | All tools enabled (default)          |
| `readonly` | Read-only operations only            |
| `user`     | CRUD without admin operations        |
| `admin`    | Full access including schema changes |
| `minimal`  | Basic operations only                |

## Container Security

The Docker image includes security defaults:

* Runs as non-root user (`vcon`, uid 1001)
* Minimal Alpine base image
* No shell access by default

## Best Practices

* Store secrets in environment variables or secret managers, not in code
* Use HTTPS in production (via reverse proxy)
* Enable `MCP_HTTP_STATELESS=true` for multi-instance deployments
* Restrict tool profiles based on use case

## Next Steps

* [Production Setup](/deployment/production.md)
* [Docker Deployment](/deployment/docker.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mcp.conserver.io/deployment/security.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
