microsoft / microsoft/mcp

Postgres: Azure MCP doesn't support Vector

Open
#279 2 comments 0 reactions 1 assignee Assigned to @jumacabo View on GitHub
bug server-Azure.Mcp tools-Postgres
Dominant language
C#
Stars
3.7k
Forks
624
Avg merge
2d 20h
Merged PRs (30d)
220

Description

Hi folks,
When I'm using Azure MCP server and Postgres to return vector data, I'm running into a vector serilization error

```
{"status":500,"message":"Reading as \u0027System.Object\u0027 is not supported for fields having DataTypeName \u0027public.vector\u0027. To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azmcp/troubleshooting.","results":{"message":"Reading as \u0027System.Object\u0027 is not supported for fields having DataTypeName \u0027public.vector\u0027","stackTrace":" at Npgsql.Internal.AdoSerializerHelpers.\u003CGetTypeInfoForReading\u003Eg__ThrowReadingNotSupported|0_0(Type type, PgSerializerOptions options, PgTypeId pgTypeId, Exception inner)\n at Npgsql.Internal.AdoSerializerHelpers.GetTypeInfoForReading(Type type, PgTypeId pgTypeId, PgSerializerOptions options)\n at Npgsql.BackendMessages.FieldDescription.\u003CGetInfoCore\u003Eg__GetInfoSlow|51_0(Type type, ColumnInfo\u0026 lastColumnInfo)\n at Npgsql.BackendMessages.FieldDescription.GetInfoCore(Type type, ColumnInfo\u0026 lastColumnInfo)\n at Npgsql.BackendMessages.FieldDescription.get_ObjectInfo()\n at Npgsql.NpgsqlDataReader.GetValue(Int32 ordinal)\n at Npgsql.NpgsqlDataReader.get_Item(Int32 ordinal)\n at AzureMcp.Postgres.Services.PostgresService.ExecuteQueryAsync(String subscriptionId, String resourceGroup, String user, String server, String database, String query) in /Users/runner/work/1/s/areas/postgres/src/AzureMcp.Postgres/Services/PostgresService.cs:line 90\n at AzureMcp.Postgres.Services.PostgresService.ExecuteQueryAsync(String subscriptionId, String resourceGroup, String user, String server, String database, String query) in /Users/runner/work/1/s/areas/postgres/src/AzureMcp.Postgres/Services/PostgresService.cs:line 94\n at AzureMcp.Postgres.Services.PostgresService.ExecuteQueryAsync(String subscriptionId, String resourceGroup, String user, String server, String database, String query) in /Users/runner/work/1/s/areas/postgres/src/AzureMcp.Postgres/Services/PostgresService.cs:line 94\n at AzureMcp.Postgres.Services.PostgresService.ExecuteQueryAsync(String subscriptionId, String resourceGroup, String user, String server, String database, String query) in /Users/runner/work/1/s/areas/postgres/src/AzureMcp.Postgres/Services/PostgresService.cs:line 94\n at AzureMcp.Postgres.Commands.Database.DatabaseQueryCommand.ExecuteAsync(CommandContext context, ParseResult parseResult) in /Users/runner/work/1/s/areas/postgres/src/AzureMcp.Postgres/Commands/Database/DatabaseQueryCommand.cs:line 52","type":"InvalidCastException"},"duration":0}
```

**Repro:**

On a Postgres Database
{
"command": "postgres_database_query",
"intent": "execute SELECT query on documents table",
"parameters": {
"database": "****",
"query": "SELECT * FROM documents LIMIT 5",
"resource-group": "***",
"server": "***",
"subscription": "***",
"user": "****"
}
}

The table has a column with VECTOR type.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.