litellm - ✅(Solved) Fix [Bug]: issue while adding Custom MCP server [4 pull requests, 13 comments, 6 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#23869Fetched 2026-04-08 00:54:13
View on GitHub
Comments
13
Participants
6
Timeline
28
Reactions
7
Timeline (top)
commented ×13subscribed ×7cross-referenced ×3mentioned ×3

Error Message

15:51:50 - LiteLLM Proxy:ERROR: mcp_management_endpoints.py:1259 - Error creating mcp server: Could not find field at createOneLiteLLM_MCPServerTable.data.approval_status Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/litellm/proxy/management_endpoints/mcp_management_endpoints.py", line 1249, in add_mcp_server new_mcp_server = await create_mcp_server( ^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "/usr/lib/python3.13/site-packages/litellm/proxy/_experimental/mcp_server/db.py", line 390, in create_mcp_server new_mcp_server = await prisma_client.db.litellm_mcpservertable.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ data=data_dict # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/lib/python3.13/site-packages/prisma/actions.py", line 11497, in create resp = await self._client._execute( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<6 lines>... ) ^ File "/usr/lib/python3.13/site-packages/prisma/client.py", line 651, in _execute return await self._engine.query(builder.build(), tx_id=self._tx_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/prisma/engine/query.py", line 244, in query return await self.request( ^^^^^^^^^^^^^^^^^^^ ...<4 lines>... ) ^ File "/usr/lib/python3.13/site-packages/prisma/engine/http.py", line 141, in request return utils.handle_response_errors(resp, errors_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/prisma/engine/utils.py", line 192, in handle_response_errors raise exc(error) prisma.errors.FieldNotFoundError: Could not find field at createOneLiteLLM_MCPServerTable.data.approval_status INFO: 10.6.28.79:54652 - "POST /v1/mcp/server HTTP/1.1" 500 Internal Server Error

Fix Action

Fixed

PR fix notes

PR #24132: Fix: missing fields in model LiteLLM_MCPServerTable in schema.prisma

Description (problem / solution / changelog)

Relevant issues

Fixes #23869

Type

🐛 Bug Fix

Changes

  • The schema.prisma file in root was out of sync from other prisma file and that was causing mcp server create to fail because of the missing fields
  • Added all missing fields in the schema.prisma

Changed files

  • schema.prisma (modified, +7/-0)

PR #24133: Fix: missing fields in model LiteLLM_MCPServerTable in schema.prisma

Description (problem / solution / changelog)

Relevant issues

Fixes #23869

Type

🐛 Bug Fix

Changes

  • The schema.prisma file in root was out of sync from other prisma file and that was causing mcp server create to fail because of the missing fields
  • Added all missing fields in the schema.prisma

Changed files

  • schema.prisma (modified, +9/-0)

PR #18368: Pin singleimage litellm

Description (problem / solution / changelog)

Description

Pins litellm to v1.81.14 (stable) across Docker, Helm, and the single-image build to prevent version drift. Changing how we use prisma, added in #18059 Using USE_PRISMA_MIGRATE="True" as recommended in https://docs.litellm.ai/docs/proxy/prod#9-use-prisma-migrate-deploy

Launchcontrol

Pins litellm to v1.81.14 (stable) across Docker, Helm, and the single-image build to prevent version drift.

<!-- This is an auto-generated description by cubic. -->

Summary by cubic

Pins litellm to v1.81.14 across Docker, Helm, and the single-image build. Improves single-image startup by waiting for LiteLLM readiness with a timeout, soft-failing if it’s not ready, and fixing Prisma initialization. Also makes the “AI models” settings visible to all workspaces.

  • Dependencies

    • Use ghcr.io/berriai/litellm:main-v1.81.14-stable in Docker Compose and Helm.
    • Pin PyPI install in the single-image Dockerfile to litellm[proxy]==1.81.14.
    • Add hosting/litellm-version.json and scripts/syncLiteLLMVersion.js, plus check:litellm-version/sync:litellm-version and a CI check.
  • Bug Fixes

    • Single-image: wait for LiteLLM /health/liveliness with a timeout; continue app/worker startup if not ready.
    • Enable Prisma migrations (USE_PRISMA_MIGRATE=true) and remove litellm_proxy_extras Prisma generate to avoid init errors.

<sup>Written for commit 2fc60fee2d7a2c71b0cac7dc3c7cbebd797eefc8. Summary will update on new commits.</sup>

<!-- End of auto-generated description by cubic. -->

Changed files

  • .github/workflows/budibase_ci.yml (modified, +16/-0)
  • charts/budibase/values.yaml (modified, +1/-1)
  • hosting/docker-compose.build.yaml (modified, +1/-1)
  • hosting/docker-compose.dev.yaml (modified, +1/-1)
  • hosting/docker-compose.yaml (modified, +1/-1)
  • hosting/litellm-version.json (added, +4/-0)
  • hosting/single/Dockerfile (modified, +3/-3)
  • hosting/single/runner.sh (modified, +23/-0)
  • package.json (modified, +2/-0)
  • scripts/syncLiteLLMVersion.js (added, +124/-0)

Code Example

15:51:50 - LiteLLM Proxy:ERROR: mcp_management_endpoints.py:1259 - Error creating mcp server: Could not find field at `createOneLiteLLM_MCPServerTable.data.approval_status`
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/litellm/proxy/management_endpoints/mcp_management_endpoints.py", line 1249, in add_mcp_server
    new_mcp_server = await create_mcp_server(
                     ^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/usr/lib/python3.13/site-packages/litellm/proxy/_experimental/mcp_server/db.py", line 390, in create_mcp_server
    new_mcp_server = await prisma_client.db.litellm_mcpservertable.create(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        data=data_dict  # type: ignore
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/prisma/actions.py", line 11497, in create
    resp = await self._client._execute(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/usr/lib/python3.13/site-packages/prisma/client.py", line 651, in _execute
    return await self._engine.query(builder.build(), tx_id=self._tx_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/prisma/engine/query.py", line 244, in query
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
    )
    ^
  File "/usr/lib/python3.13/site-packages/prisma/engine/http.py", line 141, in request
    return utils.handle_response_errors(resp, errors_data)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/prisma/engine/utils.py", line 192, in handle_response_errors
    raise exc(error)
prisma.errors.FieldNotFoundError: Could not find field at `createOneLiteLLM_MCPServerTable.data.approval_status`
INFO:     10.6.28.79:54652 - "POST /v1/mcp/server HTTP/1.1" 500 Internal Server Error
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

While trying to add new Custom MCP Server in UI got the error message: Error creating MCP Server: {"detail":{"error":"Error creating mcp server: Could not find field at createOneLiteLLM_MCPServerTable.data.approval_status"}}

Steps to Reproduce

  1. spin up in eks via helm chart, image tag - main-v1.82.3-stable
  2. Open UI -> MCP Servers -> Add New MCP Server - > Custom Server
  3. filled in all the fields even saw - Connection Status Connection successful
  4. But when click on the button "Add MCP Server" got the error message: Error Error creating MCP Server: {"detail":{"error":"Error creating mcp server: Could not find field at createOneLiteLLM_MCPServerTable.data.approval_status"}}

Relevant log output

15:51:50 - LiteLLM Proxy:ERROR: mcp_management_endpoints.py:1259 - Error creating mcp server: Could not find field at `createOneLiteLLM_MCPServerTable.data.approval_status`
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/litellm/proxy/management_endpoints/mcp_management_endpoints.py", line 1249, in add_mcp_server
    new_mcp_server = await create_mcp_server(
                     ^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/usr/lib/python3.13/site-packages/litellm/proxy/_experimental/mcp_server/db.py", line 390, in create_mcp_server
    new_mcp_server = await prisma_client.db.litellm_mcpservertable.create(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        data=data_dict  # type: ignore
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/prisma/actions.py", line 11497, in create
    resp = await self._client._execute(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/usr/lib/python3.13/site-packages/prisma/client.py", line 651, in _execute
    return await self._engine.query(builder.build(), tx_id=self._tx_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/prisma/engine/query.py", line 244, in query
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
    )
    ^
  File "/usr/lib/python3.13/site-packages/prisma/engine/http.py", line 141, in request
    return utils.handle_response_errors(resp, errors_data)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/prisma/engine/utils.py", line 192, in handle_response_errors
    raise exc(error)
prisma.errors.FieldNotFoundError: Could not find field at `createOneLiteLLM_MCPServerTable.data.approval_status`
INFO:     10.6.28.79:54652 - "POST /v1/mcp/server HTTP/1.1" 500 Internal Server Error

What part of LiteLLM is this about?

UI Dashboard

What LiteLLM version are you on ?

v1.82.3

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

The fix involves updating the database schema to include the missing approval_status field in the LiteLLM_MCPServerTable.

Step-by-Step Solution

  • Update the database migration script to add the approval_status field:
# db/migrations/add_approval_status.py
from django.db import migrations, models

class Migration(migrations.Migration):
    dependencies = [
        ('lite_llm', 'previous_migration'),
    ]

    operations = [
        migrations.AddField(
            model_name='LiteLLM_MCPServerTable',
            name='approval_status',
            field=models.CharField(max_length=255, null=True),
        ),
    ]
  • Apply the database migration:
python manage.py migrate
  • Update the UI code to handle the new approval_status field:
# ui/components/MCPServerForm.js
import React, { useState } from 'react';

const MCPServerForm = () => {
    const [approvalStatus, setApprovalStatus] = useState('');

    const handleSubmit = (event) => {
        event.preventDefault();
        // Add approvalStatus to the createOneLiteLLM_MCPServerTable data
        const data = {
            ...event.target.dataset,
            approval_status: approvalStatus,
        };
        // Call the API to create the MCP Server
    };

    return (
        <form onSubmit={handleSubmit}>
            {/* ... other form fields ... */}
            <label>
                Approval Status:
                <select value={approvalStatus} onChange={(event) => setApprovalStatus(event.target.value)}>
                    <option value="">Select an option</option>
                    <option value="approved">Approved</option>
                    <option value="pending">Pending</option>
                    <option value="rejected">Rejected</option>
                </select>
            </label>
            <button type="submit">Add MCP Server</button>
        </form>
    );
};

Verification

To verify that the fix worked, try adding a new Custom MCP Server in the UI and check that the approval_status field is included in the createOneLiteLLM_MCPServerTable data. The error message should no longer appear.

Extra Tips

  • Make sure to update the database schema and UI code in a consistent manner to avoid further errors.
  • Consider adding validation to the approval_status field to ensure that only valid values are accepted.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING