Skip to content

Commit 29f2ec6

Browse files
authored
Merge pull request #36 from SmartBear/release/v0.2.2
Release/v0.2.2
2 parents b425ed1 + 525eb30 commit 29f2ec6

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [0.2.2] - 2025-07-11
4+
- [API Hub] Add user agent header to API requests
5+
[#34](https://github.com/SmartBear/smartbear-mcp/pull/34)
6+
- [Reflect] Add user agent header to API requests
7+
[#34](https://github.com/SmartBear/smartbear-mcp/pull/34)
8+
39
## [0.2.1] - 2025-07-09
410
- Bumped `@modelcontextprotocol/sdk` to latest (v1.15.0)
511
[#29](https://github.com/SmartBear/smartbear-mcp/pull/29)

api-hub/client.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { z } from "zod";
22
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3+
import { MCP_SERVER_NAME, MCP_SERVER_VERSION } from "../common/info.js";
34
import { Client } from "../common/types.js";
45

56
// Type definitions for tool arguments
@@ -54,12 +55,13 @@ export interface updateProductArgs extends productArgs {
5455

5556
// Tool definitions for API Hub API client
5657
export class ApiHubClient implements Client {
57-
private headers: { "Authorization": string; "Content-Type": string };
58+
private headers: { "Authorization": string; "Content-Type": string, "User-Agent": string };
5859

5960
constructor(token: string) {
6061
this.headers = {
6162
"Authorization": `Bearer ${token}`,
6263
"Content-Type": "application/json",
64+
"User-Agent": `${MCP_SERVER_NAME}/${MCP_SERVER_VERSION}`,
6365
};
6466
}
6567

@@ -172,9 +174,9 @@ export class ApiHubClient implements Client {
172174
server.tool(
173175
"create_portal",
174176
"Create a new portal within API Hub.",
175-
{
176-
name: z.string().optional().describe("The portal name."),
177-
subdomain: z.string().describe("The portal subdomain."),
177+
{
178+
name: z.string().optional().describe("The portal name."),
179+
subdomain: z.string().describe("The portal subdomain."),
178180
offline: z.boolean().optional().describe("If set to true the portal will not be visible to customers."),
179181
routing: z.string().optional().describe("Determines the routing strategy ('browser' or 'proxy')."),
180182
credentialsEnabled: z.string().optional().describe("Indicates if credentials are enabled for the portal."),
@@ -305,4 +307,4 @@ export class ApiHubClient implements Client {
305307
},
306308
);
307309
}
308-
}
310+
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@smartbear/mcp",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "MCP server for interacting SmartBear Products",
55
"keywords": [
66
"smartbear",

reflect/client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2+
import { MCP_SERVER_NAME, MCP_SERVER_VERSION } from "../common/info.js";
23
import { Client } from "../common/types.js";
34
import { z } from "zod";
45

@@ -23,12 +24,13 @@ export interface testExecutionArgs {
2324

2425
// ReflectClient class implementing the Client interface
2526
export class ReflectClient implements Client {
26-
private headers: { "X-API-KEY": string; "Content-Type": string };
27+
private headers: { "X-API-KEY": string; "Content-Type": string, "User-Agent": string };
2728

2829
constructor(token: string) {
2930
this.headers = {
3031
"X-API-KEY": `${token}`,
3132
"Content-Type": "application/json",
33+
"User-Agent": `${MCP_SERVER_NAME}/${MCP_SERVER_VERSION}`,
3234
};
3335
}
3436

0 commit comments

Comments
 (0)