Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.2.3"
".": "4.2.4"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 4.2.4 (2025-11-13)

Full Changelog: [v4.2.3...v4.2.4](https://github.com/beeper/desktop-api-js/compare/v4.2.3...v4.2.4)

### Bug Fixes

* **mcp:** return tool execution error on jq failure ([cadbf31](https://github.com/beeper/desktop-api-js/commit/cadbf3111d4aff52467527cbad99abba90164cc8))


### Chores

* **mcp:** clarify http auth error ([79374fd](https://github.com/beeper/desktop-api-js/commit/79374fd11b48ad2c96097184b492b6f6f7710593))
* **mcp:** upgrade jq-web ([298fec2](https://github.com/beeper/desktop-api-js/commit/298fec2720697f7c36077104a2325ecd05d9a839))

## 4.2.3 (2025-11-08)

Full Changelog: [v4.2.2...v4.2.3](https://github.com/beeper/desktop-api-js/compare/v4.2.2...v4.2.3)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beeper/desktop-api",
"version": "4.2.3",
"version": "4.2.4",
"description": "The official TypeScript library for the Beeper Desktop API",
"author": "Beeper Desktop <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beeper/desktop-mcp",
"version": "4.2.3",
"version": "4.2.4",
"description": "The official MCP Server for the Beeper Desktop API",
"author": "Beeper Desktop <[email protected]>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -38,7 +38,7 @@
"date-fns": "^4.1.0",
"express": "^5.1.0",
"fuse.js": "^7.1.0",
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz",
"jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.8/jq-web.tar.gz",
"qs": "^6.14.0",
"typescript": "5.8.3",
"yargs": "^17.7.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/mcp-server/src/filtering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ export async function maybeFilter(jqFilter: unknown | undefined, response: any):
async function jq(json: any, jqFilter: string) {
return (await initJq).json(json, jqFilter);
}

export function isJqError(error: any): error is Error {
return error instanceof Error && 'stderr' in error;
}
4 changes: 3 additions & 1 deletion packages/mcp-server/src/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export const parseAuthHeaders = (req: IncomingMessage): Partial<ClientOptions> =
case 'Bearer':
return { accessToken: req.headers.authorization.slice('Bearer '.length) };
default:
throw new Error(`Unsupported authorization scheme`);
throw new Error(
'Unsupported authorization scheme. Expected the "Authorization" header to be a supported scheme (Bearer).',
);
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/mcp-server/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const newServer = ({
},
mcpOptions,
});
} catch {
} catch (error) {
const resourceIdentifier = oauthResourceIdentifier(req);
res.set(
'WWW-Authenticate',
Expand All @@ -62,7 +62,7 @@ const newServer = ({
jsonrpc: '2.0',
error: {
code: -32000,
message: 'Unauthorized',
message: `Unauthorized: ${error instanceof Error ? error.message : error}`,
},
});
return null;
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'beeper_desktop_api_api',
version: '4.2.3',
version: '4.2.4',
},
{
capabilities: { tools: {}, logging: {} },
Expand Down
12 changes: 12 additions & 0 deletions packages/mcp-server/src/tools/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ export async function asBinaryContentResult(response: Response): Promise<ToolCal
}
}

export function asErrorResult(message: string): ToolCallResult {
return {
content: [
{
type: 'text',
text: message,
},
],
isError: true,
};
}

export type Metadata = {
resource: string;
operation: 'read' | 'write';
Expand Down
6 changes: 3 additions & 3 deletions packages/mcp-server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2740,9 +2740,9 @@ jest@^29.4.0:
import-local "^3.0.2"
jest-cli "^29.7.0"

"jq-web@https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz":
version "0.8.6"
resolved "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz#14d0e126987736e82e964d675c3838b5944faa6f"
"jq-web@https://github.com/stainless-api/jq-web/releases/download/v0.8.8/jq-web.tar.gz":
version "0.8.8"
resolved "https://github.com/stainless-api/jq-web/releases/download/v0.8.8/jq-web.tar.gz#7849ef64bdfc28f70cbfc9888f886860e96da10d"

js-tokens@^4.0.0:
version "4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '4.2.3'; // x-release-please-version
export const VERSION = '4.2.4'; // x-release-please-version