Skip to content

Commit 3baa7fd

Browse files
committed
fix readme and types
1 parent 7afb559 commit 3baa7fd

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ const deployment = await tadata.mcp.deploy({
3535
spec: source,
3636
specBaseUrl: 'https://acme.com/api',
3737
name: 'Acme API', // Optional
38+
39+
// Optional: Configure authentication handling
40+
authConfig: {
41+
passHeaders: ['authorization'], // Specify which headers to pass through. Defaults to ['authorization', 'api-key', 'api_key', 'apikey', 'x-api-key', 'x-apikey']
42+
passQueryParams: ['api_key'], // Specify which query parameters to pass through. Defaults to ['api-key', 'api_key', 'apikey']
43+
},
3844
});
3945

4046
console.log(`Deployed Model Context Protocol (MCP) server: ${deployment.url}`);

src/resources/mcp/types.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,34 @@ export interface McpDeployInput {
2626
* @example "My Customer API Proxy"
2727
*/
2828
name?: string;
29+
30+
/**
31+
* Optional configuration for handling authentication between the MCP and your API.
32+
* Controls which headers, query parameters, and other auth-related data are passed through.
33+
* @example { passHeaders: ['authorization', 'x-api-key'], passQueryParams: ['api_key'] }
34+
*/
35+
authConfig?: {
36+
/**
37+
* List of HTTP headers that should be passed from requests to the MCP through to your API.
38+
* @default ['authorization', 'api-key', 'api_key', 'apikey', 'x-api-key', 'x-apikey']
39+
*/
40+
passHeaders?: string[];
41+
/**
42+
* List of query parameters that should be passed from requests to the MCP through to your API.
43+
* @default ['api-key', 'api_key', 'apikey']
44+
*/
45+
passQueryParams?: string[];
46+
/**
47+
* List of JSON body fields that should be extracted from requests to the MCP and passed to your API.
48+
* @default []
49+
*/
50+
passJsonBodyParams?: string[];
51+
/**
52+
* List of form data fields that should be extracted from requests to the MCP and passed to your API.
53+
* @default []
54+
*/
55+
passFormDataParams?: string[];
56+
};
2957
}
3058

3159
/**

0 commit comments

Comments
 (0)