CoreStory MCP Token Management API

The mcp_token_management API from CoreStory — 3 operation(s) for mcp_token_management.

GitHub OpenAPI
Business capability
Developer Identity & Credential Management BC-4270.40

Operations 7

POST /api/mcp-tokens Create a new MCP token #
GET /api/mcp-tokens List all MCP tokens #
GET /api/mcp-tokens/limits Get the deployment's MCP token expiry bounds #
GET /api/mcp-tokens/{token_id} Get token details #
PATCH /api/mcp-tokens/{token_id} Update token metadata #
DELETE /api/mcp-tokens/{token_id} Revoke a token #
POST /api/mcp-tokens/{token_id}/revoke Revoke a token (alternative endpoint) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/corestory:corestory-mcp-token-management-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

corestory-mcp-token-management-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Crowdbotics API Documentation MCP Token Management API
  description: '# CoreStory API Overview


    The CoreStory API provides programmatic access to structured insights derived from software source code. It is designed for engineering, architecture, and product teams who need to extract business logic, technical specifications, architectural relationships, and system-level context from complex or legacy codebases. By interfacing directly with CoreStory API, users can:


    - Generate full Product Requirements Documents (PRDs) from a codebase

    - Extract detailed Technical Specifications for modernization or migration

    - Query a codebase using natural language to surface implementation details, logic paths, dependencies, and architectural insights

    - Construct and visualize knowledge graphs of systems, components, and relationships

    - Ingest, store, and retrieve content from a vector store for AI-powered retrieval-augmented generation (RAG) workflows


    CoreStory is especially valuable in contexts where:


    - Codebases are large, unstructured, or under-documented

    - Product and engineering teams are onboarding to unfamiliar systems

    - Technical stakeholders require visibility into system design or feature coverage

    - Modernization, replatforming, or M&A due diligence is underway


    The API can be integrated into existing CI/CD pipelines, internal developer portals, architecture review boards, product planning processes, or documentation automation workflows. All endpoints support secure authentication and are designed for high-availability, asynchronous workloads. Output formats include JSON, Markdown, and PDF, with flexible formatting options for downstream consumption. For step-by-step usage instructions and workflows, refer to the CoreStory API Quick Start Guide. ## Features


    * **Document Generation**

    * Generate complete Product Requirements Documents (PRD)

    * Generate Technical Specifications

    * Generate individual document sections (executive overview, user personas, etc.)

    * Format documents in JSON or Markdown


    * **Vector Store Management**

    * Ingest and manage documents in vector store

    * Query and retrieve document content

    * Manage document embeddings


    * **Context Management**

    * Manage context for different document types

    * Set and retrieve PRD context

    * Support for future context types (technical specs, user stories, etc.)


    * **Knowledge Graph**

    * Generate knowledge graphs from codebase queries

    * Visualize relationships between code entities

    * Analyze code structure and dependencies


    * **API Endpoints**

    * `/api/documents/*` - Document generation and formatting

    * `/api/generate/*` - Document formatting utilities

    * `/api/vector-store/*` - Vector store management

    * `/api/agents/*` - AI agent operations

    * `/api/context/*` - Context management for documents

    * `/api/graph/*` - Knowledge graph generation and analysis


    Note: JWT authentication support coming soon. All endpoints currently provide detailed OpenAPI documentation. * **Observability**

    * OpenTelemetry instrumentation for distributed tracing

    * Prometheus metrics endpoint at `/metrics`

    * Comprehensive request/response tracking

    * Custom business metrics


    # CoreStory System Architecture


    This document provides a high-level overview of how the CoreStory platform ingests, analyzes, and serves structured software intelligence through its API. The system is designed to process codebases and related technical artifacts in order to generate product specifications, technical documents, and knowledge graph representations. ---


    ## Core Components


    ### 1. **Ingestion Layer**


    - Accepts Git URLs, file uploads, or local archives

    - Extracts source files, documentation, and metadata

    - Initiates chunking and embedding via the vector store pipeline


    ### 2. **Vector Store and Context Engine**


    - Stores chunked and embedded documents

    - Supports semantic search and document retrieval

    - Feeds LLMs with scoped context for generation and reasoning


    ### 3.'
  version: 1.33.0
servers:
- url: /
  description: Current server
security:
- BearerAuth: []
tags:
- name: mcp_token_management
paths:
  /api/mcp-tokens:
    post:
      tags:
      - mcp_token_management
      summary: Create a new MCP token
      description: 'Create a new named MCP access token.


        The token is returned ONLY ONCE in the response. Save it securely!


        Use this token to authenticate MCP clients like Claude Desktop.'
      operationId: create_mcp_token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MCPTokenCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPTokenCreateResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
    get:
      tags:
      - mcp_token_management
      summary: List all MCP tokens
      description: List all MCP tokens for the current user.
      operationId: list_mcp_tokens
      parameters:
      - name: include_revoked
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Include Revoked
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPTokenListResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
  /api/mcp-tokens/limits:
    get:
      tags:
      - mcp_token_management
      summary: Get the deployment's MCP token expiry bounds
      description: Returns the min/default/max token validity in days so the creation UI offers only durations the deployment allows.
      operationId: get_mcp_token_limits
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPTokenLimitsResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
  /api/mcp-tokens/{token_id}:
    get:
      tags:
      - mcp_token_management
      summary: Get token details
      description: Get details for a specific MCP token.
      operationId: get_mcp_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPTokenResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
    patch:
      tags:
      - mcp_token_management
      summary: Update token metadata
      description: Update the name or description of an MCP token.
      operationId: update_mcp_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          title: Token Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MCPTokenUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPTokenResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
    delete:
      tags:
      - mcp_token_management
      summary: Revoke a token
      description: Revoke an MCP token. The token will immediately stop working.
      operationId: delete_mcp_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPTokenRevokeResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
  /api/mcp-tokens/{token_id}/revoke:
    post:
      tags:
      - mcp_token_management
      summary: Revoke a token (alternative endpoint)
      description: Alternative endpoint to revoke a token. Same as DELETE /mcp-tokens/{token_id}
      operationId: revoke_mcp_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPTokenRevokeResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
components:
  schemas:
    ErrorBody:
      properties:
        message:
          type: string
          title: Message
        type:
          type: string
          title: Type
        details:
          additionalProperties: true
          type: object
          title: Details
          description: Optional extra context for the error.
        code:
          anyOf:
          - type: string
          - type: 'null'
          title: Code
          description: Stable machine-readable code for clients that branch on the specific failure.
        required_organization:
          anyOf:
          - $ref: '#/components/schemas/RequiredOrganization'
          - type: 'null'
          description: Set when the caller can retry after switching organization context.
      type: object
      required:
      - message
      - type
      title: ErrorBody
    MCPTokenLimitsResponse:
      properties:
        min_expiry_days:
          type: integer
          title: Min Expiry Days
          description: Minimum token validity in days.
        max_expiry_days:
          type: integer
          title: Max Expiry Days
          description: Maximum token validity in days (the deployment ceiling).
        default_expiry_days:
          type: integer
          title: Default Expiry Days
          description: Default token validity in days.
      type: object
      required:
      - min_expiry_days
      - max_expiry_days
      - default_expiry_days
      title: MCPTokenLimitsResponse
      description: Deployment-configured token-lifetime bounds, so the creation UI offers only valid durations.
    MCPTokenRevokeResponse:
      properties:
        id:
          type: string
          title: Id
          description: Token identifier
        name:
          type: string
          title: Name
          description: Token name
        revoked_at:
          type: string
          format: date-time
          title: Revoked At
          description: When token was revoked
        revoked_by:
          type: string
          title: Revoked By
          description: User who revoked the token
        message:
          type: string
          title: Message
          description: Success message
          default: Token successfully revoked
      type: object
      required:
      - id
      - name
      - revoked_at
      - revoked_by
      title: MCPTokenRevokeResponse
      description: Response after revoking a token.
    MCPTokenCreateResponse:
      properties:
        id:
          type: string
          title: Id
          description: Token identifier
        name:
          type: string
          title: Name
          description: Token name
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Token description
        token_prefix:
          type: string
          title: Token Prefix
          description: Display-safe token prefix (mcp_abc...xyz)
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the token was created
        expires_at:
          type: string
          format: date-time
          title: Expires At
          description: When the token expires
        last_used_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Used At
          description: Last time token was used
        revoked_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Revoked At
          description: When token was revoked (if revoked)
        revoked_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Revoked By
          description: User who revoked the token
        is_active:
          type: boolean
          title: Is Active
          description: Whether token is active (not revoked/expired)
        is_revoked:
          type: boolean
          title: Is Revoked
          description: Whether token is revoked
        is_expired:
          type: boolean
          title: Is Expired
          description: Whether token is expired
        token:
          type: string
          title: Token
          description: Full token string (shown only once!)
        warning:
          type: string
          title: Warning
          description: Security warning
          default: Save this token securely. You won't be able to see it again.
      type: object
      required:
      - id
      - name
      - token_prefix
      - created_at
      - expires_at
      - is_active
      - is_revoked
      - is_expired
      - token
      title: MCPTokenCreateResponse
      description: Response when creating a new token (includes full token ONCE).
    MCPTokenResponse:
      properties:
        id:
          type: string
          title: Id
          description: Token identifier
        name:
          type: string
          title: Name
          description: Token name
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Token description
        token_prefix:
          type: string
          title: Token Prefix
          description: Display-safe token prefix (mcp_abc...xyz)
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the token was created
        expires_at:
          type: string
          format: date-time
          title: Expires At
          description: When the token expires
        last_used_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Used At
          description: Last time token was used
        revoked_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Revoked At
          description: When token was revoked (if revoked)
        revoked_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Revoked By
          description: User who revoked the token
        is_active:
          type: boolean
          title: Is Active
          description: Whether token is active (not revoked/expired)
        is_revoked:
          type: boolean
          title: Is Revoked
          description: Whether token is revoked
        is_expired:
          type: boolean
          title: Is Expired
          description: Whether token is expired
      type: object
      required:
      - id
      - name
      - token_prefix
      - created_at
      - expires_at
      - is_active
      - is_revoked
      - is_expired
      title: MCPTokenResponse
      description: Response for token metadata (without sensitive data).
    MCPTokenListResponse:
      properties:
        tokens:
          items:
            $ref: '#/components/schemas/MCPTokenResponse'
          type: array
          title: Tokens
          description: List of tokens
        total_count:
          type: integer
          title: Total Count
          description: Total number of tokens
        active_count:
          type: integer
          title: Active Count
          description: Number of active tokens
        revoked_count:
          type: integer
          title: Revoked Count
          description: Number of revoked tokens
      type: object
      required:
      - tokens
      - total_count
      - active_count
      - revoked_count
      title: MCPTokenListResponse
      description: Response for listing tokens.
    RequiredOrganization:
      properties:
        id:
          type: string
          title: Id
          description: Clerk organization id the client should switch to.
        name:
          type: string
          title: Name
          description: Display name of that organization.
      type: object
      required:
      - id
      - name
      title: RequiredOrganization
      description: The organization a caller must be acting under before a denied request can succeed.
    ErrorSchema:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
      - error
      title: ErrorSchema
    MCPTokenCreateRequest:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          description: User-friendly token name (e.g., 'Claude Desktop - MacBook Pro')
          examples:
          - Claude Desktop - MacBook Pro
          - CI/CD Pipeline
          - Development Server
        description:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Description
          description: Optional description for the token
          examples:
          - Personal development machine
          - Production deployment token
        expires_days:
          anyOf:
          - type: integer
            minimum: 1.0
          - type: 'null'
          title: Expires Days
          description: Token validity in days. Omit for the deployment default (capped at the ceiling); an explicit value above the ceiling is rejected.
          examples:
          - 30
          - 90
          - 365
      type: object
      required:
      - name
      title: MCPTokenCreateRequest
      description: Request to create a new MCP token.
    MCPTokenUpdateRequest:
      properties:
        name:
          anyOf:
          - type: string
            maxLength: 100
            minLength: 1
          - type: 'null'
          title: Name
          description: New token name
        description:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Description
          description: New token description
      type: object
      title: MCPTokenUpdateRequest
      description: Request to update token metadata.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter the Bearer token from Clerk authentication
x-tagGroups:
- name: Ingest Your Codebase
  tags:
  - vector_store
  - projects
  - pre_ingestion
  - reingestion
- name: Generate Code Intelligence
  tags:
  - documents
  - document_generation
  - document_formatters
  - prd
  - prd_version
  - tech_spec
  - quality_metrics
  - sample_projects
- name: Query Your Codebase
  tags:
  - conversations
  - workflows
  - discovery
  - context
  - artifacts
- name: Manage and Inspect Intelligence
  tags:
  - api_debugging
  - events
  - version
  - files
  - cache
  - token_tracking
- name: Authenticate and Manage Access
  tags:
  - clerk_authentication
  - git_webhooks
  - github_integration
  - organizations
  - api_key_management
  - mcp_token_management
  - user
- name: (Advanced) Prompt Tuning
  tags:
  - prompts
- name: MCP Protocol
  tags:
  - mcp_protocol
- name: Administration
  tags:
  - admin
x-provenance:
  method: harvested
  publisher: CoreStory
  source: https://c2s.corestory.ai/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)