@mhingston5/conduit 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -1
- package/dist/index.js +413 -127
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/auth.cmd.ts +26 -14
- package/src/core/config.service.ts +27 -2
- package/src/core/execution.service.ts +5 -0
- package/src/core/policy.service.ts +5 -0
- package/src/core/request.controller.ts +32 -7
- package/src/gateway/auth.service.ts +55 -13
- package/src/gateway/gateway.service.ts +150 -65
- package/src/gateway/host.client.ts +65 -0
- package/src/gateway/upstream.client.ts +94 -26
- package/src/index.ts +13 -4
- package/src/sdk/sdk-generator.ts +66 -30
- package/src/transport/stdio.transport.ts +44 -3
- package/tests/__snapshots__/assets.test.ts.snap +45 -14
- package/tests/auth.service.test.ts +57 -0
- package/tests/code-mode-lite-gateway.test.ts +4 -4
- package/tests/config.service.test.ts +29 -1
- package/tests/gateway.service.test.ts +5 -5
- package/tests/routing.test.ts +7 -0
- package/tests/sdk/sdk-generator.test.ts +7 -7
- package/tests/upstream.transports.test.ts +117 -0
package/README.md
CHANGED
|
@@ -66,6 +66,20 @@ upstreams:
|
|
|
66
66
|
- id: github
|
|
67
67
|
type: http
|
|
68
68
|
url: "http://localhost:3000/mcp"
|
|
69
|
+
|
|
70
|
+
# Remote MCP servers that use Streamable HTTP (preferred) / SSE:
|
|
71
|
+
- id: atlassian
|
|
72
|
+
type: streamableHttp
|
|
73
|
+
url: "https://mcp.atlassian.com/v1/sse"
|
|
74
|
+
credentials:
|
|
75
|
+
type: oauth2
|
|
76
|
+
clientId: ${ATLASSIAN_CLIENT_ID}
|
|
77
|
+
clientSecret: ${ATLASSIAN_CLIENT_SECRET}
|
|
78
|
+
tokenUrl: "https://auth.atlassian.com/oauth/token"
|
|
79
|
+
refreshToken: ${ATLASSIAN_REFRESH_TOKEN}
|
|
80
|
+
# Atlassian expects JSON token requests:
|
|
81
|
+
tokenRequestFormat: json
|
|
82
|
+
|
|
69
83
|
- id: slack
|
|
70
84
|
type: http
|
|
71
85
|
url: "https://your-mcp-server/mcp"
|
|
@@ -75,7 +89,8 @@ upstreams:
|
|
|
75
89
|
clientSecret: ${SLACK_CLIENT_SECRET}
|
|
76
90
|
tokenUrl: "https://slack.com/api/oauth.v2.access"
|
|
77
91
|
refreshToken: ${SLACK_REFRESH_TOKEN}
|
|
78
|
-
|
|
92
|
+
|
|
93
|
+
# Or use local stdio for testing:
|
|
79
94
|
- id: filesystem
|
|
80
95
|
type: stdio
|
|
81
96
|
command: npx
|
|
@@ -93,10 +108,23 @@ npx conduit auth \
|
|
|
93
108
|
--auth-url <url> \
|
|
94
109
|
--token-url <url> \
|
|
95
110
|
--scopes <scopes>
|
|
111
|
+
|
|
112
|
+
For Atlassian (3LO), include `offline_access` and set the audience:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npx conduit auth \
|
|
116
|
+
--client-id <id> \
|
|
117
|
+
--client-secret <secret> \
|
|
118
|
+
--auth-url "https://auth.atlassian.com/authorize?audience=api.atlassian.com&prompt=consent" \
|
|
119
|
+
--token-url "https://auth.atlassian.com/oauth/token" \
|
|
120
|
+
--scopes "offline_access,read:me"
|
|
121
|
+
```
|
|
96
122
|
```
|
|
97
123
|
|
|
98
124
|
This will start a temporary local server, open your browser for authorization, and print the generated `credentials` block for your `conduit.yaml`.
|
|
99
125
|
|
|
126
|
+
Note: some providers (including Atlassian) use rotating refresh tokens. Conduit will cache the latest refresh token in-memory while running, but it does not currently persist the rotated token back into `conduit.yaml`. If you restart Conduit and your old refresh token has expired/rotated, re-run `conduit auth` and update your config.
|
|
127
|
+
|
|
100
128
|
For GitHub MCP (remote server OAuth), you can auto-discover endpoints and use PKCE:
|
|
101
129
|
|
|
102
130
|
```bash
|