@flytrap-qa/mcp 0.1.0 → 0.1.1
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 +2 -5
- package/package.json +1 -1
- package/src/config.js +2 -16
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -70,14 +70,11 @@ Public catalog (no key): `lookup_app`, `get_app_profile`, `lookup_sdk`, `lookup_
|
|
|
70
70
|
|
|
71
71
|
## Configuration
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
| --- | --- | --- |
|
|
75
|
-
| `FLYTRAP_API_KEY` | none | Personal API key from Settings > API keys (`ft_live_...`). Optional for catalog tools |
|
|
76
|
-
| `FLYTRAP_API_URL` | `https://api.flytrap.dev` | Override for self-hosted or local API. Must be https unless localhost |
|
|
73
|
+
The only setting is `FLYTRAP_API_KEY`: your personal key from Settings > API keys (`ft_live_...`). It is optional for the public catalog tools. The server always talks to `https://api.flytrap.dev`.
|
|
77
74
|
|
|
78
75
|
## Security
|
|
79
76
|
|
|
80
|
-
- The key is sent only to `
|
|
77
|
+
- The key is sent only to `https://api.flytrap.dev` as a `Bearer` header, over https. It is never written to disk or logged.
|
|
81
78
|
- Keys are scoped. A `read` key cannot start crawls, create keys or change billing, even if the agent asks. Revoke keys any time in the dashboard.
|
|
82
79
|
- Keys inherit the project permissions of the user who created them. A key never sees another account's private projects.
|
|
83
80
|
- Tool output is bounded (log windows, call caps, 4 MiB per response) and marked as untrusted app data, since bug titles, log lines and URLs originate from the crawled app and its traffic.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flytrap-qa/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "MCP server that lets your coding agent read FlyTrap crawl results: bugs with evidence, screen graphs, network hosts, SDKs and build diffs for your own apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/config.js
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const API_URL = 'https://api.flytrap.dev'
|
|
2
2
|
export const API_KEY_PATTERN = /^ft_live_[0-9a-f]{48}$/
|
|
3
3
|
export const SIGNUP_URL = 'https://app.flytrap.dev/register'
|
|
4
4
|
export const KEYS_URL = 'https://app.flytrap.dev/settings/api-keys'
|
|
5
5
|
|
|
6
|
-
const isLoopback = url => ['localhost', '127.0.0.1', '[::1]'].includes(url.hostname)
|
|
7
|
-
|
|
8
6
|
export const loadConfig = (env = process.env) => {
|
|
9
|
-
const rawUrl = (env.FLYTRAP_API_URL || DEFAULT_API_URL).trim().replace(/\/+$/, '')
|
|
10
|
-
let url
|
|
11
|
-
try {
|
|
12
|
-
url = new URL(rawUrl)
|
|
13
|
-
} catch {
|
|
14
|
-
throw new Error('FLYTRAP_API_URL is not a valid URL')
|
|
15
|
-
}
|
|
16
|
-
if (url.protocol !== 'https:' && !(url.protocol === 'http:' && isLoopback(url)))
|
|
17
|
-
throw new Error('FLYTRAP_API_URL must use https (http is only allowed for localhost)')
|
|
18
|
-
if (url.username || url.password)
|
|
19
|
-
throw new Error('FLYTRAP_API_URL must not embed credentials')
|
|
20
|
-
|
|
21
7
|
const apiKey = (env.FLYTRAP_API_KEY || '').trim() || null
|
|
22
8
|
if (apiKey && !API_KEY_PATTERN.test(apiKey))
|
|
23
9
|
throw new Error('FLYTRAP_API_KEY does not look like a FlyTrap key (expected ft_live_ followed by 48 hex chars)')
|
|
24
10
|
|
|
25
|
-
return {apiUrl:
|
|
11
|
+
return {apiUrl: API_URL, apiKey}
|
|
26
12
|
}
|
package/src/index.js
CHANGED
|
@@ -38,5 +38,5 @@ export const main = async () => {
|
|
|
38
38
|
const {server, config} = createServer()
|
|
39
39
|
const transport = new StdioServerTransport()
|
|
40
40
|
await server.connect(transport)
|
|
41
|
-
process.stderr.write(`flytrap-mcp ${version} ready (${config.apiKey ? 'authenticated' : 'public catalog only'}
|
|
41
|
+
process.stderr.write(`flytrap-mcp ${version} ready (${config.apiKey ? 'authenticated' : 'public catalog only'})\n`)
|
|
42
42
|
}
|