You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Secure MCP proxy sidecar with [DPoP](https://datatracker.ietf.org/doc/html/rfc9449) authentication for AI agents.
3
+
The FirstOps SDK has two halves:
4
4
5
-
FirstOps secures agent-to-tool connections. This SDK runs a lightweight local proxy that transparently adds DPoP-signed authentication headers to every MCP request your agent makes — no changes to your agent code required.
5
+
1.**Management client** (`FirstOps`) — programmatically create agents, register MCP connections, and manage their lifecycle from your backend. Authenticates with a tenant-scoped API key.
6
+
2.**Runtime proxy** (`firstops.init`) — a lightweight in-process sidecar that transparently signs every MCP request with a [DPoP](https://datatracker.ietf.org/doc/html/rfc9449) proof. Runs inside the agent process.
7
+
8
+
The two halves are used at different points in an agent's lifecycle. The management client runs in your **platform code** (the backend that provisions agents). The runtime proxy runs inside the **agent itself** (the process that calls MCP tools).
6
9
7
10
## Install
8
11
9
12
```bash
10
13
pip install firstops
11
14
```
12
15
13
-
## Quick Start
16
+
## Requirements
17
+
18
+
- Python 3.10+
19
+
- Dependencies: `cryptography`, `httpx`
20
+
21
+
---
22
+
23
+
## 1. Management Client — Provisioning Agents
24
+
25
+
Use this in your platform's backend code to create agents and wire up their MCP connections on demand.
26
+
27
+
### Get an API key
28
+
29
+
1. Log in to the FirstOps dashboard as an admin.
30
+
2. Go to **Settings → API Keys** and create a key with the scopes you need:
31
+
-`agents:write` — create and delete agent principals
32
+
-`agents:read` — list and get agents
33
+
-`connections:write` — register and delete MCP connections
34
+
-`connections:read` — list connections
35
+
3. Copy the raw key (starts with `fo_key_`). It is shown **once** — store it in your secrets manager.
36
+
37
+
### Quick Start
38
+
39
+
```python
40
+
from firstops import FirstOps
41
+
42
+
# Initialize the management client
43
+
client = FirstOps(api_key="fo_key_...")
44
+
45
+
# 1. Create an agent (returns principal ID, token, and private key)
Use this inside the agent process itself. It starts a local HTTP proxy that transparently adds DPoP-signed authentication headers to every MCP request your agent makes — no changes to your agent code required.
149
+
150
+
### Quick Start
14
151
15
152
```python
16
153
import firstops
17
154
18
155
# Start the proxy sidecar (runs in background thread)
19
156
firstops.init(
20
-
agent_id="your-agent-id",
21
-
private_key_pem=open("agent-key.pem").read(),
157
+
agent_id="your-agent-id",# from client.agents.create(...).id
158
+
private_key_pem=open("agent-key.pem").read(),# from client.agents.create(...).private_key
22
159
)
23
160
24
161
# Point your MCP client at localhost:9322 instead of the remote server.
@@ -40,15 +177,65 @@ firstops.shutdown()
40
177
41
178
| Parameter | Default | Description |
42
179
|-----------|---------|-------------|
43
-
|`agent_id`|*required*|Your agent's principal ID |
0 commit comments