integrate-sdk 0.8.44-dev.0 → 0.8.46-dev.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/adapters/auto-routes.js +4 -44
- package/dist/adapters/index.js +4 -44
- package/dist/adapters/nextjs.js +4 -44
- package/dist/adapters/node.js +4 -44
- package/dist/adapters/svelte-kit.js +4 -44
- package/dist/adapters/tanstack-start.js +4 -44
- package/dist/index.d.ts +40 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -44
- package/dist/oauth.js +4 -44
- package/dist/server.js +4 -44
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/integrations/server-client.d.ts +1 -15
- package/dist/src/integrations/server-client.d.ts.map +1 -1
- package/index.ts +72 -20
- package/package.json +1 -1
|
@@ -1840,56 +1840,16 @@ class MCPClientBase {
|
|
|
1840
1840
|
return new Proxy({}, {
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
|
-
return async () => {
|
|
1844
|
-
|
|
1843
|
+
return async () => ({
|
|
1844
|
+
integrations: this.integrations.map((integration) => ({
|
|
1845
1845
|
id: integration.id,
|
|
1846
1846
|
name: integration.name || integration.id,
|
|
1847
1847
|
tools: integration.tools,
|
|
1848
1848
|
hasOAuth: !!integration.oauth,
|
|
1849
1849
|
scopes: integration.oauth?.scopes,
|
|
1850
1850
|
provider: integration.oauth?.provider
|
|
1851
|
-
}))
|
|
1852
|
-
|
|
1853
|
-
try {
|
|
1854
|
-
const serverResponse = await this.callServerToolInternal("list_all_providers");
|
|
1855
|
-
if (serverResponse.content && serverResponse.content.length > 0) {
|
|
1856
|
-
const textContent = serverResponse.content[0]?.text;
|
|
1857
|
-
if (textContent) {
|
|
1858
|
-
try {
|
|
1859
|
-
const parsed = JSON.parse(textContent);
|
|
1860
|
-
const integrations = parsed.integrations || [];
|
|
1861
|
-
for (const metadata of integrations) {
|
|
1862
|
-
const key = metadata.name.toLowerCase();
|
|
1863
|
-
serverMetadataMap.set(key, metadata);
|
|
1864
|
-
}
|
|
1865
|
-
} catch (parseError) {
|
|
1866
|
-
logger5.debug("Failed to parse server metadata response:", parseError);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
} catch (error) {
|
|
1871
|
-
logger5.debug("Failed to fetch server metadata, returning local-only data:", error);
|
|
1872
|
-
return { integrations: localIntegrations };
|
|
1873
|
-
}
|
|
1874
|
-
const mergedIntegrations = localIntegrations.map((local) => {
|
|
1875
|
-
const metadataKey = local.name.toLowerCase();
|
|
1876
|
-
const serverMetadata = serverMetadataMap.get(metadataKey);
|
|
1877
|
-
const idKey = local.id.toLowerCase();
|
|
1878
|
-
const serverMetadataById = serverMetadataMap.get(idKey) || serverMetadata;
|
|
1879
|
-
if (serverMetadataById) {
|
|
1880
|
-
return {
|
|
1881
|
-
...local,
|
|
1882
|
-
name: serverMetadataById.name || local.name,
|
|
1883
|
-
logoUrl: serverMetadataById.logo_url,
|
|
1884
|
-
description: serverMetadataById.description,
|
|
1885
|
-
owner: serverMetadataById.owner,
|
|
1886
|
-
exampleUsage: serverMetadataById.example_usage
|
|
1887
|
-
};
|
|
1888
|
-
}
|
|
1889
|
-
return local;
|
|
1890
|
-
});
|
|
1891
|
-
return { integrations: mergedIntegrations };
|
|
1892
|
-
};
|
|
1851
|
+
}))
|
|
1852
|
+
});
|
|
1893
1853
|
}
|
|
1894
1854
|
return async (args, options) => {
|
|
1895
1855
|
const toolName = methodToToolName(methodName, "");
|
package/dist/adapters/index.js
CHANGED
|
@@ -1840,56 +1840,16 @@ class MCPClientBase {
|
|
|
1840
1840
|
return new Proxy({}, {
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
|
-
return async () => {
|
|
1844
|
-
|
|
1843
|
+
return async () => ({
|
|
1844
|
+
integrations: this.integrations.map((integration) => ({
|
|
1845
1845
|
id: integration.id,
|
|
1846
1846
|
name: integration.name || integration.id,
|
|
1847
1847
|
tools: integration.tools,
|
|
1848
1848
|
hasOAuth: !!integration.oauth,
|
|
1849
1849
|
scopes: integration.oauth?.scopes,
|
|
1850
1850
|
provider: integration.oauth?.provider
|
|
1851
|
-
}))
|
|
1852
|
-
|
|
1853
|
-
try {
|
|
1854
|
-
const serverResponse = await this.callServerToolInternal("list_all_providers");
|
|
1855
|
-
if (serverResponse.content && serverResponse.content.length > 0) {
|
|
1856
|
-
const textContent = serverResponse.content[0]?.text;
|
|
1857
|
-
if (textContent) {
|
|
1858
|
-
try {
|
|
1859
|
-
const parsed = JSON.parse(textContent);
|
|
1860
|
-
const integrations = parsed.integrations || [];
|
|
1861
|
-
for (const metadata of integrations) {
|
|
1862
|
-
const key = metadata.name.toLowerCase();
|
|
1863
|
-
serverMetadataMap.set(key, metadata);
|
|
1864
|
-
}
|
|
1865
|
-
} catch (parseError) {
|
|
1866
|
-
logger5.debug("Failed to parse server metadata response:", parseError);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
} catch (error) {
|
|
1871
|
-
logger5.debug("Failed to fetch server metadata, returning local-only data:", error);
|
|
1872
|
-
return { integrations: localIntegrations };
|
|
1873
|
-
}
|
|
1874
|
-
const mergedIntegrations = localIntegrations.map((local) => {
|
|
1875
|
-
const metadataKey = local.name.toLowerCase();
|
|
1876
|
-
const serverMetadata = serverMetadataMap.get(metadataKey);
|
|
1877
|
-
const idKey = local.id.toLowerCase();
|
|
1878
|
-
const serverMetadataById = serverMetadataMap.get(idKey) || serverMetadata;
|
|
1879
|
-
if (serverMetadataById) {
|
|
1880
|
-
return {
|
|
1881
|
-
...local,
|
|
1882
|
-
name: serverMetadataById.name || local.name,
|
|
1883
|
-
logoUrl: serverMetadataById.logo_url,
|
|
1884
|
-
description: serverMetadataById.description,
|
|
1885
|
-
owner: serverMetadataById.owner,
|
|
1886
|
-
exampleUsage: serverMetadataById.example_usage
|
|
1887
|
-
};
|
|
1888
|
-
}
|
|
1889
|
-
return local;
|
|
1890
|
-
});
|
|
1891
|
-
return { integrations: mergedIntegrations };
|
|
1892
|
-
};
|
|
1851
|
+
}))
|
|
1852
|
+
});
|
|
1893
1853
|
}
|
|
1894
1854
|
return async (args, options) => {
|
|
1895
1855
|
const toolName = methodToToolName(methodName, "");
|
package/dist/adapters/nextjs.js
CHANGED
|
@@ -1840,56 +1840,16 @@ class MCPClientBase {
|
|
|
1840
1840
|
return new Proxy({}, {
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
|
-
return async () => {
|
|
1844
|
-
|
|
1843
|
+
return async () => ({
|
|
1844
|
+
integrations: this.integrations.map((integration) => ({
|
|
1845
1845
|
id: integration.id,
|
|
1846
1846
|
name: integration.name || integration.id,
|
|
1847
1847
|
tools: integration.tools,
|
|
1848
1848
|
hasOAuth: !!integration.oauth,
|
|
1849
1849
|
scopes: integration.oauth?.scopes,
|
|
1850
1850
|
provider: integration.oauth?.provider
|
|
1851
|
-
}))
|
|
1852
|
-
|
|
1853
|
-
try {
|
|
1854
|
-
const serverResponse = await this.callServerToolInternal("list_all_providers");
|
|
1855
|
-
if (serverResponse.content && serverResponse.content.length > 0) {
|
|
1856
|
-
const textContent = serverResponse.content[0]?.text;
|
|
1857
|
-
if (textContent) {
|
|
1858
|
-
try {
|
|
1859
|
-
const parsed = JSON.parse(textContent);
|
|
1860
|
-
const integrations = parsed.integrations || [];
|
|
1861
|
-
for (const metadata of integrations) {
|
|
1862
|
-
const key = metadata.name.toLowerCase();
|
|
1863
|
-
serverMetadataMap.set(key, metadata);
|
|
1864
|
-
}
|
|
1865
|
-
} catch (parseError) {
|
|
1866
|
-
logger5.debug("Failed to parse server metadata response:", parseError);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
} catch (error) {
|
|
1871
|
-
logger5.debug("Failed to fetch server metadata, returning local-only data:", error);
|
|
1872
|
-
return { integrations: localIntegrations };
|
|
1873
|
-
}
|
|
1874
|
-
const mergedIntegrations = localIntegrations.map((local) => {
|
|
1875
|
-
const metadataKey = local.name.toLowerCase();
|
|
1876
|
-
const serverMetadata = serverMetadataMap.get(metadataKey);
|
|
1877
|
-
const idKey = local.id.toLowerCase();
|
|
1878
|
-
const serverMetadataById = serverMetadataMap.get(idKey) || serverMetadata;
|
|
1879
|
-
if (serverMetadataById) {
|
|
1880
|
-
return {
|
|
1881
|
-
...local,
|
|
1882
|
-
name: serverMetadataById.name || local.name,
|
|
1883
|
-
logoUrl: serverMetadataById.logo_url,
|
|
1884
|
-
description: serverMetadataById.description,
|
|
1885
|
-
owner: serverMetadataById.owner,
|
|
1886
|
-
exampleUsage: serverMetadataById.example_usage
|
|
1887
|
-
};
|
|
1888
|
-
}
|
|
1889
|
-
return local;
|
|
1890
|
-
});
|
|
1891
|
-
return { integrations: mergedIntegrations };
|
|
1892
|
-
};
|
|
1851
|
+
}))
|
|
1852
|
+
});
|
|
1893
1853
|
}
|
|
1894
1854
|
return async (args, options) => {
|
|
1895
1855
|
const toolName = methodToToolName(methodName, "");
|
package/dist/adapters/node.js
CHANGED
|
@@ -1840,56 +1840,16 @@ class MCPClientBase {
|
|
|
1840
1840
|
return new Proxy({}, {
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
|
-
return async () => {
|
|
1844
|
-
|
|
1843
|
+
return async () => ({
|
|
1844
|
+
integrations: this.integrations.map((integration) => ({
|
|
1845
1845
|
id: integration.id,
|
|
1846
1846
|
name: integration.name || integration.id,
|
|
1847
1847
|
tools: integration.tools,
|
|
1848
1848
|
hasOAuth: !!integration.oauth,
|
|
1849
1849
|
scopes: integration.oauth?.scopes,
|
|
1850
1850
|
provider: integration.oauth?.provider
|
|
1851
|
-
}))
|
|
1852
|
-
|
|
1853
|
-
try {
|
|
1854
|
-
const serverResponse = await this.callServerToolInternal("list_all_providers");
|
|
1855
|
-
if (serverResponse.content && serverResponse.content.length > 0) {
|
|
1856
|
-
const textContent = serverResponse.content[0]?.text;
|
|
1857
|
-
if (textContent) {
|
|
1858
|
-
try {
|
|
1859
|
-
const parsed = JSON.parse(textContent);
|
|
1860
|
-
const integrations = parsed.integrations || [];
|
|
1861
|
-
for (const metadata of integrations) {
|
|
1862
|
-
const key = metadata.name.toLowerCase();
|
|
1863
|
-
serverMetadataMap.set(key, metadata);
|
|
1864
|
-
}
|
|
1865
|
-
} catch (parseError) {
|
|
1866
|
-
logger5.debug("Failed to parse server metadata response:", parseError);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
} catch (error) {
|
|
1871
|
-
logger5.debug("Failed to fetch server metadata, returning local-only data:", error);
|
|
1872
|
-
return { integrations: localIntegrations };
|
|
1873
|
-
}
|
|
1874
|
-
const mergedIntegrations = localIntegrations.map((local) => {
|
|
1875
|
-
const metadataKey = local.name.toLowerCase();
|
|
1876
|
-
const serverMetadata = serverMetadataMap.get(metadataKey);
|
|
1877
|
-
const idKey = local.id.toLowerCase();
|
|
1878
|
-
const serverMetadataById = serverMetadataMap.get(idKey) || serverMetadata;
|
|
1879
|
-
if (serverMetadataById) {
|
|
1880
|
-
return {
|
|
1881
|
-
...local,
|
|
1882
|
-
name: serverMetadataById.name || local.name,
|
|
1883
|
-
logoUrl: serverMetadataById.logo_url,
|
|
1884
|
-
description: serverMetadataById.description,
|
|
1885
|
-
owner: serverMetadataById.owner,
|
|
1886
|
-
exampleUsage: serverMetadataById.example_usage
|
|
1887
|
-
};
|
|
1888
|
-
}
|
|
1889
|
-
return local;
|
|
1890
|
-
});
|
|
1891
|
-
return { integrations: mergedIntegrations };
|
|
1892
|
-
};
|
|
1851
|
+
}))
|
|
1852
|
+
});
|
|
1893
1853
|
}
|
|
1894
1854
|
return async (args, options) => {
|
|
1895
1855
|
const toolName = methodToToolName(methodName, "");
|
|
@@ -1840,56 +1840,16 @@ class MCPClientBase {
|
|
|
1840
1840
|
return new Proxy({}, {
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
|
-
return async () => {
|
|
1844
|
-
|
|
1843
|
+
return async () => ({
|
|
1844
|
+
integrations: this.integrations.map((integration) => ({
|
|
1845
1845
|
id: integration.id,
|
|
1846
1846
|
name: integration.name || integration.id,
|
|
1847
1847
|
tools: integration.tools,
|
|
1848
1848
|
hasOAuth: !!integration.oauth,
|
|
1849
1849
|
scopes: integration.oauth?.scopes,
|
|
1850
1850
|
provider: integration.oauth?.provider
|
|
1851
|
-
}))
|
|
1852
|
-
|
|
1853
|
-
try {
|
|
1854
|
-
const serverResponse = await this.callServerToolInternal("list_all_providers");
|
|
1855
|
-
if (serverResponse.content && serverResponse.content.length > 0) {
|
|
1856
|
-
const textContent = serverResponse.content[0]?.text;
|
|
1857
|
-
if (textContent) {
|
|
1858
|
-
try {
|
|
1859
|
-
const parsed = JSON.parse(textContent);
|
|
1860
|
-
const integrations = parsed.integrations || [];
|
|
1861
|
-
for (const metadata of integrations) {
|
|
1862
|
-
const key = metadata.name.toLowerCase();
|
|
1863
|
-
serverMetadataMap.set(key, metadata);
|
|
1864
|
-
}
|
|
1865
|
-
} catch (parseError) {
|
|
1866
|
-
logger5.debug("Failed to parse server metadata response:", parseError);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
} catch (error) {
|
|
1871
|
-
logger5.debug("Failed to fetch server metadata, returning local-only data:", error);
|
|
1872
|
-
return { integrations: localIntegrations };
|
|
1873
|
-
}
|
|
1874
|
-
const mergedIntegrations = localIntegrations.map((local) => {
|
|
1875
|
-
const metadataKey = local.name.toLowerCase();
|
|
1876
|
-
const serverMetadata = serverMetadataMap.get(metadataKey);
|
|
1877
|
-
const idKey = local.id.toLowerCase();
|
|
1878
|
-
const serverMetadataById = serverMetadataMap.get(idKey) || serverMetadata;
|
|
1879
|
-
if (serverMetadataById) {
|
|
1880
|
-
return {
|
|
1881
|
-
...local,
|
|
1882
|
-
name: serverMetadataById.name || local.name,
|
|
1883
|
-
logoUrl: serverMetadataById.logo_url,
|
|
1884
|
-
description: serverMetadataById.description,
|
|
1885
|
-
owner: serverMetadataById.owner,
|
|
1886
|
-
exampleUsage: serverMetadataById.example_usage
|
|
1887
|
-
};
|
|
1888
|
-
}
|
|
1889
|
-
return local;
|
|
1890
|
-
});
|
|
1891
|
-
return { integrations: mergedIntegrations };
|
|
1892
|
-
};
|
|
1851
|
+
}))
|
|
1852
|
+
});
|
|
1893
1853
|
}
|
|
1894
1854
|
return async (args, options) => {
|
|
1895
1855
|
const toolName = methodToToolName(methodName, "");
|
|
@@ -1840,56 +1840,16 @@ class MCPClientBase {
|
|
|
1840
1840
|
return new Proxy({}, {
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
|
-
return async () => {
|
|
1844
|
-
|
|
1843
|
+
return async () => ({
|
|
1844
|
+
integrations: this.integrations.map((integration) => ({
|
|
1845
1845
|
id: integration.id,
|
|
1846
1846
|
name: integration.name || integration.id,
|
|
1847
1847
|
tools: integration.tools,
|
|
1848
1848
|
hasOAuth: !!integration.oauth,
|
|
1849
1849
|
scopes: integration.oauth?.scopes,
|
|
1850
1850
|
provider: integration.oauth?.provider
|
|
1851
|
-
}))
|
|
1852
|
-
|
|
1853
|
-
try {
|
|
1854
|
-
const serverResponse = await this.callServerToolInternal("list_all_providers");
|
|
1855
|
-
if (serverResponse.content && serverResponse.content.length > 0) {
|
|
1856
|
-
const textContent = serverResponse.content[0]?.text;
|
|
1857
|
-
if (textContent) {
|
|
1858
|
-
try {
|
|
1859
|
-
const parsed = JSON.parse(textContent);
|
|
1860
|
-
const integrations = parsed.integrations || [];
|
|
1861
|
-
for (const metadata of integrations) {
|
|
1862
|
-
const key = metadata.name.toLowerCase();
|
|
1863
|
-
serverMetadataMap.set(key, metadata);
|
|
1864
|
-
}
|
|
1865
|
-
} catch (parseError) {
|
|
1866
|
-
logger5.debug("Failed to parse server metadata response:", parseError);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
} catch (error) {
|
|
1871
|
-
logger5.debug("Failed to fetch server metadata, returning local-only data:", error);
|
|
1872
|
-
return { integrations: localIntegrations };
|
|
1873
|
-
}
|
|
1874
|
-
const mergedIntegrations = localIntegrations.map((local) => {
|
|
1875
|
-
const metadataKey = local.name.toLowerCase();
|
|
1876
|
-
const serverMetadata = serverMetadataMap.get(metadataKey);
|
|
1877
|
-
const idKey = local.id.toLowerCase();
|
|
1878
|
-
const serverMetadataById = serverMetadataMap.get(idKey) || serverMetadata;
|
|
1879
|
-
if (serverMetadataById) {
|
|
1880
|
-
return {
|
|
1881
|
-
...local,
|
|
1882
|
-
name: serverMetadataById.name || local.name,
|
|
1883
|
-
logoUrl: serverMetadataById.logo_url,
|
|
1884
|
-
description: serverMetadataById.description,
|
|
1885
|
-
owner: serverMetadataById.owner,
|
|
1886
|
-
exampleUsage: serverMetadataById.example_usage
|
|
1887
|
-
};
|
|
1888
|
-
}
|
|
1889
|
-
return local;
|
|
1890
|
-
});
|
|
1891
|
-
return { integrations: mergedIntegrations };
|
|
1892
|
-
};
|
|
1851
|
+
}))
|
|
1852
|
+
});
|
|
1893
1853
|
}
|
|
1894
1854
|
return async (args, options) => {
|
|
1895
1855
|
const toolName = methodToToolName(methodName, "");
|
package/dist/index.d.ts
CHANGED
|
@@ -5,42 +5,63 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```typescript
|
|
8
|
-
* //
|
|
8
|
+
* // Use the default client with all integrations
|
|
9
|
+
* import { client } from 'integrate-sdk';
|
|
10
|
+
*
|
|
11
|
+
* await client.github.listOwnRepos({});
|
|
12
|
+
*
|
|
13
|
+
* // Or create a custom client with different API configuration
|
|
9
14
|
* import { createMCPClient, githubIntegration } from 'integrate-sdk';
|
|
10
15
|
*
|
|
11
16
|
* // Example 1: Different API path (same origin)
|
|
12
|
-
* const
|
|
17
|
+
* const customClient = createMCPClient({
|
|
13
18
|
* apiRouteBase: '/custom/api/path', // Calls /custom/api/path/mcp
|
|
14
19
|
* integrations: [githubIntegration()],
|
|
15
20
|
* });
|
|
16
21
|
*
|
|
17
|
-
* await client.github.listOwnRepos({});
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```typescript
|
|
22
22
|
* // Example 2: Different API domain (cross-origin)
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* const client = createMCPClient({
|
|
23
|
+
* const crossOriginClient = createMCPClient({
|
|
26
24
|
* apiBaseUrl: 'https://api.example.com', // API on different domain
|
|
27
25
|
* apiRouteBase: '/api/integrate', // Calls https://api.example.com/api/integrate/mcp
|
|
28
26
|
* integrations: [githubIntegration()],
|
|
29
27
|
* });
|
|
30
28
|
* ```
|
|
29
|
+
*/
|
|
30
|
+
export * from './src/index.js';
|
|
31
|
+
/**
|
|
32
|
+
* Default MCP Client with all integrations pre-configured
|
|
33
|
+
*
|
|
34
|
+
* This is a singleton client instance that includes GitHub and Gmail integrations.
|
|
35
|
+
* You can use it directly without having to configure integrations.
|
|
36
|
+
*
|
|
37
|
+
* Default configuration:
|
|
38
|
+
* - Calls API routes at: {window.location.origin}/api/integrate/mcp
|
|
39
|
+
* - OAuth routes at: {window.location.origin}/api/integrate/oauth/*
|
|
40
|
+
* - Automatically detects if server uses database storage and skips localStorage accordingly
|
|
41
|
+
*
|
|
42
|
+
* For custom configuration (different apiBaseUrl, apiRouteBase, etc.),
|
|
43
|
+
* use `createMCPClient()` instead.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* import { client } from 'integrate-sdk';
|
|
48
|
+
*
|
|
49
|
+
* // Use GitHub integration
|
|
50
|
+
* const repos = await client.github.listOwnRepos({});
|
|
51
|
+
*
|
|
52
|
+
* // Use Gmail integration
|
|
53
|
+
* const messages = await client.gmail.listMessages({});
|
|
54
|
+
* ```
|
|
31
55
|
*
|
|
32
56
|
* @example
|
|
33
57
|
* ```typescript
|
|
34
|
-
* //
|
|
35
|
-
* import { createMCPClient, githubIntegration
|
|
36
|
-
*
|
|
37
|
-
* const
|
|
38
|
-
* integrations: [
|
|
39
|
-
* githubIntegration(),
|
|
40
|
-
* gmailIntegration(),
|
|
41
|
-
* ],
|
|
58
|
+
* // If you need server-side token management or custom config, create your own client:
|
|
59
|
+
* import { createMCPClient, githubIntegration } from 'integrate-sdk';
|
|
60
|
+
*
|
|
61
|
+
* const customClient = createMCPClient({
|
|
62
|
+
* integrations: [githubIntegration()],
|
|
42
63
|
* });
|
|
43
64
|
* ```
|
|
44
65
|
*/
|
|
45
|
-
export
|
|
66
|
+
export declare const client: import("./index.js").MCPClient<(import("./index.js").MCPIntegration<"github"> | import("./index.js").MCPIntegration<"gmail"> | import("./index.js").MCPIntegration<"notion"> | import("./index.js").MCPIntegration<"slack"> | import("./index.js").MCPIntegration<"linear"> | import("./index.js").MCPIntegration<"vercel"> | import("./index.js").MCPIntegration<"zendesk"> | import("./index.js").MCPIntegration<"stripe"> | import("./index.js").MCPIntegration<"gcal"> | import("./index.js").MCPIntegration<"outlook"> | import("./index.js").MCPIntegration<"airtable"> | import("./index.js").MCPIntegration<"todoist">)[]>;
|
|
46
67
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,cAAc,gBAAgB,CAAC;AAiB/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,MAAM,omBAejB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1868,56 +1868,16 @@ class MCPClientBase {
|
|
|
1868
1868
|
return new Proxy({}, {
|
|
1869
1869
|
get: (_target, methodName) => {
|
|
1870
1870
|
if (methodName === "listConfiguredIntegrations") {
|
|
1871
|
-
return async () => {
|
|
1872
|
-
|
|
1871
|
+
return async () => ({
|
|
1872
|
+
integrations: this.integrations.map((integration) => ({
|
|
1873
1873
|
id: integration.id,
|
|
1874
1874
|
name: integration.name || integration.id,
|
|
1875
1875
|
tools: integration.tools,
|
|
1876
1876
|
hasOAuth: !!integration.oauth,
|
|
1877
1877
|
scopes: integration.oauth?.scopes,
|
|
1878
1878
|
provider: integration.oauth?.provider
|
|
1879
|
-
}))
|
|
1880
|
-
|
|
1881
|
-
try {
|
|
1882
|
-
const serverResponse = await this.callServerToolInternal("list_all_providers");
|
|
1883
|
-
if (serverResponse.content && serverResponse.content.length > 0) {
|
|
1884
|
-
const textContent = serverResponse.content[0]?.text;
|
|
1885
|
-
if (textContent) {
|
|
1886
|
-
try {
|
|
1887
|
-
const parsed = JSON.parse(textContent);
|
|
1888
|
-
const integrations = parsed.integrations || [];
|
|
1889
|
-
for (const metadata of integrations) {
|
|
1890
|
-
const key = metadata.name.toLowerCase();
|
|
1891
|
-
serverMetadataMap.set(key, metadata);
|
|
1892
|
-
}
|
|
1893
|
-
} catch (parseError) {
|
|
1894
|
-
logger5.debug("Failed to parse server metadata response:", parseError);
|
|
1895
|
-
}
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
} catch (error) {
|
|
1899
|
-
logger5.debug("Failed to fetch server metadata, returning local-only data:", error);
|
|
1900
|
-
return { integrations: localIntegrations };
|
|
1901
|
-
}
|
|
1902
|
-
const mergedIntegrations = localIntegrations.map((local) => {
|
|
1903
|
-
const metadataKey = local.name.toLowerCase();
|
|
1904
|
-
const serverMetadata = serverMetadataMap.get(metadataKey);
|
|
1905
|
-
const idKey = local.id.toLowerCase();
|
|
1906
|
-
const serverMetadataById = serverMetadataMap.get(idKey) || serverMetadata;
|
|
1907
|
-
if (serverMetadataById) {
|
|
1908
|
-
return {
|
|
1909
|
-
...local,
|
|
1910
|
-
name: serverMetadataById.name || local.name,
|
|
1911
|
-
logoUrl: serverMetadataById.logo_url,
|
|
1912
|
-
description: serverMetadataById.description,
|
|
1913
|
-
owner: serverMetadataById.owner,
|
|
1914
|
-
exampleUsage: serverMetadataById.example_usage
|
|
1915
|
-
};
|
|
1916
|
-
}
|
|
1917
|
-
return local;
|
|
1918
|
-
});
|
|
1919
|
-
return { integrations: mergedIntegrations };
|
|
1920
|
-
};
|
|
1879
|
+
}))
|
|
1880
|
+
});
|
|
1921
1881
|
}
|
|
1922
1882
|
return async (args, options) => {
|
|
1923
1883
|
const toolName = methodToToolName(methodName, "");
|
|
@@ -11584,6 +11544,37 @@ init_cursor();
|
|
|
11584
11544
|
init_generic();
|
|
11585
11545
|
init_messages();
|
|
11586
11546
|
init_http_session();
|
|
11547
|
+
|
|
11548
|
+
// index.ts
|
|
11549
|
+
init_client();
|
|
11550
|
+
init_github();
|
|
11551
|
+
init_gmail();
|
|
11552
|
+
init_notion();
|
|
11553
|
+
init_slack();
|
|
11554
|
+
init_linear();
|
|
11555
|
+
init_vercel();
|
|
11556
|
+
init_zendesk();
|
|
11557
|
+
init_stripe();
|
|
11558
|
+
init_gcal();
|
|
11559
|
+
init_outlook();
|
|
11560
|
+
init_airtable();
|
|
11561
|
+
init_todoist();
|
|
11562
|
+
var client = createMCPClient({
|
|
11563
|
+
integrations: [
|
|
11564
|
+
githubIntegration(),
|
|
11565
|
+
gmailIntegration(),
|
|
11566
|
+
notionIntegration(),
|
|
11567
|
+
slackIntegration(),
|
|
11568
|
+
linearIntegration(),
|
|
11569
|
+
vercelIntegration(),
|
|
11570
|
+
zendeskIntegration(),
|
|
11571
|
+
stripeIntegration(),
|
|
11572
|
+
gcalIntegration(),
|
|
11573
|
+
outlookIntegration(),
|
|
11574
|
+
airtableIntegration(),
|
|
11575
|
+
todoistIntegration()
|
|
11576
|
+
]
|
|
11577
|
+
});
|
|
11587
11578
|
export {
|
|
11588
11579
|
zendeskIntegration,
|
|
11589
11580
|
youtubeIntegration,
|
|
@@ -11628,6 +11619,7 @@ export {
|
|
|
11628
11619
|
createOAuthRedirectHandler,
|
|
11629
11620
|
createNextOAuthHandler,
|
|
11630
11621
|
createMCPClient,
|
|
11622
|
+
client,
|
|
11631
11623
|
clearClientCache,
|
|
11632
11624
|
calcomIntegration,
|
|
11633
11625
|
airtableIntegration,
|
package/dist/oauth.js
CHANGED
|
@@ -1840,56 +1840,16 @@ class MCPClientBase {
|
|
|
1840
1840
|
return new Proxy({}, {
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
|
-
return async () => {
|
|
1844
|
-
|
|
1843
|
+
return async () => ({
|
|
1844
|
+
integrations: this.integrations.map((integration) => ({
|
|
1845
1845
|
id: integration.id,
|
|
1846
1846
|
name: integration.name || integration.id,
|
|
1847
1847
|
tools: integration.tools,
|
|
1848
1848
|
hasOAuth: !!integration.oauth,
|
|
1849
1849
|
scopes: integration.oauth?.scopes,
|
|
1850
1850
|
provider: integration.oauth?.provider
|
|
1851
|
-
}))
|
|
1852
|
-
|
|
1853
|
-
try {
|
|
1854
|
-
const serverResponse = await this.callServerToolInternal("list_all_providers");
|
|
1855
|
-
if (serverResponse.content && serverResponse.content.length > 0) {
|
|
1856
|
-
const textContent = serverResponse.content[0]?.text;
|
|
1857
|
-
if (textContent) {
|
|
1858
|
-
try {
|
|
1859
|
-
const parsed = JSON.parse(textContent);
|
|
1860
|
-
const integrations = parsed.integrations || [];
|
|
1861
|
-
for (const metadata of integrations) {
|
|
1862
|
-
const key = metadata.name.toLowerCase();
|
|
1863
|
-
serverMetadataMap.set(key, metadata);
|
|
1864
|
-
}
|
|
1865
|
-
} catch (parseError) {
|
|
1866
|
-
logger5.debug("Failed to parse server metadata response:", parseError);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
} catch (error) {
|
|
1871
|
-
logger5.debug("Failed to fetch server metadata, returning local-only data:", error);
|
|
1872
|
-
return { integrations: localIntegrations };
|
|
1873
|
-
}
|
|
1874
|
-
const mergedIntegrations = localIntegrations.map((local) => {
|
|
1875
|
-
const metadataKey = local.name.toLowerCase();
|
|
1876
|
-
const serverMetadata = serverMetadataMap.get(metadataKey);
|
|
1877
|
-
const idKey = local.id.toLowerCase();
|
|
1878
|
-
const serverMetadataById = serverMetadataMap.get(idKey) || serverMetadata;
|
|
1879
|
-
if (serverMetadataById) {
|
|
1880
|
-
return {
|
|
1881
|
-
...local,
|
|
1882
|
-
name: serverMetadataById.name || local.name,
|
|
1883
|
-
logoUrl: serverMetadataById.logo_url,
|
|
1884
|
-
description: serverMetadataById.description,
|
|
1885
|
-
owner: serverMetadataById.owner,
|
|
1886
|
-
exampleUsage: serverMetadataById.example_usage
|
|
1887
|
-
};
|
|
1888
|
-
}
|
|
1889
|
-
return local;
|
|
1890
|
-
});
|
|
1891
|
-
return { integrations: mergedIntegrations };
|
|
1892
|
-
};
|
|
1851
|
+
}))
|
|
1852
|
+
});
|
|
1893
1853
|
}
|
|
1894
1854
|
return async (args, options) => {
|
|
1895
1855
|
const toolName = methodToToolName(methodName, "");
|
package/dist/server.js
CHANGED
|
@@ -1840,56 +1840,16 @@ class MCPClientBase {
|
|
|
1840
1840
|
return new Proxy({}, {
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
|
-
return async () => {
|
|
1844
|
-
|
|
1843
|
+
return async () => ({
|
|
1844
|
+
integrations: this.integrations.map((integration) => ({
|
|
1845
1845
|
id: integration.id,
|
|
1846
1846
|
name: integration.name || integration.id,
|
|
1847
1847
|
tools: integration.tools,
|
|
1848
1848
|
hasOAuth: !!integration.oauth,
|
|
1849
1849
|
scopes: integration.oauth?.scopes,
|
|
1850
1850
|
provider: integration.oauth?.provider
|
|
1851
|
-
}))
|
|
1852
|
-
|
|
1853
|
-
try {
|
|
1854
|
-
const serverResponse = await this.callServerToolInternal("list_all_providers");
|
|
1855
|
-
if (serverResponse.content && serverResponse.content.length > 0) {
|
|
1856
|
-
const textContent = serverResponse.content[0]?.text;
|
|
1857
|
-
if (textContent) {
|
|
1858
|
-
try {
|
|
1859
|
-
const parsed = JSON.parse(textContent);
|
|
1860
|
-
const integrations = parsed.integrations || [];
|
|
1861
|
-
for (const metadata of integrations) {
|
|
1862
|
-
const key = metadata.name.toLowerCase();
|
|
1863
|
-
serverMetadataMap.set(key, metadata);
|
|
1864
|
-
}
|
|
1865
|
-
} catch (parseError) {
|
|
1866
|
-
logger5.debug("Failed to parse server metadata response:", parseError);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
} catch (error) {
|
|
1871
|
-
logger5.debug("Failed to fetch server metadata, returning local-only data:", error);
|
|
1872
|
-
return { integrations: localIntegrations };
|
|
1873
|
-
}
|
|
1874
|
-
const mergedIntegrations = localIntegrations.map((local) => {
|
|
1875
|
-
const metadataKey = local.name.toLowerCase();
|
|
1876
|
-
const serverMetadata = serverMetadataMap.get(metadataKey);
|
|
1877
|
-
const idKey = local.id.toLowerCase();
|
|
1878
|
-
const serverMetadataById = serverMetadataMap.get(idKey) || serverMetadata;
|
|
1879
|
-
if (serverMetadataById) {
|
|
1880
|
-
return {
|
|
1881
|
-
...local,
|
|
1882
|
-
name: serverMetadataById.name || local.name,
|
|
1883
|
-
logoUrl: serverMetadataById.logo_url,
|
|
1884
|
-
description: serverMetadataById.description,
|
|
1885
|
-
owner: serverMetadataById.owner,
|
|
1886
|
-
exampleUsage: serverMetadataById.example_usage
|
|
1887
|
-
};
|
|
1888
|
-
}
|
|
1889
|
-
return local;
|
|
1890
|
-
});
|
|
1891
|
-
return { integrations: mergedIntegrations };
|
|
1892
|
-
};
|
|
1851
|
+
}))
|
|
1852
|
+
});
|
|
1893
1853
|
}
|
|
1894
1854
|
return async (args, options) => {
|
|
1895
1855
|
const toolName = methodToToolName(methodName, "");
|
package/dist/src/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACV,OAAO,EAEP,mBAAmB,EAGpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAiB,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACrG,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MA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CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,kBAAkB,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAIjJ;;;;;;;;;OASG;IACG,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,kBAAkB,EAAE,iBAAiB,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAa7J;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAW9C;;;OAGG;IACG,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CA2BzD;AAmED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,eAAe,CAAC,aAAa,SAAS,SAAS,cAAc,EAAE,EAC7E,MAAM,EAAE,eAAe,CAAC,aAAa,CAAC,GACrC,SAAS,CAAC,aAAa,CAAC,CAsE1B;AAkFD;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAetD"}
|
|
@@ -20,22 +20,12 @@ export interface ServerIntegrationClient {
|
|
|
20
20
|
listAllProviders(): Promise<MCPToolCallResponse>;
|
|
21
21
|
/**
|
|
22
22
|
* List integrations configured on this SDK client
|
|
23
|
-
*
|
|
23
|
+
* Returns local configuration only (no server call)
|
|
24
24
|
*/
|
|
25
25
|
listConfiguredIntegrations(): Promise<{
|
|
26
26
|
integrations: ConfiguredIntegration[];
|
|
27
27
|
}>;
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Server-provided integration metadata from list_all_providers
|
|
31
|
-
*/
|
|
32
|
-
export interface IntegrationMetadata {
|
|
33
|
-
name: string;
|
|
34
|
-
logo_url?: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
owner?: string;
|
|
37
|
-
example_usage?: string;
|
|
38
|
-
}
|
|
39
29
|
/**
|
|
40
30
|
* Local integration metadata returned by listConfiguredIntegrations
|
|
41
31
|
*/
|
|
@@ -46,9 +36,5 @@ export interface ConfiguredIntegration {
|
|
|
46
36
|
hasOAuth: boolean;
|
|
47
37
|
scopes?: readonly string[];
|
|
48
38
|
provider?: string;
|
|
49
|
-
logoUrl?: string;
|
|
50
|
-
description?: string;
|
|
51
|
-
owner?: string;
|
|
52
|
-
exampleUsage?: string;
|
|
53
39
|
}
|
|
54
40
|
//# sourceMappingURL=server-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-client.d.ts","sourceRoot":"","sources":["../../../src/integrations/server-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,sBAAsB,CAAC,MAAM,EAAE;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEjC;;OAEG;IACH,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEjD;;;OAGG;IACH,0BAA0B,IAAI,OAAO,CAAC;QACpC,YAAY,EAAE,qBAAqB,EAAE,CAAC;KACvC,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"server-client.d.ts","sourceRoot":"","sources":["../../../src/integrations/server-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,sBAAsB,CAAC,MAAM,EAAE;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEjC;;OAEG;IACH,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEjD;;;OAGG;IACH,0BAA0B,IAAI,OAAO,CAAC;QACpC,YAAY,EAAE,qBAAqB,EAAE,CAAC;KACvC,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
package/index.ts
CHANGED
|
@@ -5,43 +5,95 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```typescript
|
|
8
|
-
* //
|
|
8
|
+
* // Use the default client with all integrations
|
|
9
|
+
* import { client } from 'integrate-sdk';
|
|
10
|
+
*
|
|
11
|
+
* await client.github.listOwnRepos({});
|
|
12
|
+
*
|
|
13
|
+
* // Or create a custom client with different API configuration
|
|
9
14
|
* import { createMCPClient, githubIntegration } from 'integrate-sdk';
|
|
10
15
|
*
|
|
11
16
|
* // Example 1: Different API path (same origin)
|
|
12
|
-
* const
|
|
17
|
+
* const customClient = createMCPClient({
|
|
13
18
|
* apiRouteBase: '/custom/api/path', // Calls /custom/api/path/mcp
|
|
14
19
|
* integrations: [githubIntegration()],
|
|
15
20
|
* });
|
|
16
21
|
*
|
|
17
|
-
* await client.github.listOwnRepos({});
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```typescript
|
|
22
22
|
* // Example 2: Different API domain (cross-origin)
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* const client = createMCPClient({
|
|
23
|
+
* const crossOriginClient = createMCPClient({
|
|
26
24
|
* apiBaseUrl: 'https://api.example.com', // API on different domain
|
|
27
25
|
* apiRouteBase: '/api/integrate', // Calls https://api.example.com/api/integrate/mcp
|
|
28
26
|
* integrations: [githubIntegration()],
|
|
29
27
|
* });
|
|
30
28
|
* ```
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
export * from './src/index.js';
|
|
32
|
+
|
|
33
|
+
// Export default client with all integrations pre-configured
|
|
34
|
+
import { createMCPClient } from './src/client.js';
|
|
35
|
+
import { githubIntegration } from './src/integrations/github.js';
|
|
36
|
+
import { gmailIntegration } from './src/integrations/gmail.js';
|
|
37
|
+
import { notionIntegration } from './src/integrations/notion.js';
|
|
38
|
+
import { slackIntegration } from './src/integrations/slack.js';
|
|
39
|
+
import { linearIntegration } from './src/integrations/linear.js';
|
|
40
|
+
import { vercelIntegration } from './src/integrations/vercel.js';
|
|
41
|
+
import { zendeskIntegration } from './src/integrations/zendesk.js';
|
|
42
|
+
import { stripeIntegration } from './src/integrations/stripe.js';
|
|
43
|
+
import { gcalIntegration } from './src/integrations/gcal.js';
|
|
44
|
+
import { outlookIntegration } from './src/integrations/outlook.js';
|
|
45
|
+
import { airtableIntegration } from './src/integrations/airtable.js';
|
|
46
|
+
import { todoistIntegration } from './src/integrations/todoist.js';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Default MCP Client with all integrations pre-configured
|
|
50
|
+
*
|
|
51
|
+
* This is a singleton client instance that includes GitHub and Gmail integrations.
|
|
52
|
+
* You can use it directly without having to configure integrations.
|
|
53
|
+
*
|
|
54
|
+
* Default configuration:
|
|
55
|
+
* - Calls API routes at: {window.location.origin}/api/integrate/mcp
|
|
56
|
+
* - OAuth routes at: {window.location.origin}/api/integrate/oauth/*
|
|
57
|
+
* - Automatically detects if server uses database storage and skips localStorage accordingly
|
|
58
|
+
*
|
|
59
|
+
* For custom configuration (different apiBaseUrl, apiRouteBase, etc.),
|
|
60
|
+
* use `createMCPClient()` instead.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* import { client } from 'integrate-sdk';
|
|
65
|
+
*
|
|
66
|
+
* // Use GitHub integration
|
|
67
|
+
* const repos = await client.github.listOwnRepos({});
|
|
68
|
+
*
|
|
69
|
+
* // Use Gmail integration
|
|
70
|
+
* const messages = await client.gmail.listMessages({});
|
|
71
|
+
* ```
|
|
31
72
|
*
|
|
32
73
|
* @example
|
|
33
74
|
* ```typescript
|
|
34
|
-
* //
|
|
35
|
-
* import { createMCPClient, githubIntegration
|
|
36
|
-
*
|
|
37
|
-
* const
|
|
38
|
-
* integrations: [
|
|
39
|
-
* githubIntegration(),
|
|
40
|
-
* gmailIntegration(),
|
|
41
|
-
* ],
|
|
75
|
+
* // If you need server-side token management or custom config, create your own client:
|
|
76
|
+
* import { createMCPClient, githubIntegration } from 'integrate-sdk';
|
|
77
|
+
*
|
|
78
|
+
* const customClient = createMCPClient({
|
|
79
|
+
* integrations: [githubIntegration()],
|
|
42
80
|
* });
|
|
43
81
|
* ```
|
|
44
82
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
83
|
+
export const client = createMCPClient({
|
|
84
|
+
integrations: [
|
|
85
|
+
githubIntegration(),
|
|
86
|
+
gmailIntegration(),
|
|
87
|
+
notionIntegration(),
|
|
88
|
+
slackIntegration(),
|
|
89
|
+
linearIntegration(),
|
|
90
|
+
vercelIntegration(),
|
|
91
|
+
zendeskIntegration(),
|
|
92
|
+
stripeIntegration(),
|
|
93
|
+
gcalIntegration(),
|
|
94
|
+
outlookIntegration(),
|
|
95
|
+
airtableIntegration(),
|
|
96
|
+
todoistIntegration(),
|
|
97
|
+
],
|
|
98
|
+
});
|
|
47
99
|
|