Skip to main content

Mcp management API

This page documents the 41 gateway endpoints tagged mcp_management in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.

MethodPathSummary
GET/v1/mcp/access_groupsList MCP access group names
GET/v1/mcp/discoverBrowse the MCP catalogue
POST/v1/mcp/make_publicPublish servers on the AI hub
GET/v1/mcp/network/client-ipShow your IP address as the gateway sees it
GET/v1/mcp/openapi-registryBrowse well-known OpenAPI APIs
GET/v1/mcp/registry.jsonRead the public MCP registry
GET/v1/mcp/serverList MCP servers
POST/v1/mcp/serverAdd an MCP server
PUT/v1/mcp/serverUpdate an MCP server
GET/v1/mcp/server/healthCheck MCP server health
POST/v1/mcp/server/importImport MCP servers from a client config
POST/v1/mcp/server/oauth/sessionStage a server for an OAuth test
POST/v1/mcp/server/registerSubmit an MCP server for admin review
GET/v1/mcp/server/submissionsList MCP servers submitted for review
GET/v1/mcp/server/{server_id}Read one MCP server
DELETE/v1/mcp/server/{server_id}Delete an MCP server
PUT/v1/mcp/server/{server_id}/approveApprove a submitted MCP server
POST/v1/mcp/server/{server_id}/oauth-user-credentialSave your own OAuth token for an MCP server
DELETE/v1/mcp/server/{server_id}/oauth-user-credentialRemove a stored OAuth token
GET/v1/mcp/server/{server_id}/oauth-user-credential/statusCheck your OAuth connection to an MCP server
POST/v1/mcp/server/{server_id}/pinPin a server's tool catalogue
DELETE/v1/mcp/server/{server_id}/pinUnpin a server's tool catalogue
PUT/v1/mcp/server/{server_id}/rejectReject a submitted MCP server
GET/v1/mcp/server/{server_id}/tool-policyRead a catalogue server's tool policy
PUT/v1/mcp/server/{server_id}/tool-policyTurn write tools on for a catalogue server
POST/v1/mcp/server/{server_id}/user-credentialSave your own API key for an MCP server
DELETE/v1/mcp/server/{server_id}/user-credentialRemove a stored personal API key
GET/v1/mcp/server/{server_id}/user-credentialsList who has connected to an MCP server
GET/v1/mcp/server/{server_id}/user-env-varsCheck your settings for an MCP server
POST/v1/mcp/server/{server_id}/user-env-varsSave your settings for an MCP server
DELETE/v1/mcp/server/{server_id}/user-env-varsClear your settings for an MCP server
GET/v1/mcp/sessionsList live MCP gateway sessions
DELETE/v1/mcp/sessionsClose live MCP gateway sessions
GET/v1/mcp/toolsList the MCP tools your key can use
GET/v1/mcp/toolsetList toolsets
POST/v1/mcp/toolsetCreate a toolset
PUT/v1/mcp/toolsetUpdate a toolset
GET/v1/mcp/toolset/{toolset_id}Get a toolset
DELETE/v1/mcp/toolset/{toolset_id}Delete a toolset
GET/v1/mcp/user-credentialsList your MCP connections
GET/v1/mcp/user-env-vars/statusCheck your settings across MCP servers

Endpoints​

GET /v1/mcp/access_groups​

List MCP access group names

Lists the names of every MCP access group defined on MCP servers in the config file and the database, sorted. Use the names when you grant a key or team a group instead of single servers. Any virtual key or Admin UI session may call it. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/access_groups" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The access group namesapplication/json MCPAccessGroupsResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError

Response fields (200):

FieldTypeRequiredDescription
access_groupsarray of stringYesEvery MCP access group name, sorted

GET /v1/mcp/discover​

Browse the MCP catalogue

Returns the catalogue of well-known MCP server templates that can be added to the gateway in a few clicks, filtered by a query on names and descriptions, by category, or by url, which keeps only the templates that serve that server address. Each template carries a trust_tier: verified when the service's own vendor publishes the server and Spanway checked it, unverified otherwise, and the publisher that maintains it. The Admin UI shows the list on the Add server page and uses url to suggest a template when an admin types a custom address. Proxy admins and admin viewers only. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
queryquerystring or nullNoSearch filter for server names and descriptions
categoryquerystring or nullNoFilter by category
urlquerystring or nullNoKeep only the templates that serve this MCP server address

Example request:

curl -X GET "http://localhost:4000/v1/mcp/discover" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The matching catalogue entriesapplication/json MCPDiscoverResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is neither a proxy admin nor an admin viewer keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

Response fields (200):

FieldTypeRequiredDescription
categoriesarray of stringYesEvery category in the catalogue, sorted
serversarray of CatalogConnectorYesThe catalogue entries that match the filters

POST /v1/mcp/make_public​

Publish servers on the AI hub

Publish the named servers on the AI hub, where GET /public/mcp_hub lists them. Signed-in users always see the list, and anyone without a key sees it only while enable_public_model_hub is on. Listing a server does not open it to public addresses, a server with available_on_public_internet: false stays reachable from internal addresses only. The list replaces the previous one, is saved to the config and is written to the audit log. Proxy admins only.

Request body (application/json, schema MakeMCPServersPublicRequest):

FieldTypeRequiredDescription
mcp_server_idsarray of stringYesMcp Server Ids

Example request:

curl -X POST "http://localhost:4000/v1/mcp/make_public" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mcp_server_ids": [
"8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f"
]
}'

Responses:

StatusDescriptionBody
202The servers now publicapplication/json MakeMCPServersPublicResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key passed the route check but is not a proxy admin keyapplication/json ErrorDetail
404A listed id matches no serverapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The config could not be savedapplication/json ErrorDetail

GET /v1/mcp/network/client-ip​

Show your IP address as the gateway sees it

Returns the caller's IP address as the gateway sees it, after any trusted proxy headers. Use it to check which address an IP allow list or the public MCP registry filter will match. Any virtual key or Admin UI session may call it. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/network/client-ip" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The caller's addressapplication/json MCPClientIPResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError

Response fields (200):

FieldTypeRequiredDescription
ipstring or nullYesThe caller's IP address as the gateway sees it

GET /v1/mcp/openapi-registry​

Browse well-known OpenAPI APIs

Returns well-known public APIs, with their OpenAPI document and OAuth 2.0 endpoints, that can be turned into an MCP server from their OpenAPI spec. The Admin UI uses it in the OpenAPI server picker. Proxy admins and admin viewers only. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/openapi-registry" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The APIsapplication/json OpenAPIRegistryResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
apisarray of OpenAPIRegistryEntryYesAPIs that can be added as OpenAPI MCP servers

GET /v1/mcp/registry.json​

Read the public MCP registry

Lists the gateway's own MCP endpoint and every MCP server published for the caller's network, in the MCP registry format that MCP clients use to discover servers. No key is needed. Callers from outside your network see only servers marked as available on the public internet. The route answers 404 until the public registry is turned on in the settings. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/registry.json"

Responses:

StatusDescriptionBody
200The registryapplication/json MCPRegistryResponse
404The public registry is turned offapplication/json ErrorDetail
429One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try againapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
serversarray of MCPRegistryServerYesThe gateway itself first, then each public server

GET /v1/mcp/server​

List MCP servers

Lists the MCP servers the caller may see, with the teams each one is shared with. Proxy admins see every server, other users and keys see only the servers they can reach, without their credentials. Pass team_id to list the servers one team can use (members of that team and proxy admins only) and connected_app_view to mark servers a connected app of yours can reach. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
team_idquerystring or nullNoFilter MCP servers by team scope. When provided, returns only servers the team has access to plus globally available (allow_all_keys) servers. Used by the Create Key UI to show team-scoped MCP servers.
connected_app_viewquerybooleanNoAnnotate each returned server with connected_app_reachable: whether a connected app authorized by the calling user (a gateway OAuth session) is served this server on the aggregate MCP endpoint.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/server" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The servers the caller may seeapplication/json array of Spanway_MCPServerTable
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller may not list another team's serversapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

POST /v1/mcp/server​

Add an MCP server

Adds an MCP server to the gateway so keys, teams and agents can use its tools through one governed endpoint. Send its URL and transport (or a local command for stdio), how the gateway should authenticate to it, and who may use it. Credentials are stored encrypted and never returned. Proxy admins only. The new server is recorded in the audit log. A reserved or taken id, name or alias answers 400.

Parameters:

NameInTypeRequiredDescription
spanway-changed-byheaderstring or nullNoThe spanway-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability

Request body (application/json, schema NewMCPServerRequest):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
allow_all_keysbooleanNoAllow All Keys
allowed_toolsarray of string or nullNoAllowed Tools
approval_statusstring or nullNoServer-managed: set by the endpoint; caller values are overridden.
argsarray of stringNoArgs
audiencestring or nullNoAudience
auth_typeenum: "none", "api_key", "bearer_token", "basic", "authorization", "oauth2", "aws_sigv4", "token", ... or nullNoAuth Type
authorization_urlstring or nullNoAuthorization Url
available_on_public_internetbooleanNoAvailable On Public Internet
byok_api_key_help_urlstring or nullNoByok Api Key Help Url
byok_descriptionarray of stringNoByok Description
catalog_entrystring or nullNoCatalog Entry
commandstring or nullNoCommand
credentialsMCPCredentials or nullNo
dcr_bridgeboolean or nullNoDcr Bridge
delegate_auth_to_upstreambooleanNoDelegate Auth To Upstream
descriptionstring or nullNoDescription
envobjectNoEnv
env_varsarray of MCPEnvVar or nullNoEnv Vars
extra_headersarray of string or nullNoExtra Headers
instructionsstring or nullNoInstructions
is_byokbooleanNoIs Byok
issuerstring or nullNoIssuer
max_concurrent_requestsinteger or nullNoMax Concurrent Requests
mcp_access_groupsarray of stringNoMcp Access Groups
mcp_infoobject or nullNoMcp Info
oauth2_flowenum: "client_credentials", "authorization_code" or nullNoOauth2 Flow
oauth_passthroughbooleanNoOauth Passthrough
per_server_oauth_discoverybooleanNoPer Server Oauth Discovery
registration_urlstring or nullNoRegistration Url
rpminteger or nullNoRpm
server_idstring or nullNoServer Id
server_namestring or nullNoServer Name
source_urlstring or nullNoSource Url
spec_pathstring or nullNoSpec Path
static_headersobject or nullNoStatic Headers
subject_token_typestring or nullNoSubject Token Type
submitted_atstring or nullNoServer-managed: set by the endpoint; caller values are overridden.
submitted_bystring or nullNoServer-managed: set by the endpoint; caller values are overridden.
timeoutnumber or nullNoTimeout
token_exchange_endpointstring or nullNoToken Exchange Endpoint
token_exchange_profilestring or nullNoToken Exchange Profile
token_urlstring or nullNoToken Url
tool_name_to_descriptionobject or nullNoTool Name To Description
tool_name_to_display_nameobject or nullNoTool Name To Display Name
transportenum: "sse", "http", "stdio"NoTransport
urlstring or nullNoUrl

Example request:

curl -X POST "http://localhost:4000/v1/mcp/server" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"alias": "issue_tracker",
"allowed_tools": [
"search_issues",
"get_issue"
],
"auth_type": "bearer_token",
"credentials": {
"auth_value": "sk-example-upstream-token"
},
"description": "Issue tracker for the product team",
"mcp_access_groups": [
"engineering-tools"
],
"server_name": "issue_tracker",
"transport": "http",
"url": "https://mcp.example.com/mcp"
}'

Responses:

StatusDescriptionBody
201The new server, credentials left outapplication/json Spanway_MCPServerTable
400The id, name or alias is reserved or already used, or catalog_entry names no catalogue connectorapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connected, or saving the server failedapplication/json ErrorDetail

PUT /v1/mcp/server​

Update an MCP server

Changes an MCP server's settings. A field left out keeps its stored value and a field sent as null is cleared. Masked secrets sent back unchanged keep the stored secret, but changing the server's URL or destination requires sending its secrets again. Keys and agents see the change on their next request. Proxy admins only, and the change is recorded in the audit log with the values before and after.

Parameters:

NameInTypeRequiredDescription
spanway-changed-byheaderstring or nullNoThe spanway-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability

Request body (application/json, schema UpdateMCPServerRequest):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
allow_all_keysbooleanNoAllow All Keys
allowed_toolsarray of string or nullNoAllowed Tools
argsarray of stringNoArgs
audiencestring or nullNoAudience
auth_typeenum: "none", "api_key", "bearer_token", "basic", "authorization", "oauth2", "aws_sigv4", "token", ... or nullNoAuth Type
authorization_urlstring or nullNoAuthorization Url
available_on_public_internetbooleanNoAvailable On Public Internet
byok_api_key_help_urlstring or nullNoByok Api Key Help Url
byok_descriptionarray of stringNoByok Description
commandstring or nullNoCommand
credentialsMCPCredentials or nullNo
dcr_bridgeboolean or nullNoDcr Bridge
delegate_auth_to_upstreambooleanNoDelegate Auth To Upstream
descriptionstring or nullNoDescription
envobjectNoEnv
env_varsarray of MCPEnvVar or nullNoEnv Vars
extra_headersarray of string or nullNoExtra Headers
instructionsstring or nullNoInstructions
is_byokbooleanNoIs Byok
issuerstring or nullNoIssuer
max_concurrent_requestsinteger or nullNoMax Concurrent Requests
mcp_access_groupsarray of stringNoMcp Access Groups
mcp_infoobject or nullNoMcp Info
oauth2_flowenum: "client_credentials", "authorization_code" or nullNoOauth2 Flow
oauth_passthroughbooleanNoOauth Passthrough
per_server_oauth_discoverybooleanNoPer Server Oauth Discovery
registration_urlstring or nullNoRegistration Url
rpminteger or nullNoRpm
server_idstringYesServer Id
server_namestring or nullNoServer Name
source_urlstring or nullNoSource Url
spec_pathstring or nullNoSpec Path
static_headersobject or nullNoStatic Headers
subject_token_typestring or nullNoSubject Token Type
timeoutnumber or nullNoTimeout
token_exchange_endpointstring or nullNoToken Exchange Endpoint
token_exchange_profilestring or nullNoToken Exchange Profile
token_urlstring or nullNoToken Url
tool_name_to_descriptionobject or nullNoTool Name To Description
tool_name_to_display_nameobject or nullNoTool Name To Display Name
transportenum: "sse", "http", "stdio"NoTransport
urlstring or nullNoUrl

Example request:

curl -X PUT "http://localhost:4000/v1/mcp/server" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"allowed_tools": [
"search_issues",
"get_issue",
"list_projects"
],
"description": "Issue tracker for product and support",
"server_id": "8f1c2d3e-4b5a-4c6d-9e7f-0a1b2c3d4e5f"
}'

Responses:

StatusDescriptionBody
202The server after the changeapplication/json Spanway_MCPServerTable
400A field breaks a rule named in the detail, or catalog_entry names no catalogue connectorapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

GET /v1/mcp/server/health​

Check MCP server health

Runs a health check on the MCP servers the caller may use, or only on the server_ids you pass, and returns one status per server. reachable (the server answered but its authentication was not checked) appears only with include_reachability, otherwise it is reported as unknown. Any virtual key or Admin UI session may call it. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
server_idsqueryarray of string or nullNoServer IDs to check. If not provided, checks all accessible servers.
include_reachabilityquerybooleanNoAllow the 'reachable' status for responding servers whose authentication is unchecked.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/server/health" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200One status per serverapplication/json array of MCPServerHealth
401No valid key or Admin UI session was presentedapplication/json ProxyError
422Validation Errorapplication/json HTTPValidationError

POST /v1/mcp/server/import​

Import MCP servers from a client config

Bulk-imports MCP servers from the mcpServers mapping that desktop and coding assistants keep in their config files, or from the mcp_servers array of the Anthropic Messages API. Each entry becomes a gateway MCP server, and the answer lists what was imported, skipped (for example a name already in use) and failed, so a partial import is visible. Proxy admins only.

Request body (application/json, schema MCPConnectorImportRequest):

FieldTypeRequiredDescription
mcp_serversobject or array of MCPConnectorEntryYesA config file's mcpServers mapping by name, or a Messages API mcp_servers list

Example request:

curl -X POST "http://localhost:4000/v1/mcp/server/import" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mcp_servers": {
"docs": {
"args": [
"-y",
"@example/docs-mcp@1.2.3"
],
"command": "npx"
},
"issue-tracker": {
"headers": {
"Authorization": "Bearer sk-example-upstream-token"
},
"type": "http",
"url": "https://mcp.example.com/mcp"
}
}
}'

Responses:

StatusDescriptionBody
200What was imported, skipped and failedapplication/json MCPConnectorImportResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
errorsarray of MCPConnectorImportFailureYesErrors
importedarray of MCPConnectorImportResultYesImported
skippedarray of MCPConnectorImportSkippedYesSkipped

POST /v1/mcp/server/oauth/session​

Stage a server for an OAuth test

Cache a server definition in memory for about five minutes without writing it to the database, so an OAuth flow can be run against it before it is saved. The Admin UI calls this from the server form. Proxy admins only.

Parameters:

NameInTypeRequiredDescription
spanway-changed-byheaderstring or nullNoThe spanway-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability

Request body (application/json, schema NewMCPServerRequest):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
allow_all_keysbooleanNoAllow All Keys
allowed_toolsarray of string or nullNoAllowed Tools
approval_statusstring or nullNoServer-managed: set by the endpoint; caller values are overridden.
argsarray of stringNoArgs
audiencestring or nullNoAudience
auth_typeenum: "none", "api_key", "bearer_token", "basic", "authorization", "oauth2", "aws_sigv4", "token", ... or nullNoAuth Type
authorization_urlstring or nullNoAuthorization Url
available_on_public_internetbooleanNoAvailable On Public Internet
byok_api_key_help_urlstring or nullNoByok Api Key Help Url
byok_descriptionarray of stringNoByok Description
catalog_entrystring or nullNoCatalog Entry
commandstring or nullNoCommand
credentialsMCPCredentials or nullNo
dcr_bridgeboolean or nullNoDcr Bridge
delegate_auth_to_upstreambooleanNoDelegate Auth To Upstream
descriptionstring or nullNoDescription
envobjectNoEnv
env_varsarray of MCPEnvVar or nullNoEnv Vars
extra_headersarray of string or nullNoExtra Headers
instructionsstring or nullNoInstructions
is_byokbooleanNoIs Byok
issuerstring or nullNoIssuer
max_concurrent_requestsinteger or nullNoMax Concurrent Requests
mcp_access_groupsarray of stringNoMcp Access Groups
mcp_infoobject or nullNoMcp Info
oauth2_flowenum: "client_credentials", "authorization_code" or nullNoOauth2 Flow
oauth_passthroughbooleanNoOauth Passthrough
per_server_oauth_discoverybooleanNoPer Server Oauth Discovery
registration_urlstring or nullNoRegistration Url
rpminteger or nullNoRpm
server_idstring or nullNoServer Id
server_namestring or nullNoServer Name
source_urlstring or nullNoSource Url
spec_pathstring or nullNoSpec Path
static_headersobject or nullNoStatic Headers
subject_token_typestring or nullNoSubject Token Type
submitted_atstring or nullNoServer-managed: set by the endpoint; caller values are overridden.
submitted_bystring or nullNoServer-managed: set by the endpoint; caller values are overridden.
timeoutnumber or nullNoTimeout
token_exchange_endpointstring or nullNoToken Exchange Endpoint
token_exchange_profilestring or nullNoToken Exchange Profile
token_urlstring or nullNoToken Url
tool_name_to_descriptionobject or nullNoTool Name To Description
tool_name_to_display_nameobject or nullNoTool Name To Display Name
transportenum: "sse", "http", "stdio"NoTransport
urlstring or nullNoUrl

Example request:

curl -X POST "http://localhost:4000/v1/mcp/server/oauth/session" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"alias": "issue_tracker",
"allowed_tools": [
"search_issues",
"get_issue"
],
"auth_type": "oauth2",
"credentials": {
"client_id": "example-client-id"
},
"description": "Issue tracker for the product team",
"mcp_access_groups": [
"engineering-tools"
],
"server_name": "issue_tracker",
"transport": "http",
"url": "https://mcp.example.com/mcp"
}'

Responses:

StatusDescriptionBody
200The staged server with its credentials maskedapplication/json Spanway_MCPServerTable
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500Staging the server failedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
allow_all_keysbooleanNoAllow All Keys
allowed_toolsarray of stringNoAllowed Tools
approval_statusstring or nullNoApproval status: 'pending_review', 'active', 'rejected'
argsarray of stringNoArgs
audiencestring or nullNoAudience
auth_typeenum: "none", "api_key", "bearer_token", "basic", "authorization", "oauth2", "aws_sigv4", "token", ... or nullNoAuth Type
authorization_urlstring or nullNoAuthorization Url
available_on_public_internetbooleanNoAvailable On Public Internet
byok_api_key_help_urlstring or nullNoByok Api Key Help Url
byok_descriptionarray of stringNoByok Description
catalog_entrystring or nullNoCatalog Entry
commandstring or nullNoCommand
connected_app_reachableboolean or nullNoConnected App Reachable
created_atstring or nullNoCreated At
created_bystring or nullNoCreated By
credentialsMCPCredentials or nullNo
dcr_bridgeboolean or nullNoDcr Bridge
delegate_auth_to_upstreambooleanNoDelegate Auth To Upstream
descriptionstring or nullNoDescription
enabled_write_toolsarray of stringNoEnabled Write Tools
envobjectNoEnv
env_varsarray of MCPEnvVar or nullNoEnv Vars
extra_headersarray of stringNoExtra Headers
has_user_credentialboolean or nullNoHas User Credential
health_check_errorstring or nullNoHealth Check Error
instructionsstring or nullNoInstructions
is_byokbooleanNoIs Byok
is_configbooleanNoWhether this server is defined in config and is read-only.
issuerstring or nullNoIssuer
last_health_checkstring or nullNoLast Health Check
max_concurrent_requestsinteger or nullNoMax Concurrent Requests
mcp_access_groupsarray of stringNoMcp Access Groups
mcp_infoobject or nullNoMcp Info
oauth2_flowenum: "client_credentials", "authorization_code" or nullNoOauth2 Flow
oauth_passthroughbooleanNoOauth Passthrough
per_server_oauth_discoverybooleanNoPer Server Oauth Discovery
pinned_toolsobject or nullNoPinned Tools
registration_urlstring or nullNoRegistration Url
review_notesstring or nullNoReview Notes
reviewed_atstring or nullNoReviewed At
rpminteger or nullNoRpm
server_idstringYesServer Id
server_namestring or nullNoServer Name
source_urlstring or nullNoSource Url
spec_pathstring or nullNoSpec Path
static_headersobject or nullNoStatic Headers
statusenum: "healthy", "reachable", "unhealthy", "unknown" or nullNoHealth status: 'healthy', 'unhealthy', 'unknown', or 'reachable' (requires include_reachability=true; authentication and tools unchecked)
subject_token_typestring or nullNoSubject Token Type
submitted_atstring or nullNoSubmitted At
submitted_bystring or nullNoSubmitted By
teamsarray of objectNoTeams
timeoutnumber or nullNoTimeout
token_exchange_endpointstring or nullNoToken Exchange Endpoint
token_exchange_profilestring or nullNoToken Exchange Profile
token_urlstring or nullNoToken Url
tool_name_to_descriptionobject or nullNoTool Name To Description
tool_name_to_display_nameobject or nullNoTool Name To Display Name
transportenum: "sse", "http", "stdio"YesTransport
updated_atstring or nullNoUpdated At
updated_bystring or nullNoUpdated By
urlstring or nullNoUrl

POST /v1/mcp/server/register​

Submit an MCP server for admin review

Lets a team member propose an MCP server without admin rights. The server is saved with approval status pending_review and stays unusable until a proxy admin approves it with PUT /v1/mcp/server/{server_id}/approve. Call it with a team key, proxy admins create servers with POST /v1/mcp/server instead and get 403 here. Local stdio servers cannot be submitted and answer 400, and so does a name or alias another server already uses.

Request body (application/json, schema NewMCPServerRequest):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
allow_all_keysbooleanNoAllow All Keys
allowed_toolsarray of string or nullNoAllowed Tools
approval_statusstring or nullNoServer-managed: set by the endpoint; caller values are overridden.
argsarray of stringNoArgs
audiencestring or nullNoAudience
auth_typeenum: "none", "api_key", "bearer_token", "basic", "authorization", "oauth2", "aws_sigv4", "token", ... or nullNoAuth Type
authorization_urlstring or nullNoAuthorization Url
available_on_public_internetbooleanNoAvailable On Public Internet
byok_api_key_help_urlstring or nullNoByok Api Key Help Url
byok_descriptionarray of stringNoByok Description
catalog_entrystring or nullNoCatalog Entry
commandstring or nullNoCommand
credentialsMCPCredentials or nullNo
dcr_bridgeboolean or nullNoDcr Bridge
delegate_auth_to_upstreambooleanNoDelegate Auth To Upstream
descriptionstring or nullNoDescription
envobjectNoEnv
env_varsarray of MCPEnvVar or nullNoEnv Vars
extra_headersarray of string or nullNoExtra Headers
instructionsstring or nullNoInstructions
is_byokbooleanNoIs Byok
issuerstring or nullNoIssuer
max_concurrent_requestsinteger or nullNoMax Concurrent Requests
mcp_access_groupsarray of stringNoMcp Access Groups
mcp_infoobject or nullNoMcp Info
oauth2_flowenum: "client_credentials", "authorization_code" or nullNoOauth2 Flow
oauth_passthroughbooleanNoOauth Passthrough
per_server_oauth_discoverybooleanNoPer Server Oauth Discovery
registration_urlstring or nullNoRegistration Url
rpminteger or nullNoRpm
server_idstring or nullNoServer Id
server_namestring or nullNoServer Name
source_urlstring or nullNoSource Url
spec_pathstring or nullNoSpec Path
static_headersobject or nullNoStatic Headers
subject_token_typestring or nullNoSubject Token Type
submitted_atstring or nullNoServer-managed: set by the endpoint; caller values are overridden.
submitted_bystring or nullNoServer-managed: set by the endpoint; caller values are overridden.
timeoutnumber or nullNoTimeout
token_exchange_endpointstring or nullNoToken Exchange Endpoint
token_exchange_profilestring or nullNoToken Exchange Profile
token_urlstring or nullNoToken Url
tool_name_to_descriptionobject or nullNoTool Name To Description
tool_name_to_display_nameobject or nullNoTool Name To Display Name
transportenum: "sse", "http", "stdio"NoTransport
urlstring or nullNoUrl

Example request:

curl -X POST "http://localhost:4000/v1/mcp/server/register" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"alias": "issue_tracker",
"allowed_tools": [
"search_issues",
"get_issue"
],
"auth_type": "bearer_token",
"credentials": {
"auth_value": "sk-example-upstream-token"
},
"description": "Issue tracker for the product team",
"mcp_access_groups": [
"engineering-tools"
],
"server_name": "issue_tracker",
"transport": "http",
"url": "https://mcp.example.com/mcp"
}'

Responses:

StatusDescriptionBody
201The submitted server, waiting for reviewapplication/json Spanway_MCPServerTable
400The key has no team, the server runs locally, or its name is takenapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403Proxy admins create servers directlyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connected, or saving the server failedapplication/json ErrorDetail

GET /v1/mcp/server/submissions​

List MCP servers submitted for review

The admin review queue: every MCP server team members submitted with POST /v1/mcp/server/register, with counts per approval status. Proxy admins and admin viewers only. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/server/submissions" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The submissions and their countsapplication/json MCPSubmissionsSummary
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
activeintegerYesActive
itemsarray of Spanway_MCPServerTableYesItems
pending_reviewintegerYesPending Review
rejectedintegerYesRejected
totalintegerYesTotal

GET /v1/mcp/server/{server_id}​

Read one MCP server

Returns one MCP server with its current health status. Proxy admins see everything except secret values, other callers only see servers they can reach, without credentials. A server you cannot reach answers 404, the same as one that does not exist. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes
include_reachabilityquerybooleanNoAllow the 'reachable' status for responding servers whose authentication is unchecked.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/server/server_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The serverapplication/json Spanway_MCPServerTable
401No valid key or Admin UI session was presentedapplication/json ProxyError
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

Response fields (200):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
allow_all_keysbooleanNoAllow All Keys
allowed_toolsarray of stringNoAllowed Tools
approval_statusstring or nullNoApproval status: 'pending_review', 'active', 'rejected'
argsarray of stringNoArgs
audiencestring or nullNoAudience
auth_typeenum: "none", "api_key", "bearer_token", "basic", "authorization", "oauth2", "aws_sigv4", "token", ... or nullNoAuth Type
authorization_urlstring or nullNoAuthorization Url
available_on_public_internetbooleanNoAvailable On Public Internet
byok_api_key_help_urlstring or nullNoByok Api Key Help Url
byok_descriptionarray of stringNoByok Description
catalog_entrystring or nullNoCatalog Entry
commandstring or nullNoCommand
connected_app_reachableboolean or nullNoConnected App Reachable
created_atstring or nullNoCreated At
created_bystring or nullNoCreated By
credentialsMCPCredentials or nullNo
dcr_bridgeboolean or nullNoDcr Bridge
delegate_auth_to_upstreambooleanNoDelegate Auth To Upstream
descriptionstring or nullNoDescription
enabled_write_toolsarray of stringNoEnabled Write Tools
envobjectNoEnv
env_varsarray of MCPEnvVar or nullNoEnv Vars
extra_headersarray of stringNoExtra Headers
has_user_credentialboolean or nullNoHas User Credential
health_check_errorstring or nullNoHealth Check Error
instructionsstring or nullNoInstructions
is_byokbooleanNoIs Byok
is_configbooleanNoWhether this server is defined in config and is read-only.
issuerstring or nullNoIssuer
last_health_checkstring or nullNoLast Health Check
max_concurrent_requestsinteger or nullNoMax Concurrent Requests
mcp_access_groupsarray of stringNoMcp Access Groups
mcp_infoobject or nullNoMcp Info
oauth2_flowenum: "client_credentials", "authorization_code" or nullNoOauth2 Flow
oauth_passthroughbooleanNoOauth Passthrough
per_server_oauth_discoverybooleanNoPer Server Oauth Discovery
pinned_toolsobject or nullNoPinned Tools
registration_urlstring or nullNoRegistration Url
review_notesstring or nullNoReview Notes
reviewed_atstring or nullNoReviewed At
rpminteger or nullNoRpm
server_idstringYesServer Id
server_namestring or nullNoServer Name
source_urlstring or nullNoSource Url
spec_pathstring or nullNoSpec Path
static_headersobject or nullNoStatic Headers
statusenum: "healthy", "reachable", "unhealthy", "unknown" or nullNoHealth status: 'healthy', 'unhealthy', 'unknown', or 'reachable' (requires include_reachability=true; authentication and tools unchecked)
subject_token_typestring or nullNoSubject Token Type
submitted_atstring or nullNoSubmitted At
submitted_bystring or nullNoSubmitted By
teamsarray of objectNoTeams
timeoutnumber or nullNoTimeout
token_exchange_endpointstring or nullNoToken Exchange Endpoint
token_exchange_profilestring or nullNoToken Exchange Profile
token_urlstring or nullNoToken Url
tool_name_to_descriptionobject or nullNoTool Name To Description
tool_name_to_display_nameobject or nullNoTool Name To Display Name
transportenum: "sse", "http", "stdio"YesTransport
updated_atstring or nullNoUpdated At
updated_bystring or nullNoUpdated By
urlstring or nullNoUrl

DELETE /v1/mcp/server/{server_id}​

Delete an MCP server

Removes an MCP server from the gateway. Keys, teams and agents lose its tools on their next request, and the deletion is recorded in the audit log with the server as it was. Proxy admins only. The deletion cannot be undone. The answer is an empty 202.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes
spanway-changed-byheaderstring or nullNoThe spanway-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability

Example request:

curl -X DELETE "http://localhost:4000/v1/mcp/server/server_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
202The server was deleted
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

PUT /v1/mcp/server/{server_id}/approve​

Approve a submitted MCP server

Approves a server a team member submitted, or one rejected earlier: its approval status becomes active and keys with access can use it right away. Proxy admins only. A server that is already active answers 400.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Request body (application/json, object):

Example request:

curl -X PUT "http://localhost:4000/v1/mcp/server/server_id-123/approve" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'

Responses:

StatusDescriptionBody
200The approved serverapplication/json Spanway_MCPServerTable
400The server is already activeapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

Response fields (200):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
allow_all_keysbooleanNoAllow All Keys
allowed_toolsarray of stringNoAllowed Tools
approval_statusstring or nullNoApproval status: 'pending_review', 'active', 'rejected'
argsarray of stringNoArgs
audiencestring or nullNoAudience
auth_typeenum: "none", "api_key", "bearer_token", "basic", "authorization", "oauth2", "aws_sigv4", "token", ... or nullNoAuth Type
authorization_urlstring or nullNoAuthorization Url
available_on_public_internetbooleanNoAvailable On Public Internet
byok_api_key_help_urlstring or nullNoByok Api Key Help Url
byok_descriptionarray of stringNoByok Description
catalog_entrystring or nullNoCatalog Entry
commandstring or nullNoCommand
connected_app_reachableboolean or nullNoConnected App Reachable
created_atstring or nullNoCreated At
created_bystring or nullNoCreated By
credentialsMCPCredentials or nullNo
dcr_bridgeboolean or nullNoDcr Bridge
delegate_auth_to_upstreambooleanNoDelegate Auth To Upstream
descriptionstring or nullNoDescription
enabled_write_toolsarray of stringNoEnabled Write Tools
envobjectNoEnv
env_varsarray of MCPEnvVar or nullNoEnv Vars
extra_headersarray of stringNoExtra Headers
has_user_credentialboolean or nullNoHas User Credential
health_check_errorstring or nullNoHealth Check Error
instructionsstring or nullNoInstructions
is_byokbooleanNoIs Byok
is_configbooleanNoWhether this server is defined in config and is read-only.
issuerstring or nullNoIssuer
last_health_checkstring or nullNoLast Health Check
max_concurrent_requestsinteger or nullNoMax Concurrent Requests
mcp_access_groupsarray of stringNoMcp Access Groups
mcp_infoobject or nullNoMcp Info
oauth2_flowenum: "client_credentials", "authorization_code" or nullNoOauth2 Flow
oauth_passthroughbooleanNoOauth Passthrough
per_server_oauth_discoverybooleanNoPer Server Oauth Discovery
pinned_toolsobject or nullNoPinned Tools
registration_urlstring or nullNoRegistration Url
review_notesstring or nullNoReview Notes
reviewed_atstring or nullNoReviewed At
rpminteger or nullNoRpm
server_idstringYesServer Id
server_namestring or nullNoServer Name
source_urlstring or nullNoSource Url
spec_pathstring or nullNoSpec Path
static_headersobject or nullNoStatic Headers
statusenum: "healthy", "reachable", "unhealthy", "unknown" or nullNoHealth status: 'healthy', 'unhealthy', 'unknown', or 'reachable' (requires include_reachability=true; authentication and tools unchecked)
subject_token_typestring or nullNoSubject Token Type
submitted_atstring or nullNoSubmitted At
submitted_bystring or nullNoSubmitted By
teamsarray of objectNoTeams
timeoutnumber or nullNoTimeout
token_exchange_endpointstring or nullNoToken Exchange Endpoint
token_exchange_profilestring or nullNoToken Exchange Profile
token_urlstring or nullNoToken Url
tool_name_to_descriptionobject or nullNoTool Name To Description
tool_name_to_display_nameobject or nullNoTool Name To Display Name
transportenum: "sse", "http", "stdio"YesTransport
updated_atstring or nullNoUpdated At
updated_bystring or nullNoUpdated By
urlstring or nullNoUrl

POST /v1/mcp/server/{server_id}/oauth-user-credential​

Save your own OAuth token for an MCP server

Stores the OAuth access token (and refresh token) you obtained for an OpenAPI or OAuth MCP server, so its tools act as you. Tokens are stored encrypted and never returned. Any user may store their own token. When the server enforces OAuth identity binding, storing a token here answers 403 and you connect through the gateway's OAuth flow instead.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Request body (application/json, schema MCPOAuthUserCredentialRequest):

FieldTypeRequiredDescription
access_tokenstringYesAccess Token
expires_ininteger or nullNoExpires In
refresh_tokenstring or nullNoRefresh Token
scopesarray of string or nullNoScopes

Example request:

curl -X POST "http://localhost:4000/v1/mcp/server/server_id-123/oauth-user-credential" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"access_token": "sk-example-oauth-access",
"expires_in": 3600,
"refresh_token": "sk-example-oauth-refresh",
"scopes": [
"read"
]
}'

Responses:

StatusDescriptionBody
200The stored token's statusapplication/json MCPOAuthUserCredentialStatus
400The key is not tied to a user, so there is nothing to store per userapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The server enforces OAuth identity binding, or the caller has no access to the serverapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
connected_atstring or nullNoConnected At
expires_atstring or nullNoExpires At
has_credentialbooleanYesHas Credential
is_expiredbooleanNoIs Expired
server_idstringYesServer Id

DELETE /v1/mcp/server/{server_id}/oauth-user-credential​

Remove a stored OAuth token

Revokes your stored OAuth token for an MCP server, so its tools stop acting as you until you connect again. A proxy admin may pass user_id to revoke another user's token. The answer reports has_credential false.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes
user_idquerystring or nullNo

Example request:

curl -X DELETE "http://localhost:4000/v1/mcp/server/server_id-123/oauth-user-credential" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The token is goneapplication/json MCPOAuthUserCredentialStatus
400The key is not tied to a user, so there is nothing to store per userapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

Response fields (200):

FieldTypeRequiredDescription
connected_atstring or nullNoConnected At
expires_atstring or nullNoExpires At
has_credentialbooleanYesHas Credential
is_expiredbooleanNoIs Expired
server_idstringYesServer Id

GET /v1/mcp/server/{server_id}/oauth-user-credential/status​

Check your OAuth connection to an MCP server

Tells you whether you have an OAuth token stored for this MCP server and when it expires, without returning the token. The Admin UI uses it to show a Connect or Reconnect button. Any user may check their own status. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Example request:

curl -X GET "http://localhost:4000/v1/mcp/server/server_id-123/oauth-user-credential/status" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200Your connection statusapplication/json MCPOAuthUserCredentialStatus
400The key is not tied to a user, so there is nothing to store per userapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
422Validation Errorapplication/json HTTPValidationError

Response fields (200):

FieldTypeRequiredDescription
connected_atstring or nullNoConnected At
expires_atstring or nullNoExpires At
has_credentialbooleanYesHas Credential
is_expiredbooleanNoIs Expired
server_idstringYesServer Id

POST /v1/mcp/server/{server_id}/pin​

Pin a server's tool catalogue

Pin the server's current upstream tool list, descriptions and input schemas (admin only). tools/list serves the pinned catalog from now on and an upstream change raises an mcp_pinned_tools_changed alert. Use it to stop a third-party server from quietly changing what its tools say to your agents. A server with no tool that passes the guardrails answers 400.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Request body (application/json, object):

Example request:

curl -X POST "http://localhost:4000/v1/mcp/server/server_id-123/pin" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'

Responses:

StatusDescriptionBody
200The pinned tools by nameapplication/json object
400No tool of the server passes the guardrailsapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

DELETE /v1/mcp/server/{server_id}/pin​

Unpin a server's tool catalogue

Unpin the server's tool list (admin only), so tools/list serves the live upstream catalog again and no longer alerts on changes. Use it after you have reviewed an upstream change you accept, then pin again.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Example request:

curl -X DELETE "http://localhost:4000/v1/mcp/server/server_id-123/pin" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The server is unpinnedapplication/json MCPToolsUnpinned
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

Response fields (200):

FieldTypeRequiredDescription
server_idstringYesServer Id
status"unpinned"YesStatus

PUT /v1/mcp/server/{server_id}/reject​

Reject a submitted MCP server

Rejects a server a team member submitted, with optional review_notes that tell the submitter why. The server stays unusable and can be approved later. Proxy admins only. A server that is already rejected answers 400.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Request body (application/json, schema RejectMCPServerRequest):

FieldTypeRequiredDescription
review_notesstring or nullNoReview Notes

Example request:

curl -X PUT "http://localhost:4000/v1/mcp/server/server_id-123/reject" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"review_notes": "Use the shared tracker server instead"
}'

Responses:

StatusDescriptionBody
200The rejected serverapplication/json Spanway_MCPServerTable
400The server is already rejectedapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

Response fields (200):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
allow_all_keysbooleanNoAllow All Keys
allowed_toolsarray of stringNoAllowed Tools
approval_statusstring or nullNoApproval status: 'pending_review', 'active', 'rejected'
argsarray of stringNoArgs
audiencestring or nullNoAudience
auth_typeenum: "none", "api_key", "bearer_token", "basic", "authorization", "oauth2", "aws_sigv4", "token", ... or nullNoAuth Type
authorization_urlstring or nullNoAuthorization Url
available_on_public_internetbooleanNoAvailable On Public Internet
byok_api_key_help_urlstring or nullNoByok Api Key Help Url
byok_descriptionarray of stringNoByok Description
catalog_entrystring or nullNoCatalog Entry
commandstring or nullNoCommand
connected_app_reachableboolean or nullNoConnected App Reachable
created_atstring or nullNoCreated At
created_bystring or nullNoCreated By
credentialsMCPCredentials or nullNo
dcr_bridgeboolean or nullNoDcr Bridge
delegate_auth_to_upstreambooleanNoDelegate Auth To Upstream
descriptionstring or nullNoDescription
enabled_write_toolsarray of stringNoEnabled Write Tools
envobjectNoEnv
env_varsarray of MCPEnvVar or nullNoEnv Vars
extra_headersarray of stringNoExtra Headers
has_user_credentialboolean or nullNoHas User Credential
health_check_errorstring or nullNoHealth Check Error
instructionsstring or nullNoInstructions
is_byokbooleanNoIs Byok
is_configbooleanNoWhether this server is defined in config and is read-only.
issuerstring or nullNoIssuer
last_health_checkstring or nullNoLast Health Check
max_concurrent_requestsinteger or nullNoMax Concurrent Requests
mcp_access_groupsarray of stringNoMcp Access Groups
mcp_infoobject or nullNoMcp Info
oauth2_flowenum: "client_credentials", "authorization_code" or nullNoOauth2 Flow
oauth_passthroughbooleanNoOauth Passthrough
per_server_oauth_discoverybooleanNoPer Server Oauth Discovery
pinned_toolsobject or nullNoPinned Tools
registration_urlstring or nullNoRegistration Url
review_notesstring or nullNoReview Notes
reviewed_atstring or nullNoReviewed At
rpminteger or nullNoRpm
server_idstringYesServer Id
server_namestring or nullNoServer Name
source_urlstring or nullNoSource Url
spec_pathstring or nullNoSpec Path
static_headersobject or nullNoStatic Headers
statusenum: "healthy", "reachable", "unhealthy", "unknown" or nullNoHealth status: 'healthy', 'unhealthy', 'unknown', or 'reachable' (requires include_reachability=true; authentication and tools unchecked)
subject_token_typestring or nullNoSubject Token Type
submitted_atstring or nullNoSubmitted At
submitted_bystring or nullNoSubmitted By
teamsarray of objectNoTeams
timeoutnumber or nullNoTimeout
token_exchange_endpointstring or nullNoToken Exchange Endpoint
token_exchange_profilestring or nullNoToken Exchange Profile
token_urlstring or nullNoToken Url
tool_name_to_descriptionobject or nullNoTool Name To Description
tool_name_to_display_nameobject or nullNoTool Name To Display Name
transportenum: "sse", "http", "stdio"YesTransport
updated_atstring or nullNoUpdated At
updated_bystring or nullNoUpdated By
urlstring or nullNoUrl

GET /v1/mcp/server/{server_id}/tool-policy​

Read a catalogue server's tool policy

Shows which tools of a server added from the MCP catalogue are read-only by default and which write tools an admin turned on. Proxy admins and admin viewers only. Nothing is changed. A server defined in config.yaml is not in the database, so it answers 404 and its policy is the enabled_write_tools list in config.yaml.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Example request:

curl -X GET "http://localhost:4000/v1/mcp/server/server_id-123/tool-policy" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The tool policyapplication/json MCPToolPolicyResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is neither a proxy admin nor an admin viewer keyapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
catalog_entrystring or nullYesThe catalogue connector the server matches, by its catalog_entry or by its URL or command
enabled_write_toolsarray of stringYesWrite tools an admin turned on for this server. Every other write tool stays hidden
read_only_toolsarray of stringYesTool names or patterns the connector treats as read-only, so agents can always use them
server_idstringYesThe MCP server the policy belongs to

PUT /v1/mcp/server/{server_id}/tool-policy​

Turn write tools on for a catalogue server

Sets which write tools are enabled on a server added from the MCP catalogue. Catalogue servers start with only their read-only tools, so an agent cannot change data until an admin turns a write tool on here. The list replaces the previous one. Proxy admins only, and every change is recorded in the audit log with the list before and after. A server that matches no catalogue connector, by catalog_entry or by its URL or command, answers 400.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes
spanway-changed-byheaderstring or nullNoThe spanway-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability

Request body (application/json, schema MCPToolPolicyUpdateRequest):

FieldTypeRequiredDescription
enabled_write_toolsarray of stringYesWrite tools to turn on. Replaces the old list, names trimmed, de-duplicated and sorted

Example request:

curl -X PUT "http://localhost:4000/v1/mcp/server/server_id-123/tool-policy" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled_write_tools": [
"create_issue"
]
}'

Responses:

StatusDescriptionBody
200The tool policy after the changeapplication/json MCPToolPolicyResponse
400The server was not added from the catalogueapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
catalog_entrystring or nullYesThe catalogue connector the server matches, by its catalog_entry or by its URL or command
enabled_write_toolsarray of stringYesWrite tools an admin turned on for this server. Every other write tool stays hidden
read_only_toolsarray of stringYesTool names or patterns the connector treats as read-only, so agents can always use them
server_idstringYesThe MCP server the policy belongs to

POST /v1/mcp/server/{server_id}/user-credential​

Save your own API key for an MCP server

Stores your personal API key for an MCP server that asks each user to bring their own key, so its tools act as you. The key is stored encrypted and never returned. With save false nothing is stored and the answer reports has_credential false. Any user may store their own key for a server they can use. A server that does not take personal keys answers 400. With audit logging on, every stored or replaced key writes an audit row that never carries the key.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Request body (application/json, schema MCPUserCredentialRequest):

FieldTypeRequiredDescription
credentialstringYesYour personal API key or token for the MCP server, stored encrypted
savebooleanNoTrue stores the key. False stores nothing and answers false

Example request:

curl -X POST "http://localhost:4000/v1/mcp/server/server_id-123/user-credential" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"credential": "sk-example-personal-token",
"save": true
}'

Responses:

StatusDescriptionBody
200Whether a key is now storedapplication/json MCPUserCredentialResponse
400The server does not take personal keys, or the key has no userapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller has no access to this MCP serverapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
has_credentialbooleanYesHas Credential
server_idstringYesServer Id

DELETE /v1/mcp/server/{server_id}/user-credential​

Remove a stored personal API key

Deletes your stored personal API key for an MCP server, so its tools stop acting as you. A proxy admin may pass user_id to remove another user's key, for example when someone leaves. The answer reports has_credential false. With audit logging on, removing a stored key writes an audit row.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes
user_idquerystring or nullNo

Example request:

curl -X DELETE "http://localhost:4000/v1/mcp/server/server_id-123/user-credential" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The key is goneapplication/json MCPUserCredentialResponse
400The key is not tied to a user, so there is nothing to store per userapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
has_credentialbooleanYesHas Credential
server_idstringYesServer Id

GET /v1/mcp/server/{server_id}/user-credentials​

List who has connected to an MCP server

Lists every user who stored a personal API key or OAuth token for this MCP server, with the credential type and dates and no secrets. Use it before rotating a server or offboarding a user. Proxy admins and admin viewers only. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Example request:

curl -X GET "http://localhost:4000/v1/mcp/server/server_id-123/user-credentials" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The users and their credential typesapplication/json array of MCPServerUserCredentialListItem
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

GET /v1/mcp/server/{server_id}/user-env-vars​

Check your settings for an MCP server

Shows which per-user settings (environment variables such as a personal token) this MCP server needs from you and which you have already filled in. Values are never returned, only whether each one is set. Any user may check their own. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Example request:

curl -X GET "http://localhost:4000/v1/mcp/server/server_id-123/user-env-vars" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200Your settings statusapplication/json MCPUserEnvVarsStatus
400The key is not tied to a user, so there is nothing to store per userapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller has no access to this MCP serverapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
missing_countintegerNoMissing Count
requiredarray of MCPUserEnvVarSpecNoRequired
server_idstringYesServer Id
server_namestring or nullNoServer Name
setup_urlstring or nullNoSetup Url

POST /v1/mcp/server/{server_id}/user-env-vars​

Save your settings for an MCP server

Store the calling user's per-user MCP env var values for this server. Submitted values are merged over any previously stored values, so you only send the fields you want to set or change, and a variable left out (or sent empty) keeps its stored value. Use DELETE to clear all stored values. Values are stored encrypted and never returned. Any user may store their own.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Request body (application/json, schema MCPUserEnvVarsRequest):

FieldTypeRequiredDescription
valuesobjectYesValues

Example request:

curl -X POST "http://localhost:4000/v1/mcp/server/server_id-123/user-env-vars" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"values": {
"TRACKER_API_TOKEN": "sk-example-personal-token"
}
}'

Responses:

StatusDescriptionBody
200Your settings status after the changeapplication/json MCPUserEnvVarsStatus
400The key is not tied to a user, so there is nothing to store per userapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller has no access to this MCP serverapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
missing_countintegerNoMissing Count
requiredarray of MCPUserEnvVarSpecNoRequired
server_idstringYesServer Id
server_namestring or nullNoServer Name
setup_urlstring or nullNoSetup Url

DELETE /v1/mcp/server/{server_id}/user-env-vars​

Clear your settings for an MCP server

Deletes every per-user setting you stored for this MCP server, for example before handing a shared laptop on. The status that comes back shows each setting as not set. Any user may clear their own.

Parameters:

NameInTypeRequiredDescription
server_idpathstringYes

Example request:

curl -X DELETE "http://localhost:4000/v1/mcp/server/server_id-123/user-env-vars" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200Your settings, now emptyapplication/json MCPUserEnvVarsStatus
400The key is not tied to a user, so there is nothing to store per userapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The caller has no access to this MCP serverapplication/json ErrorDetail
404No MCP server has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
aliasstring or nullNoAlias
missing_countintegerNoMissing Count
requiredarray of MCPUserEnvVarSpecNoRequired
server_idstringYesServer Id
server_namestring or nullNoServer Name
setup_urlstring or nullNoSetup Url

GET /v1/mcp/sessions​

List live MCP gateway sessions

Shows the live stateful MCP sessions this gateway worker holds, grouped by AI client and by user, with how long each has been idle. Use it to see who is connected before a restart or to spot a stuck client. Proxy admins and admin viewers only. Each worker reports only its own sessions. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/sessions" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The live sessions on this workerapplication/json MCPGatewaySessionsResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
by_clientarray of MCPGatewaySessionGroupCountNoBy Client
by_userarray of MCPGatewaySessionGroupCountNoBy User
sessionsarray of MCPGatewaySessionNoSessions
total_sessionsintegerYesTotal Sessions
worker_pidintegerYesWorker Pid

DELETE /v1/mcp/sessions​

Close live MCP gateway sessions

Force-closes live stateful MCP sessions on this gateway worker, chosen by session_id_prefix, by the user_id that opened them, or both. Use it to cut off a client after revoking its access. Proxy admins only. Send at least one filter, otherwise the call answers 400. The client has to open a new session, which runs every access check again.

Parameters:

NameInTypeRequiredDescription
session_id_prefixquerystring or nullNo
user_idquerystring or nullNo

Example request:

curl -X DELETE "http://localhost:4000/v1/mcp/sessions" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The sessions that were closedapplication/json MCPGatewaySessionsTerminateResponse
400Neither filter was sentapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

Response fields (200):

FieldTypeRequiredDescription
sessionsarray of MCPGatewaySessionNoSessions
terminated_sessionsintegerYesTerminated Sessions
worker_pidintegerYesWorker Pid

GET /v1/mcp/tools​

List the MCP tools your key can use

Lists every MCP tool the calling key may use, across the servers it reaches directly and through MCP access groups, with each tool's description and argument schema. Use it to check what an agent will see before you hand it the key. Any virtual key or Admin UI session may call it. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/tools" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The tools the key may useapplication/json MCPToolListResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError

Response fields (200):

FieldTypeRequiredDescription
toolsarray of MCPListedToolYesEvery tool the calling key may use

GET /v1/mcp/toolset​

List toolsets

Lists the toolsets the calling key may use: every toolset for proxy admins, otherwise the ones granted to the key or its team. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/toolset" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The toolsets the calling key may useapplication/json array of MCPToolset
401No valid key or Admin UI session was presentedapplication/json ProxyError

POST /v1/mcp/toolset​

Create a toolset

Create a named toolset: a hand-picked set of tools from one or more MCP servers that agents reach at one endpoint, /toolset/{toolset_name}/mcp, instead of every tool of every server. Proxy admins only. A name already in use answers 409.

Parameters:

NameInTypeRequiredDescription
spanway-changed-byheaderstring or nullNo

Request body (application/json, schema NewMCPToolsetRequest):

FieldTypeRequiredDescription
descriptionstring or nullNoDescription
toolsarray of MCPToolsetToolNoTools
toolset_namestringYesToolset Name

Example request:

curl -X POST "http://localhost:4000/v1/mcp/toolset" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Read tickets and search the knowledge base",
"tools": [
{
"server_id": "jira",
"tool_name": "search_issues"
},
{
"server_id": "confluence",
"tool_name": "search_pages"
}
],
"toolset_name": "support-agent"
}'

Responses:

StatusDescriptionBody
201The toolset, reachable at /toolset/{toolset_name}/mcpapplication/json MCPToolset
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
409Toolset names are uniqueapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

PUT /v1/mcp/toolset​

Update a toolset

Changes a toolset. A field left out keeps its stored value and a field sent as null is cleared, except toolset_name and tools, which a toolset always has, so empty the selection with an explicit []. Agents see the change on their next request. Proxy admins only. A name already in use answers 409.

Parameters:

NameInTypeRequiredDescription
spanway-changed-byheaderstring or nullNo

Request body (application/json, schema UpdateMCPToolsetRequest):

FieldTypeRequiredDescription
descriptionstring or nullNoDescription
toolsarray of MCPToolsetTool or nullNoTools
toolset_idstringYesToolset Id
toolset_namestring or nullNoToolset Name

Example request:

curl -X PUT "http://localhost:4000/v1/mcp/toolset" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Read tickets and search the knowledge base",
"tools": [
{
"server_id": "jira",
"tool_name": "search_issues"
},
{
"server_id": "confluence",
"tool_name": "search_pages"
}
],
"toolset_id": "ts_01JD4Q9K7X2M8N3P5R6T7V8W9Y",
"toolset_name": "support-agent"
}'

Responses:

StatusDescriptionBody
200The toolset after the updateapplication/json MCPToolset
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No toolset has that idapplication/json ErrorDetail
409Toolset names are uniqueapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
created_atstring or nullNoCreated At
created_bystring or nullNoCreated By
descriptionstring or nullNoDescription
toolsarray of MCPToolsetToolNoTools
toolset_idstringYesToolset Id
toolset_namestringYesToolset Name
updated_atstring or nullNoUpdated At
updated_bystring or nullNoUpdated By

GET /v1/mcp/toolset/{toolset_id}​

Get a toolset

Returns one toolset with its tools. Proxy admins can read any toolset, other keys only the ones granted to them or their team. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
toolset_idpathstringYes

Example request:

curl -X GET "http://localhost:4000/v1/mcp/toolset/toolset_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The toolsetapplication/json MCPToolset
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key or its team does not list the toolsetapplication/json ErrorDetail
404No toolset has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError

Response fields (200):

FieldTypeRequiredDescription
created_atstring or nullNoCreated At
created_bystring or nullNoCreated By
descriptionstring or nullNoDescription
toolsarray of MCPToolsetToolNoTools
toolset_idstringYesToolset Id
toolset_namestringYesToolset Name
updated_atstring or nullNoUpdated At
updated_bystring or nullNoUpdated By

DELETE /v1/mcp/toolset/{toolset_id}​

Delete a toolset

Deletes a toolset. Agents using its endpoint lose access on their next request, while the MCP servers and their tools stay as they were. Proxy admins only. The answer is an empty 202.

Parameters:

NameInTypeRequiredDescription
toolset_idpathstringYes
spanway-changed-byheaderstring or nullNo

Example request:

curl -X DELETE "http://localhost:4000/v1/mcp/toolset/toolset_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
202The toolset was deleted
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No toolset has that idapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway has no database connectedapplication/json ErrorDetail

GET /v1/mcp/user-credentials​

List your MCP connections

Lists every MCP server you have connected with OAuth (credential_type oauth2) or your own API key (byok), with expiry times and no secrets, so you can see and clean up what acts on your behalf. A personal key never expires, so it has no expires_at. Any user may list their own. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/user-credentials" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200Your stored connectionsapplication/json array of MCPUserCredentialListItem
400The key is not tied to a user, so there is nothing to store per userapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError

GET /v1/mcp/user-env-vars/status​

Check your settings across MCP servers

Per-user MCP settings status across every server you can use, so the Admin UI can highlight servers that still need a value from you. Values are never returned. Any user may call it. Nothing is changed.

Example request:

curl -X GET "http://localhost:4000/v1/mcp/user-env-vars/status" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200One status per server that needs settingsapplication/json array of MCPUserEnvVarsStatus
401No valid key or Admin UI session was presentedapplication/json ProxyError