lettr-mcp 1.3.0 → 1.4.0
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/dist/index.js +1 -1
- package/dist/lettr.js +4 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ if (!apiKey) {
|
|
|
15
15
|
console.error('No API key provided. Please set LETTR_API_KEY environment variable or use --key argument');
|
|
16
16
|
process.exit(1);
|
|
17
17
|
}
|
|
18
|
-
const lettr = new LettrClient(apiKey);
|
|
18
|
+
const lettr = new LettrClient(apiKey, packageJson.version);
|
|
19
19
|
const server = new McpServer({
|
|
20
20
|
name: 'lettr',
|
|
21
21
|
version: packageJson.version,
|
package/dist/lettr.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
const BASE_URL = 'https://app.lettr.com/api';
|
|
2
2
|
export class LettrClient {
|
|
3
3
|
apiKey;
|
|
4
|
-
|
|
4
|
+
version;
|
|
5
|
+
constructor(apiKey, version) {
|
|
5
6
|
this.apiKey = apiKey;
|
|
7
|
+
this.version = version;
|
|
6
8
|
}
|
|
7
9
|
async request(method, path, body, query) {
|
|
8
10
|
const url = new URL(`${BASE_URL}${path}`);
|
|
@@ -16,6 +18,7 @@ export class LettrClient {
|
|
|
16
18
|
const headers = {
|
|
17
19
|
Authorization: `Bearer ${this.apiKey}`,
|
|
18
20
|
Accept: 'application/json',
|
|
21
|
+
'User-Agent': `lettr-mcp/${this.version}`,
|
|
19
22
|
};
|
|
20
23
|
const options = { method, headers };
|
|
21
24
|
if (body &&
|
package/dist/package.json
CHANGED
package/package.json
CHANGED