---
title: "Add Session Mcp Server"
method: POST
path: "/v1/mcp/server/oauth/session"
tags: ["mcp"]
---

# Add Session Mcp Server

`POST /v1/mcp/server/oauth/session`

Temporarily cache an MCP server in memory without writing to the database

## Headers

- `litellm-changed-by` string, nullable — The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability

## Request body

- NewMCPServerRequest
  - `server_id` string, nullable
  - `server_name` string, nullable
  - `alias` string, nullable
  - `description` string, nullable
  - `transport` 'sse' | 'http' | 'stdio'
  - `auth_type` 'none' | 'api_key' | 'bearer_token' | 'basic' | 'authorization' | 'oauth2' | 'aws_sigv4' | 'token', nullable
  - `credentials` MCPCredentials
    - `auth_value` string, nullable
    - `client_id` string, nullable
    - `client_secret` string, nullable
    - `scopes` string[], nullable
    - `aws_access_key_id` string, nullable
    - `aws_secret_access_key` string, nullable
    - `aws_session_token` string, nullable
    - `aws_region_name` string, nullable
    - `aws_service_name` string, nullable
  - `url` string, nullable
  - `spec_path` string, nullable
  - `mcp_info` object, nullable
  - `mcp_access_groups` string[]
  - `allowed_tools` string[], nullable
  - `tool_name_to_display_name` object, nullable
  - `tool_name_to_description` object, nullable
  - `extra_headers` string[], nullable
  - `static_headers` object, nullable
  - `command` string, nullable
  - `args` string[]
  - `env` object
  - `authorization_url` string, nullable
  - `token_url` string, nullable
  - `registration_url` string, nullable
  - `allow_all_keys` boolean
  - `available_on_public_internet` boolean
  - `is_byok` boolean
  - `byok_description` string[]
  - `byok_api_key_help_url` string, nullable
  - `source_url` string, nullable
  - `approval_status` string, nullable — Server-managed: set by the endpoint; caller values are overridden.
  - `submitted_by` string, nullable — Server-managed: set by the endpoint; caller values are overridden.
  - `submitted_at` string, date-time, nullable — Server-managed: set by the endpoint; caller values are overridden.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.net/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sea-lion/litellm-api/revisions/1e929292ddd5/schema)
