SM

SmartBear MCP Server: API, Test, Insight Hubs

Access SmartBear's MCP server to manage API, Test, and Insight Hubs with dedicated tools, resources, and centralized capabilities.

Quick Install
npx -y @SmartBear/smartbear-mcp

Overview

SmartBear MCP Server implements the Model Context Protocol (MCP) to provide a centralized runtime for managing context resources that support model-driven workflows. It groups context into Hubs — API, Test, and Insight Hubs — and exposes a consistent HTTP API and tools to store, version, and serve artifacts such as API schemas, test assets, prompts, and telemetry. The server is intended to sit between applications and models, making it easier to share and reuse contextual resources across teams, CI/CD pipelines, and runtime environments.

For developers, MCP reduces friction when building applications that rely on external context: instead of embedding prompts, test cases, or API descriptions inside each service, you store them in a Hub and reference them at runtime. This centralization improves governance, makes updates atomic, and enables capabilities like environment-aware variants, versioning, and usage insights.

Features

  • Hub-based organization: API, Test, and Insight Hubs for separation of concerns
  • HTTP API for creating, updating, and retrieving context resources
  • Versioning and metadata for resources (labels, environments, tags)
  • Pluggable storage backends (local filesystem, cloud object stores) — configurable
  • Authentication and access controls (API keys / tokens)
  • Command-line tooling and example client snippets for common workflows
  • Web UI (optional) for browsing hubs and resources
  • Lightweight and container-friendly (Docker support)

Installation / Configuration

Requirements: Node.js (>=14) or Docker. Clone the repo or pull the container image.

Clone and run locally (Node):

git clone https://github.com/SmartBear/smartbear-mcp.git
cd smartbear-mcp
npm install
# start the server (example)
NODE_ENV=development PORT=8080 node ./src/server.js

Run with Docker:

# build image
docker build -t smartbear/mcp:latest .
# run container (default port 8080)
docker run -p 8080:8080 \
  -e MCP_STORAGE=fs \
  -e MCP_DATA_DIR=/data/mcp \
  -v $(pwd)/data:/data/mcp \
  smartbear/mcp:latest

Environment variables (common):

VariablePurposeDefault
MCP_PORTHTTP port for the server8080
MCP_STORAGEStorage backend (fs, s3, etc.)fs
MCP_DATA_DIRFilesystem storage directory./data
MCP_API_KEYSimple API key for access(none)
MCP_LOG_LEVELLogging verbosityinfo

For a production deployment, configure a persistent object store (S3-compatible) and a secret management solution for API keys. Refer to the repository for backend-specific configuration options.

Available Resources

The MCP server organizes content into Hubs and Resources. Typical resource types include:

  • API specifications (OpenAPI, AsyncAPI)
  • Test artifacts (test cases, fixtures, postman collections)
  • Prompt templates and prompt bundles
  • Policy and validation rules
  • Telemetry and insights (usage logs, model responses)

Example endpoints (illustrative):

  • GET /hubs — list hubs
  • POST /hubs — create a hub
  • GET /hubs/{hubId}/resources — list resources in a hub
  • POST /hubs/{hubId}/resources — add a resource
  • GET /resources/{resourceId} — fetch a resource
  • PUT /resources/{resourceId}/versions — create a new version

Check the repository’s API docs for the definitive endpoint list and request/response schemas.

Use Cases

  1. Centralized prompt management

    • Store prompt templates in a Test or API Hub, version them, and reference by ID from microservices. Example: replace embedded prompt strings with a call to GET /hubs/{hub}/resources/{promptId}/latest.
  2. Shared API contracts for model integrations

    • Keep OpenAPI definitions in an API Hub. Use MCP to fetch API schemas during model input construction or validation. This ensures models and adapters use the latest contract.
  3. CI/CD test orchestration

    • Store test suites and fixtures in a Test Hub. CI jobs pull the appropriate suite version to run regression checks against model-driven endpoints.
  4. Observability and insights

    • Persist model responses and usage metrics to an Insight Hub to analyze prompt effectiveness, latency, and cost patterns over time.
  5. Multi-environment deployments

    • Use resource metadata to keep environment variants (dev/stage/prod) and allow runtime selection of appropriate context.

Quick Examples

Create a hub:

curl -X POST http://localhost:8080/hubs \
  -H "Authorization: Bearer $MCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"payment-api","type":"api","description":"API contracts for payment services"}'

Add a resource (OpenAPI file):

curl -X POST http://localhost:8080/hubs/payment-api/resources \
  -H "Authorization: Bearer $MCP_API_KEY" \
  -F "[email protected]" \
  -F "metadata={\"tags\":[\"v1\",\"public\"]};type=application/json"

Fetch latest resource version:

curl -H "Authorization: Bearer $MCP_API_KEY" \
  http://localhost:8080/hubs/payment-api/resources/payment-openapi/latest

Next Steps

  • Browse the GitHub repository for example clients, schema definitions, and deployment manifests.
  • Integrate the MCP server into a staging environment and migrate a single resource type (e.g., prompts) to validate the workflow.
  • Use the Insight Hub to collect feedback and iterate on resource versioning policies.