integrate-sdk 0.8.45-dev.0 → 0.8.47-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 +15 -49
- package/dist/adapters/index.js +15 -49
- package/dist/adapters/nextjs.js +15 -49
- package/dist/adapters/node.js +15 -49
- package/dist/adapters/svelte-kit.js +15 -49
- package/dist/adapters/tanstack-start.js +15 -49
- package/dist/index.d.ts +37 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +65 -50
- package/dist/oauth.js +15 -49
- package/dist/server.js +15 -49
- 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/dist/src/server.d.ts.map +1 -1
- package/index.ts +88 -31
- package/package.json +1 -1
|
@@ -1841,54 +1841,18 @@ class MCPClientBase {
|
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
1843
|
return async () => {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
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 };
|
|
1844
|
+
const serverConfig = this.__oauthConfig;
|
|
1845
|
+
const configuredIntegrations = serverConfig?.integrations || this.integrations;
|
|
1846
|
+
return {
|
|
1847
|
+
integrations: configuredIntegrations.map((integration) => ({
|
|
1848
|
+
id: integration.id,
|
|
1849
|
+
name: integration.name || integration.id,
|
|
1850
|
+
tools: integration.tools,
|
|
1851
|
+
hasOAuth: !!integration.oauth,
|
|
1852
|
+
scopes: integration.oauth?.scopes,
|
|
1853
|
+
provider: integration.oauth?.provider
|
|
1854
|
+
}))
|
|
1855
|
+
};
|
|
1892
1856
|
};
|
|
1893
1857
|
}
|
|
1894
1858
|
return async (args, options) => {
|
|
@@ -9761,7 +9725,8 @@ function createMCPServer(config) {
|
|
|
9761
9725
|
globalServerConfig = {
|
|
9762
9726
|
providers,
|
|
9763
9727
|
serverUrl: config.serverUrl,
|
|
9764
|
-
apiKey: config.apiKey
|
|
9728
|
+
apiKey: config.apiKey,
|
|
9729
|
+
integrations: updatedIntegrations
|
|
9765
9730
|
};
|
|
9766
9731
|
const clientConfig = {
|
|
9767
9732
|
...config,
|
|
@@ -9777,6 +9742,7 @@ function createMCPServer(config) {
|
|
|
9777
9742
|
providers,
|
|
9778
9743
|
serverUrl: config.serverUrl,
|
|
9779
9744
|
apiKey: config.apiKey,
|
|
9745
|
+
integrations: updatedIntegrations,
|
|
9780
9746
|
getSessionContext: config.getSessionContext,
|
|
9781
9747
|
setProviderToken: config.setProviderToken,
|
|
9782
9748
|
removeProviderToken: config.removeProviderToken
|
package/dist/adapters/index.js
CHANGED
|
@@ -1841,54 +1841,18 @@ class MCPClientBase {
|
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
1843
|
return async () => {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
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 };
|
|
1844
|
+
const serverConfig = this.__oauthConfig;
|
|
1845
|
+
const configuredIntegrations = serverConfig?.integrations || this.integrations;
|
|
1846
|
+
return {
|
|
1847
|
+
integrations: configuredIntegrations.map((integration) => ({
|
|
1848
|
+
id: integration.id,
|
|
1849
|
+
name: integration.name || integration.id,
|
|
1850
|
+
tools: integration.tools,
|
|
1851
|
+
hasOAuth: !!integration.oauth,
|
|
1852
|
+
scopes: integration.oauth?.scopes,
|
|
1853
|
+
provider: integration.oauth?.provider
|
|
1854
|
+
}))
|
|
1855
|
+
};
|
|
1892
1856
|
};
|
|
1893
1857
|
}
|
|
1894
1858
|
return async (args, options) => {
|
|
@@ -9761,7 +9725,8 @@ function createMCPServer(config) {
|
|
|
9761
9725
|
globalServerConfig = {
|
|
9762
9726
|
providers,
|
|
9763
9727
|
serverUrl: config.serverUrl,
|
|
9764
|
-
apiKey: config.apiKey
|
|
9728
|
+
apiKey: config.apiKey,
|
|
9729
|
+
integrations: updatedIntegrations
|
|
9765
9730
|
};
|
|
9766
9731
|
const clientConfig = {
|
|
9767
9732
|
...config,
|
|
@@ -9777,6 +9742,7 @@ function createMCPServer(config) {
|
|
|
9777
9742
|
providers,
|
|
9778
9743
|
serverUrl: config.serverUrl,
|
|
9779
9744
|
apiKey: config.apiKey,
|
|
9745
|
+
integrations: updatedIntegrations,
|
|
9780
9746
|
getSessionContext: config.getSessionContext,
|
|
9781
9747
|
setProviderToken: config.setProviderToken,
|
|
9782
9748
|
removeProviderToken: config.removeProviderToken
|
package/dist/adapters/nextjs.js
CHANGED
|
@@ -1841,54 +1841,18 @@ class MCPClientBase {
|
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
1843
|
return async () => {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
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 };
|
|
1844
|
+
const serverConfig = this.__oauthConfig;
|
|
1845
|
+
const configuredIntegrations = serverConfig?.integrations || this.integrations;
|
|
1846
|
+
return {
|
|
1847
|
+
integrations: configuredIntegrations.map((integration) => ({
|
|
1848
|
+
id: integration.id,
|
|
1849
|
+
name: integration.name || integration.id,
|
|
1850
|
+
tools: integration.tools,
|
|
1851
|
+
hasOAuth: !!integration.oauth,
|
|
1852
|
+
scopes: integration.oauth?.scopes,
|
|
1853
|
+
provider: integration.oauth?.provider
|
|
1854
|
+
}))
|
|
1855
|
+
};
|
|
1892
1856
|
};
|
|
1893
1857
|
}
|
|
1894
1858
|
return async (args, options) => {
|
|
@@ -9761,7 +9725,8 @@ function createMCPServer(config) {
|
|
|
9761
9725
|
globalServerConfig = {
|
|
9762
9726
|
providers,
|
|
9763
9727
|
serverUrl: config.serverUrl,
|
|
9764
|
-
apiKey: config.apiKey
|
|
9728
|
+
apiKey: config.apiKey,
|
|
9729
|
+
integrations: updatedIntegrations
|
|
9765
9730
|
};
|
|
9766
9731
|
const clientConfig = {
|
|
9767
9732
|
...config,
|
|
@@ -9777,6 +9742,7 @@ function createMCPServer(config) {
|
|
|
9777
9742
|
providers,
|
|
9778
9743
|
serverUrl: config.serverUrl,
|
|
9779
9744
|
apiKey: config.apiKey,
|
|
9745
|
+
integrations: updatedIntegrations,
|
|
9780
9746
|
getSessionContext: config.getSessionContext,
|
|
9781
9747
|
setProviderToken: config.setProviderToken,
|
|
9782
9748
|
removeProviderToken: config.removeProviderToken
|
package/dist/adapters/node.js
CHANGED
|
@@ -1841,54 +1841,18 @@ class MCPClientBase {
|
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
1843
|
return async () => {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
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 };
|
|
1844
|
+
const serverConfig = this.__oauthConfig;
|
|
1845
|
+
const configuredIntegrations = serverConfig?.integrations || this.integrations;
|
|
1846
|
+
return {
|
|
1847
|
+
integrations: configuredIntegrations.map((integration) => ({
|
|
1848
|
+
id: integration.id,
|
|
1849
|
+
name: integration.name || integration.id,
|
|
1850
|
+
tools: integration.tools,
|
|
1851
|
+
hasOAuth: !!integration.oauth,
|
|
1852
|
+
scopes: integration.oauth?.scopes,
|
|
1853
|
+
provider: integration.oauth?.provider
|
|
1854
|
+
}))
|
|
1855
|
+
};
|
|
1892
1856
|
};
|
|
1893
1857
|
}
|
|
1894
1858
|
return async (args, options) => {
|
|
@@ -9761,7 +9725,8 @@ function createMCPServer(config) {
|
|
|
9761
9725
|
globalServerConfig = {
|
|
9762
9726
|
providers,
|
|
9763
9727
|
serverUrl: config.serverUrl,
|
|
9764
|
-
apiKey: config.apiKey
|
|
9728
|
+
apiKey: config.apiKey,
|
|
9729
|
+
integrations: updatedIntegrations
|
|
9765
9730
|
};
|
|
9766
9731
|
const clientConfig = {
|
|
9767
9732
|
...config,
|
|
@@ -9777,6 +9742,7 @@ function createMCPServer(config) {
|
|
|
9777
9742
|
providers,
|
|
9778
9743
|
serverUrl: config.serverUrl,
|
|
9779
9744
|
apiKey: config.apiKey,
|
|
9745
|
+
integrations: updatedIntegrations,
|
|
9780
9746
|
getSessionContext: config.getSessionContext,
|
|
9781
9747
|
setProviderToken: config.setProviderToken,
|
|
9782
9748
|
removeProviderToken: config.removeProviderToken
|
|
@@ -1841,54 +1841,18 @@ class MCPClientBase {
|
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
1843
|
return async () => {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
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 };
|
|
1844
|
+
const serverConfig = this.__oauthConfig;
|
|
1845
|
+
const configuredIntegrations = serverConfig?.integrations || this.integrations;
|
|
1846
|
+
return {
|
|
1847
|
+
integrations: configuredIntegrations.map((integration) => ({
|
|
1848
|
+
id: integration.id,
|
|
1849
|
+
name: integration.name || integration.id,
|
|
1850
|
+
tools: integration.tools,
|
|
1851
|
+
hasOAuth: !!integration.oauth,
|
|
1852
|
+
scopes: integration.oauth?.scopes,
|
|
1853
|
+
provider: integration.oauth?.provider
|
|
1854
|
+
}))
|
|
1855
|
+
};
|
|
1892
1856
|
};
|
|
1893
1857
|
}
|
|
1894
1858
|
return async (args, options) => {
|
|
@@ -9761,7 +9725,8 @@ function createMCPServer(config) {
|
|
|
9761
9725
|
globalServerConfig = {
|
|
9762
9726
|
providers,
|
|
9763
9727
|
serverUrl: config.serverUrl,
|
|
9764
|
-
apiKey: config.apiKey
|
|
9728
|
+
apiKey: config.apiKey,
|
|
9729
|
+
integrations: updatedIntegrations
|
|
9765
9730
|
};
|
|
9766
9731
|
const clientConfig = {
|
|
9767
9732
|
...config,
|
|
@@ -9777,6 +9742,7 @@ function createMCPServer(config) {
|
|
|
9777
9742
|
providers,
|
|
9778
9743
|
serverUrl: config.serverUrl,
|
|
9779
9744
|
apiKey: config.apiKey,
|
|
9745
|
+
integrations: updatedIntegrations,
|
|
9780
9746
|
getSessionContext: config.getSessionContext,
|
|
9781
9747
|
setProviderToken: config.setProviderToken,
|
|
9782
9748
|
removeProviderToken: config.removeProviderToken
|
|
@@ -1841,54 +1841,18 @@ class MCPClientBase {
|
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
1843
|
return async () => {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
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 };
|
|
1844
|
+
const serverConfig = this.__oauthConfig;
|
|
1845
|
+
const configuredIntegrations = serverConfig?.integrations || this.integrations;
|
|
1846
|
+
return {
|
|
1847
|
+
integrations: configuredIntegrations.map((integration) => ({
|
|
1848
|
+
id: integration.id,
|
|
1849
|
+
name: integration.name || integration.id,
|
|
1850
|
+
tools: integration.tools,
|
|
1851
|
+
hasOAuth: !!integration.oauth,
|
|
1852
|
+
scopes: integration.oauth?.scopes,
|
|
1853
|
+
provider: integration.oauth?.provider
|
|
1854
|
+
}))
|
|
1855
|
+
};
|
|
1892
1856
|
};
|
|
1893
1857
|
}
|
|
1894
1858
|
return async (args, options) => {
|
|
@@ -9761,7 +9725,8 @@ function createMCPServer(config) {
|
|
|
9761
9725
|
globalServerConfig = {
|
|
9762
9726
|
providers,
|
|
9763
9727
|
serverUrl: config.serverUrl,
|
|
9764
|
-
apiKey: config.apiKey
|
|
9728
|
+
apiKey: config.apiKey,
|
|
9729
|
+
integrations: updatedIntegrations
|
|
9765
9730
|
};
|
|
9766
9731
|
const clientConfig = {
|
|
9767
9732
|
...config,
|
|
@@ -9777,6 +9742,7 @@ function createMCPServer(config) {
|
|
|
9777
9742
|
providers,
|
|
9778
9743
|
serverUrl: config.serverUrl,
|
|
9779
9744
|
apiKey: config.apiKey,
|
|
9745
|
+
integrations: updatedIntegrations,
|
|
9780
9746
|
getSessionContext: config.getSessionContext,
|
|
9781
9747
|
setProviderToken: config.setProviderToken,
|
|
9782
9748
|
removeProviderToken: config.removeProviderToken
|
package/dist/index.d.ts
CHANGED
|
@@ -5,52 +5,63 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```typescript
|
|
8
|
-
* // Use default client
|
|
8
|
+
* // Use the default client with all integrations
|
|
9
9
|
* import { client } from 'integrate-sdk';
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* const providers = await client.server.listAllProviders();
|
|
13
|
-
* ```
|
|
11
|
+
* await client.github.listOwnRepos({});
|
|
14
12
|
*
|
|
15
|
-
*
|
|
16
|
-
* ```typescript
|
|
17
|
-
* // Create a client with explicitly configured integrations
|
|
13
|
+
* // Or create a custom client with different API configuration
|
|
18
14
|
* import { createMCPClient, githubIntegration } from 'integrate-sdk';
|
|
19
15
|
*
|
|
20
16
|
* // Example 1: Different API path (same origin)
|
|
21
|
-
* const
|
|
17
|
+
* const customClient = createMCPClient({
|
|
22
18
|
* apiRouteBase: '/custom/api/path', // Calls /custom/api/path/mcp
|
|
23
19
|
* integrations: [githubIntegration()],
|
|
24
20
|
* });
|
|
25
21
|
*
|
|
26
|
-
* await client.github.listOwnRepos({});
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```typescript
|
|
31
22
|
* // Example 2: Different API domain (cross-origin)
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* const client = createMCPClient({
|
|
23
|
+
* const crossOriginClient = createMCPClient({
|
|
35
24
|
* apiBaseUrl: 'https://api.example.com', // API on different domain
|
|
36
25
|
* apiRouteBase: '/api/integrate', // Calls https://api.example.com/api/integrate/mcp
|
|
37
26
|
* integrations: [githubIntegration()],
|
|
38
27
|
* });
|
|
39
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
|
+
* ```
|
|
40
55
|
*
|
|
41
56
|
* @example
|
|
42
57
|
* ```typescript
|
|
43
|
-
* //
|
|
44
|
-
* import { createMCPClient, githubIntegration
|
|
45
|
-
*
|
|
46
|
-
* const
|
|
47
|
-
* integrations: [
|
|
48
|
-
* githubIntegration(),
|
|
49
|
-
* gmailIntegration(),
|
|
50
|
-
* ],
|
|
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()],
|
|
51
63
|
* });
|
|
52
64
|
* ```
|
|
53
65
|
*/
|
|
54
|
-
export
|
|
55
|
-
export declare const client: import("./index.js").MCPClient<never[]>;
|
|
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"> | import("./index.js").MCPIntegration<"whatsapp"> | import("./index.js").MCPIntegration<"calcom"> | import("./index.js").MCPIntegration<"ramp"> | import("./index.js").MCPIntegration<"onedrive"> | import("./index.js").MCPIntegration<"gworkspace"> | import("./index.js").MCPIntegration<"polar"> | import("./index.js").MCPIntegration<"figma"> | import("./index.js").MCPIntegration<"intercom"> | import("./index.js").MCPIntegration<"hubspot"> | import("./index.js").MCPIntegration<"youtube"> | import("./index.js").MCPIntegration<"cursor">)[]>;
|
|
56
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;AA4B/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,MAAM,4nCA0BjB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1869,54 +1869,18 @@ class MCPClientBase {
|
|
|
1869
1869
|
get: (_target, methodName) => {
|
|
1870
1870
|
if (methodName === "listConfiguredIntegrations") {
|
|
1871
1871
|
return async () => {
|
|
1872
|
-
const
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
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 };
|
|
1872
|
+
const serverConfig = this.__oauthConfig;
|
|
1873
|
+
const configuredIntegrations = serverConfig?.integrations || this.integrations;
|
|
1874
|
+
return {
|
|
1875
|
+
integrations: configuredIntegrations.map((integration) => ({
|
|
1876
|
+
id: integration.id,
|
|
1877
|
+
name: integration.name || integration.id,
|
|
1878
|
+
tools: integration.tools,
|
|
1879
|
+
hasOAuth: !!integration.oauth,
|
|
1880
|
+
scopes: integration.oauth?.scopes,
|
|
1881
|
+
provider: integration.oauth?.provider
|
|
1882
|
+
}))
|
|
1883
|
+
};
|
|
1920
1884
|
};
|
|
1921
1885
|
}
|
|
1922
1886
|
return async (args, options) => {
|
|
@@ -10136,7 +10100,8 @@ function createMCPServer(config) {
|
|
|
10136
10100
|
globalServerConfig = {
|
|
10137
10101
|
providers,
|
|
10138
10102
|
serverUrl: config.serverUrl,
|
|
10139
|
-
apiKey: config.apiKey
|
|
10103
|
+
apiKey: config.apiKey,
|
|
10104
|
+
integrations: updatedIntegrations
|
|
10140
10105
|
};
|
|
10141
10106
|
const clientConfig = {
|
|
10142
10107
|
...config,
|
|
@@ -10152,6 +10117,7 @@ function createMCPServer(config) {
|
|
|
10152
10117
|
providers,
|
|
10153
10118
|
serverUrl: config.serverUrl,
|
|
10154
10119
|
apiKey: config.apiKey,
|
|
10120
|
+
integrations: updatedIntegrations,
|
|
10155
10121
|
getSessionContext: config.getSessionContext,
|
|
10156
10122
|
setProviderToken: config.setProviderToken,
|
|
10157
10123
|
removeProviderToken: config.removeProviderToken
|
|
@@ -11584,9 +11550,58 @@ init_cursor();
|
|
|
11584
11550
|
init_generic();
|
|
11585
11551
|
init_messages();
|
|
11586
11552
|
init_http_session();
|
|
11553
|
+
|
|
11587
11554
|
// index.ts
|
|
11555
|
+
init_client();
|
|
11556
|
+
init_github();
|
|
11557
|
+
init_gmail();
|
|
11558
|
+
init_notion();
|
|
11559
|
+
init_slack();
|
|
11560
|
+
init_linear();
|
|
11561
|
+
init_vercel();
|
|
11562
|
+
init_zendesk();
|
|
11563
|
+
init_stripe();
|
|
11564
|
+
init_gcal();
|
|
11565
|
+
init_outlook();
|
|
11566
|
+
init_airtable();
|
|
11567
|
+
init_todoist();
|
|
11568
|
+
init_whatsapp();
|
|
11569
|
+
init_calcom();
|
|
11570
|
+
init_ramp();
|
|
11571
|
+
init_onedrive();
|
|
11572
|
+
init_gworkspace();
|
|
11573
|
+
init_polar();
|
|
11574
|
+
init_figma();
|
|
11575
|
+
init_intercom();
|
|
11576
|
+
init_hubspot();
|
|
11577
|
+
init_youtube();
|
|
11578
|
+
init_cursor();
|
|
11588
11579
|
var client = createMCPClient({
|
|
11589
|
-
integrations: [
|
|
11580
|
+
integrations: [
|
|
11581
|
+
githubIntegration(),
|
|
11582
|
+
gmailIntegration(),
|
|
11583
|
+
notionIntegration(),
|
|
11584
|
+
slackIntegration(),
|
|
11585
|
+
linearIntegration(),
|
|
11586
|
+
vercelIntegration(),
|
|
11587
|
+
zendeskIntegration(),
|
|
11588
|
+
stripeIntegration(),
|
|
11589
|
+
gcalIntegration(),
|
|
11590
|
+
outlookIntegration(),
|
|
11591
|
+
airtableIntegration(),
|
|
11592
|
+
todoistIntegration(),
|
|
11593
|
+
whatsappIntegration(),
|
|
11594
|
+
calcomIntegration(),
|
|
11595
|
+
rampIntegration(),
|
|
11596
|
+
onedriveIntegration(),
|
|
11597
|
+
gworkspaceIntegration(),
|
|
11598
|
+
polarIntegration(),
|
|
11599
|
+
figmaIntegration(),
|
|
11600
|
+
intercomIntegration(),
|
|
11601
|
+
hubspotIntegration(),
|
|
11602
|
+
youtubeIntegration(),
|
|
11603
|
+
cursorIntegration()
|
|
11604
|
+
]
|
|
11590
11605
|
});
|
|
11591
11606
|
export {
|
|
11592
11607
|
zendeskIntegration,
|
package/dist/oauth.js
CHANGED
|
@@ -1841,54 +1841,18 @@ class MCPClientBase {
|
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
1843
|
return async () => {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
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 };
|
|
1844
|
+
const serverConfig = this.__oauthConfig;
|
|
1845
|
+
const configuredIntegrations = serverConfig?.integrations || this.integrations;
|
|
1846
|
+
return {
|
|
1847
|
+
integrations: configuredIntegrations.map((integration) => ({
|
|
1848
|
+
id: integration.id,
|
|
1849
|
+
name: integration.name || integration.id,
|
|
1850
|
+
tools: integration.tools,
|
|
1851
|
+
hasOAuth: !!integration.oauth,
|
|
1852
|
+
scopes: integration.oauth?.scopes,
|
|
1853
|
+
provider: integration.oauth?.provider
|
|
1854
|
+
}))
|
|
1855
|
+
};
|
|
1892
1856
|
};
|
|
1893
1857
|
}
|
|
1894
1858
|
return async (args, options) => {
|
|
@@ -9970,7 +9934,8 @@ function createMCPServer(config) {
|
|
|
9970
9934
|
globalServerConfig = {
|
|
9971
9935
|
providers,
|
|
9972
9936
|
serverUrl: config.serverUrl,
|
|
9973
|
-
apiKey: config.apiKey
|
|
9937
|
+
apiKey: config.apiKey,
|
|
9938
|
+
integrations: updatedIntegrations
|
|
9974
9939
|
};
|
|
9975
9940
|
const clientConfig = {
|
|
9976
9941
|
...config,
|
|
@@ -9986,6 +9951,7 @@ function createMCPServer(config) {
|
|
|
9986
9951
|
providers,
|
|
9987
9952
|
serverUrl: config.serverUrl,
|
|
9988
9953
|
apiKey: config.apiKey,
|
|
9954
|
+
integrations: updatedIntegrations,
|
|
9989
9955
|
getSessionContext: config.getSessionContext,
|
|
9990
9956
|
setProviderToken: config.setProviderToken,
|
|
9991
9957
|
removeProviderToken: config.removeProviderToken
|
package/dist/server.js
CHANGED
|
@@ -1841,54 +1841,18 @@ class MCPClientBase {
|
|
|
1841
1841
|
get: (_target, methodName) => {
|
|
1842
1842
|
if (methodName === "listConfiguredIntegrations") {
|
|
1843
1843
|
return async () => {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
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 };
|
|
1844
|
+
const serverConfig = this.__oauthConfig;
|
|
1845
|
+
const configuredIntegrations = serverConfig?.integrations || this.integrations;
|
|
1846
|
+
return {
|
|
1847
|
+
integrations: configuredIntegrations.map((integration) => ({
|
|
1848
|
+
id: integration.id,
|
|
1849
|
+
name: integration.name || integration.id,
|
|
1850
|
+
tools: integration.tools,
|
|
1851
|
+
hasOAuth: !!integration.oauth,
|
|
1852
|
+
scopes: integration.oauth?.scopes,
|
|
1853
|
+
provider: integration.oauth?.provider
|
|
1854
|
+
}))
|
|
1855
|
+
};
|
|
1892
1856
|
};
|
|
1893
1857
|
}
|
|
1894
1858
|
return async (args, options) => {
|
|
@@ -10535,7 +10499,8 @@ function createMCPServer(config) {
|
|
|
10535
10499
|
globalServerConfig = {
|
|
10536
10500
|
providers,
|
|
10537
10501
|
serverUrl: config.serverUrl,
|
|
10538
|
-
apiKey: config.apiKey
|
|
10502
|
+
apiKey: config.apiKey,
|
|
10503
|
+
integrations: updatedIntegrations
|
|
10539
10504
|
};
|
|
10540
10505
|
const clientConfig = {
|
|
10541
10506
|
...config,
|
|
@@ -10551,6 +10516,7 @@ function createMCPServer(config) {
|
|
|
10551
10516
|
providers,
|
|
10552
10517
|
serverUrl: config.serverUrl,
|
|
10553
10518
|
apiKey: config.apiKey,
|
|
10519
|
+
integrations: updatedIntegrations,
|
|
10554
10520
|
getSessionContext: config.getSessionContext,
|
|
10555
10521
|
setProviderToken: config.setProviderToken,
|
|
10556
10522
|
removeProviderToken: config.removeProviderToken
|
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,EA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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,SA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CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC,CAAC;IACH,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,EACH,gBAAgB,CAAC,EAAE;IACjB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,WAOsB,GAAG,KAAG,OAAO,CAAC,QAAQ,CAAC,CAgE/C"}
|
package/index.ts
CHANGED
|
@@ -5,60 +5,117 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```typescript
|
|
8
|
-
* // Use default client
|
|
8
|
+
* // Use the default client with all integrations
|
|
9
9
|
* import { client } from 'integrate-sdk';
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* const providers = await client.server.listAllProviders();
|
|
13
|
-
* ```
|
|
11
|
+
* await client.github.listOwnRepos({});
|
|
14
12
|
*
|
|
15
|
-
*
|
|
16
|
-
* ```typescript
|
|
17
|
-
* // Create a client with explicitly configured integrations
|
|
13
|
+
* // Or create a custom client with different API configuration
|
|
18
14
|
* import { createMCPClient, githubIntegration } from 'integrate-sdk';
|
|
19
15
|
*
|
|
20
16
|
* // Example 1: Different API path (same origin)
|
|
21
|
-
* const
|
|
17
|
+
* const customClient = createMCPClient({
|
|
22
18
|
* apiRouteBase: '/custom/api/path', // Calls /custom/api/path/mcp
|
|
23
19
|
* integrations: [githubIntegration()],
|
|
24
20
|
* });
|
|
25
21
|
*
|
|
26
|
-
* await client.github.listOwnRepos({});
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```typescript
|
|
31
22
|
* // Example 2: Different API domain (cross-origin)
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* const client = createMCPClient({
|
|
23
|
+
* const crossOriginClient = createMCPClient({
|
|
35
24
|
* apiBaseUrl: 'https://api.example.com', // API on different domain
|
|
36
25
|
* apiRouteBase: '/api/integrate', // Calls https://api.example.com/api/integrate/mcp
|
|
37
26
|
* integrations: [githubIntegration()],
|
|
38
27
|
* });
|
|
39
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
|
+
import { whatsappIntegration } from './src/integrations/whatsapp.js';
|
|
48
|
+
import { calcomIntegration } from './src/integrations/calcom.js';
|
|
49
|
+
import { rampIntegration } from './src/integrations/ramp.js';
|
|
50
|
+
import { onedriveIntegration } from './src/integrations/onedrive.js';
|
|
51
|
+
import { gworkspaceIntegration } from './src/integrations/gworkspace.js';
|
|
52
|
+
import { polarIntegration } from './src/integrations/polar.js';
|
|
53
|
+
import { figmaIntegration } from './src/integrations/figma.js';
|
|
54
|
+
import { intercomIntegration } from './src/integrations/intercom.js';
|
|
55
|
+
import { hubspotIntegration } from './src/integrations/hubspot.js';
|
|
56
|
+
import { youtubeIntegration } from './src/integrations/youtube.js';
|
|
57
|
+
import { cursorIntegration } from './src/integrations/cursor.js';
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Default MCP Client with all integrations pre-configured
|
|
61
|
+
*
|
|
62
|
+
* This is a singleton client instance that includes GitHub and Gmail integrations.
|
|
63
|
+
* You can use it directly without having to configure integrations.
|
|
64
|
+
*
|
|
65
|
+
* Default configuration:
|
|
66
|
+
* - Calls API routes at: {window.location.origin}/api/integrate/mcp
|
|
67
|
+
* - OAuth routes at: {window.location.origin}/api/integrate/oauth/*
|
|
68
|
+
* - Automatically detects if server uses database storage and skips localStorage accordingly
|
|
69
|
+
*
|
|
70
|
+
* For custom configuration (different apiBaseUrl, apiRouteBase, etc.),
|
|
71
|
+
* use `createMCPClient()` instead.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* import { client } from 'integrate-sdk';
|
|
76
|
+
*
|
|
77
|
+
* // Use GitHub integration
|
|
78
|
+
* const repos = await client.github.listOwnRepos({});
|
|
79
|
+
*
|
|
80
|
+
* // Use Gmail integration
|
|
81
|
+
* const messages = await client.gmail.listMessages({});
|
|
82
|
+
* ```
|
|
40
83
|
*
|
|
41
84
|
* @example
|
|
42
85
|
* ```typescript
|
|
43
|
-
* //
|
|
44
|
-
* import { createMCPClient, githubIntegration
|
|
86
|
+
* // If you need server-side token management or custom config, create your own client:
|
|
87
|
+
* import { createMCPClient, githubIntegration } from 'integrate-sdk';
|
|
45
88
|
*
|
|
46
|
-
* const
|
|
47
|
-
* integrations: [
|
|
48
|
-
* githubIntegration(),
|
|
49
|
-
* gmailIntegration(),
|
|
50
|
-
* ],
|
|
89
|
+
* const customClient = createMCPClient({
|
|
90
|
+
* integrations: [githubIntegration()],
|
|
51
91
|
* });
|
|
52
92
|
* ```
|
|
53
93
|
*/
|
|
54
|
-
|
|
55
|
-
export * from './src/index.js';
|
|
56
|
-
|
|
57
|
-
// Default client export with no integrations pre-configured
|
|
58
|
-
// Users can use this for server methods or configure integrations themselves
|
|
59
|
-
import { createMCPClient } from './src/index.js';
|
|
60
|
-
|
|
61
94
|
export const client = createMCPClient({
|
|
62
|
-
integrations: [
|
|
95
|
+
integrations: [
|
|
96
|
+
githubIntegration(),
|
|
97
|
+
gmailIntegration(),
|
|
98
|
+
notionIntegration(),
|
|
99
|
+
slackIntegration(),
|
|
100
|
+
linearIntegration(),
|
|
101
|
+
vercelIntegration(),
|
|
102
|
+
zendeskIntegration(),
|
|
103
|
+
stripeIntegration(),
|
|
104
|
+
gcalIntegration(),
|
|
105
|
+
outlookIntegration(),
|
|
106
|
+
airtableIntegration(),
|
|
107
|
+
todoistIntegration(),
|
|
108
|
+
whatsappIntegration(),
|
|
109
|
+
calcomIntegration(),
|
|
110
|
+
rampIntegration(),
|
|
111
|
+
onedriveIntegration(),
|
|
112
|
+
gworkspaceIntegration(),
|
|
113
|
+
polarIntegration(),
|
|
114
|
+
figmaIntegration(),
|
|
115
|
+
intercomIntegration(),
|
|
116
|
+
hubspotIntegration(),
|
|
117
|
+
youtubeIntegration(),
|
|
118
|
+
cursorIntegration(),
|
|
119
|
+
],
|
|
63
120
|
});
|
|
64
121
|
|