Skip to main content
Command reference

codespar mcp-servers

Tenant MCP servers: register, validate, list, patch a tool, sweep platform fees

3 min read
View MarkdownEdit on GitHub

Tenant MCP servers: register, validate, list, patch a tool, sweep platform fees

8 commands in @codespar/cli 0.16.0.

Each one prints what its operation answered. What a command prints has the rule, and Configuration has the exit codes and the shape of a failure.

codespar mcp-servers validate

Connect to an upstream MCP server and list its tools

codespar mcp-servers validate --input '{"upstream_url":"https://example.com/hook","auth":{"header":"string","value":"string"}}'
optionwhat it does
-q, --query <key=value>Query parameter (repeatable) (default: [])
--timeout <ms>Per-request timeout in milliseconds
-i, --input <json>Request body as a JSON string
-f, --input-file <path>Request body from a JSON file

POST /v1/mcp-servers/validate · parameters, responses and refusals

codespar mcp-servers list

List this project's MCP servers

codespar mcp-servers list
optionwhat it does
-q, --query <key=value>Query parameter (repeatable) (default: [])
--timeout <ms>Per-request timeout in milliseconds

GET /v1/mcp-servers · parameters, responses and refusals

codespar mcp-servers create

Register a monetized MCP server and price its tools

codespar mcp-servers create --input-file body.json
body.json
{
  "slug": "example",
  "name": "Example",
  "description": "string",
  "overview_md": "string",
  "category": "string",
  "upstream_url": "https://example.com/hook",
  "consumer_id": "csm_0000000000000000",
  "upstream_auth": {
    "header": "string",
    "value": "string"
  },
  "platform_fee_bps": 0,
  "tools": [
    {
      "tool_name": "Example",
      "description": "string",
      "price": "string"
    }
  ]
}
optionwhat it does
-q, --query <key=value>Query parameter (repeatable) (default: [])
--timeout <ms>Per-request timeout in milliseconds
-i, --input <json>Request body as a JSON string
-f, --input-file <path>Request body from a JSON file

POST /v1/mcp-servers · parameters, responses and refusals

codespar mcp-servers get

Read one MCP server with its priced tools

codespar mcp-servers get obj_0000000000000000
argumentwhat it is
<id>String.
optionwhat it does
-q, --query <key=value>Query parameter (repeatable) (default: [])
--timeout <ms>Per-request timeout in milliseconds

GET /v1/mcp-servers/{id} · parameters, responses and refusals

codespar mcp-servers delete

Delete an MCP server and its priced tools

codespar mcp-servers delete obj_0000000000000000
argumentwhat it is
<id>String.
optionwhat it does
-q, --query <key=value>Query parameter (repeatable) (default: [])
--timeout <ms>Per-request timeout in milliseconds

DELETE /v1/mcp-servers/{id} · parameters, responses and refusals

codespar mcp-servers update

Update an MCP server's listing metadata or its active flag

codespar mcp-servers update obj_0000000000000000 --input '{"name":"Example","description":"string","overview_md":"string","category":"string","active":true}'
argumentwhat it is
<id>String.
optionwhat it does
-q, --query <key=value>Query parameter (repeatable) (default: [])
--timeout <ms>Per-request timeout in milliseconds
-i, --input <json>Request body as a JSON string
-f, --input-file <path>Request body from a JSON file

PATCH /v1/mcp-servers/{id} · parameters, responses and refusals

codespar mcp-servers tools

Reprice one tool, or turn it off

codespar mcp-servers tools obj_0000000000000000 string --input '{"price":"string","active":true}'
argumentwhat it is
<id>String.
<tool>String.
optionwhat it does
-q, --query <key=value>Query parameter (repeatable) (default: [])
--timeout <ms>Per-request timeout in milliseconds
-i, --input <json>Request body as a JSON string
-f, --input-file <path>Request body from a JSON file

PATCH /v1/mcp-servers/{id}/tools/{tool} · parameters, responses and refusals

codespar mcp-servers platform-fees-sweep

Move accrued platform fees to the organization's wallet now

codespar mcp-servers platform-fees-sweep
optionwhat it does
-q, --query <key=value>Query parameter (repeatable) (default: [])
--timeout <ms>Per-request timeout in milliseconds

POST /v1/mcp-servers/platform-fees/sweep · parameters, responses and refusals

codespar mcp-servers | CodeSpar