# MCP server API

> Bash as an MCP server, for your editor or your own agents.

Send `Authorization: Bearer vk_test_...` on every call.

## `POST /v1/mcp`

Its own page: [POST /v1/mcp](https://vestra.ai/developers/reference/api/mcp-server/post-v1-mcp.md)

One MCP endpoint (streamable HTTP): the card's lines as tools, each with an optional user (with none, your company's own Bash). Keys and secrets stay with people.

Your API key, scope `runtime` or `all`. On the card: [`mcp`](https://vestra.ai/developers/mcp.md). Every call here is a checked sample.

### Request

Nothing to send but the route.

### Answers 200

Its answer is a protocol of its own: its line's page says more.

### Code

**HTTP**

```bash
# Connect any MCP client. Point it at this URL with your key. Over plain HTTP the endpoint speaks JSON-RPC,
# and it needs both types in the Accept header. tools/list shows the tools it offers.
curl "$VESTRA_BASE_URL/v1/mcp" \
  -H "Authorization: Bearer $VESTRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }'

# Connect an agent that speaks A2A. Each deployment has an agent card, and reading it needs no key.
curl "$VESTRA_BASE_URL/v1/a2a/dep_4kq/.well-known/agent-card.json"
```

**MCP**

```json
{
  "mcpServers": {
    "vestra": {
      "type": "http",
      "url": "https://api-staging.vestra.ai/v1/mcp",
      "headers": { "Authorization": "Bearer vk_test_..." }
    }
  }
}
```

**TypeScript, Python, CLI**: No sample in your language for this route, so here it is over HTTP.
