Skip to content

Commit 4828200

Browse files
committed
chore: add postgresql integration
1 parent 94d0c74 commit 4828200

File tree

6 files changed

+85
-1
lines changed

6 files changed

+85
-1
lines changed

apps/web/src/lib/integrationTypeOptions.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ export const HOSTED_INTEGRATION_TYPE_OPTIONS: Record<
124124
label: 'Neon',
125125
icon: 'neon',
126126
},
127+
[HostedIntegrationType.Postgres]: {
128+
label: 'PostgreSQL',
129+
icon: 'postgres',
130+
},
127131
}
128132

129133
export function integrationOptions(

packages/constants/src/integrations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export enum HostedIntegrationType {
3737
// Gmail = 'google_drive', // env vars not supported, requires auth file
3838
// GoogleCalendar = 'google_drive', // env vars not supported, requires auth file
3939
// GoogleDrive = 'google_drive', // env vars not supported, requires auth file
40-
// Postgres = 'postgres', // Uses a custom parameter in the command instead of env vars
40+
Postgres = 'postgres', // Uses a custom parameter in the command instead of env vars
4141
// Redis = 'redis', // Uses a custom parameter in the command instead of env vars
4242
// SQLite = 'sqlite', // Uses a custom parameter in the command instead of env vars
4343

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { HostedIntegrationConfig } from '../types'
2+
import { npxCommand } from '../utils'
3+
4+
export default {
5+
description:
6+
'This integration enables read only access to a Postgres database.',
7+
command: npxCommand({
8+
package: '@modelcontextprotocol/server-postgres',
9+
args: '$POSTGRES_URL',
10+
}),
11+
env: {
12+
POSTGRES_URL: {
13+
label: 'Postgres URL',
14+
description: 'The URL of your Postgres database',
15+
placeholder: 'postgresql://user:password@host:port/database',
16+
required: true,
17+
},
18+
},
19+
} as HostedIntegrationConfig

packages/core/src/services/integrations/hostedTypes/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import SENTRY_MCP_CONFIG from './configs/sentry'
2323
import TIME_MCP_CONFIG from './configs/time'
2424
import browserbase_MCP_CONFIG from './configs/browserbase'
2525
import NEON_MCP_CONFIG from './configs/neon'
26+
import POSTGRES_MCP_CONFIG from './configs/postgres'
2627

2728
export const HOSTED_MCP_CONFIGS: Record<
2829
HostedIntegrationType,
@@ -51,4 +52,5 @@ export const HOSTED_MCP_CONFIGS: Record<
5152
[HostedIntegrationType.Time]: TIME_MCP_CONFIG,
5253
[HostedIntegrationType.browserbase]: browserbase_MCP_CONFIG,
5354
[HostedIntegrationType.Neon]: NEON_MCP_CONFIG,
55+
[HostedIntegrationType.Postgres]: POSTGRES_MCP_CONFIG,
5456
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { LucideProps } from 'lucide-react'
2+
3+
export default function Postgres(props: LucideProps) {
4+
return (
5+
<svg viewBox='0 0 25.6 25.6' {...props}>
6+
<style></style>
7+
<g fill='none' stroke='#fff'>
8+
<path
9+
d='M18.983 18.636c.163-1.357.114-1.555 1.124-1.336l.257.023c.777.035 1.793-.125 2.4-.402 1.285-.596 2.047-1.592.78-1.33-2.89.596-3.1-.383-3.1-.383 3.053-4.53 4.33-10.28 3.227-11.687-3.004-3.84-8.205-2.024-8.292-1.976l-.028.005c-.57-.12-1.2-.19-1.93-.2-1.308-.02-2.3.343-3.054.914 0 0-9.277-3.822-8.846 4.807.092 1.836 2.63 13.9 5.66 10.25C8.29 15.987 9.36 14.86 9.36 14.86c.53.353 1.167.533 1.834.468l.052-.044a2.01 2.01 0 0 0 .021.518c-.78.872-.55 1.025-2.11 1.346-1.578.325-.65.904-.046 1.056.734.184 2.432.444 3.58-1.162l-.046.183c.306.245.285 1.76.33 2.842s.116 2.093.337 2.688.48 2.13 2.53 1.7c1.713-.367 3.023-.896 3.143-5.81'
10+
fill='#000'
11+
stroke='#000'
12+
strokeLinecap='butt'
13+
strokeWidth='2.149'
14+
className='D'
15+
/>
16+
<path
17+
d='M23.535 15.6c-2.89.596-3.1-.383-3.1-.383 3.053-4.53 4.33-10.28 3.228-11.687-3.004-3.84-8.205-2.023-8.292-1.976l-.028.005a10.31 10.31 0 0 0-1.929-.201c-1.308-.02-2.3.343-3.054.914 0 0-9.278-3.822-8.846 4.807.092 1.836 2.63 13.9 5.66 10.25C8.29 15.987 9.36 14.86 9.36 14.86c.53.353 1.167.533 1.834.468l.052-.044a2.02 2.02 0 0 0 .021.518c-.78.872-.55 1.025-2.11 1.346-1.578.325-.65.904-.046 1.056.734.184 2.432.444 3.58-1.162l-.046.183c.306.245.52 1.593.484 2.815s-.06 2.06.18 2.716.48 2.13 2.53 1.7c1.713-.367 2.6-1.32 2.725-2.906.088-1.128.286-.962.3-1.97l.16-.478c.183-1.53.03-2.023 1.085-1.793l.257.023c.777.035 1.794-.125 2.39-.402 1.285-.596 2.047-1.592.78-1.33z'
18+
fill='currentColor'
19+
stroke='none'
20+
/>
21+
<g className='E'>
22+
<g className='B'>
23+
<path
24+
d='M12.814 16.467c-.08 2.846.02 5.712.298 6.4s.875 2.05 2.926 1.612c1.713-.367 2.337-1.078 2.607-2.647l.633-5.017M10.356 2.2S1.072-1.596 1.504 7.033c.092 1.836 2.63 13.9 5.66 10.25C8.27 15.95 9.27 14.907 9.27 14.907m6.1-13.4c-.32.1 5.164-2.005 8.282 1.978 1.1 1.407-.175 7.157-3.228 11.687'
25+
className='C'
26+
/>
27+
<path
28+
d='M20.425 15.17s.2.98 3.1.382c1.267-.262.504.734-.78 1.33-1.054.49-3.418.615-3.457-.06-.1-1.745 1.244-1.215 1.147-1.652-.088-.394-.69-.78-1.086-1.744-.347-.84-4.76-7.29 1.224-6.333.22-.045-1.56-5.7-7.16-5.782S7.99 8.196 7.99 8.196'
29+
strokeLinejoin='bevel'
30+
/>
31+
</g>
32+
<g className='C'>
33+
<path d='M11.247 15.768c-.78.872-.55 1.025-2.11 1.346-1.578.325-.65.904-.046 1.056.734.184 2.432.444 3.58-1.163.35-.49-.002-1.27-.482-1.468-.232-.096-.542-.216-.94.23z' />
34+
<path
35+
d='M11.196 15.753c-.08-.513.168-1.122.433-1.836.398-1.07 1.316-2.14.582-5.537-.547-2.53-4.22-.527-4.22-.184s.166 1.74-.06 3.365c-.297 2.122 1.35 3.916 3.246 3.733'
36+
className='B'
37+
/>
38+
</g>
39+
</g>
40+
<g fill='#fff' className='D'>
41+
<path
42+
d='M10.322 8.145c-.017.117.215.43.516.472s.558-.202.575-.32-.215-.246-.516-.288-.56.02-.575.136z'
43+
strokeWidth='.239'
44+
/>
45+
<path
46+
d='M19.486 7.906c.016.117-.215.43-.516.472s-.56-.202-.575-.32.215-.246.516-.288.56.02.575.136z'
47+
strokeWidth='.119'
48+
/>
49+
</g>
50+
<path
51+
d='M20.562 7.095c.05.92-.198 1.545-.23 2.524-.046 1.422.678 3.05-.413 4.68'
52+
className='B C E'
53+
/>
54+
</g>
55+
</svg>
56+
)
57+
}

packages/web-ui/src/ds/atoms/Icons/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ import Brave from './custom-icons/logos/Brave'
122122
import Sentry from './custom-icons/logos/Sentry'
123123
import Browserbase from './custom-icons/logos/Browserbase'
124124
import Neon from './custom-icons/logos/Neon'
125+
import Postgres from './custom-icons/logos/Postgres'
125126

126127
const Icons = {
127128
addCircle: CirclePlus,
@@ -246,6 +247,7 @@ const Icons = {
246247
sentry: Sentry,
247248
browserbase: Browserbase,
248249
neon: Neon,
250+
postgres: Postgres,
249251
}
250252

251253
export type IconName = keyof typeof Icons

0 commit comments

Comments
 (0)