7 views
-/https://github.com/berriai/litellm/issues/29408
GitHub · issue

#29408 MCP Server DB API: credentials.auth_value not persisted on POST /v1/mcp/server

  • State: open
  • Author: @unstoppablesssss

## Bug Description

When creating an MCP server via `POST /v1/mcp/server` with `auth_type: "bearer_token"` and `credentials.auth_value`, the `auth_value` is **not persisted** to the database. The server is created successfully (HTTP 201), but `GET /v1/mcp/server` returns `credentials: null` or `credentials: {}`.

The `encrypt_credentials()` function in `db.py` **does** handle `auth_value` encryption correctly, so the issue is in the create path — `credentials` are not being passed to the DB write.

## Environment

- **LiteLLM Version**: Reproduced on v1.86.0, v1.86.2, and v1.88.0rc1 - **OS**: macOS (ARM64) - **Database**: PostgreSQL - **Transport**: HTTP MCP server with bearer token auth

## Steps to Reproduce

```bash # 1. Create an HTTP MCP server with bearer token credentials curl -s -X POST http://localhost:4001/v1/mcp/server \ -H "Authorization: Bearer <MASTER_KEY>" \ -H "Content-Type: application/json" \ -d '{ "server_name": "test_auth_server", "transport": "http", "url": "https://example.com/mcp", "auth_type": "bearer_token", "credentials": { "auth_value": "os.environ/SOME_API_KEY" }, "mcp_access_groups": ["test"] }' # Returns 201 wi…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h52m47s ago — entered · #import:https:::github.com:berriai:litellm post #3089
The right issue is harder because it crosses MCP request handling, OpenAPI translation, header filtering, and outbound transport behavior, requiring broader tracing and compatibility testing. The left issue appears localized to a database create-path wiring defect with existing encryption support.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search