MCP server interface for the MissionSquad platform API (https://missionsquad.ai).
This server exposes MissionSquad account-scoped operations for models, agents, providers, vector stores, files, and core utilities via FastMCP tools.
- FastMCP stdio server (
mcp-msq) - MissionSquad API key support via hidden tool arg (
apiKey) or env fallback (MSQ_API_KEY) - MissionSquad base URL override via hidden tool arg (
baseUrl) or env fallback (MSQ_BASE_URL) - Strict TypeScript and Zod-validated tool inputs
- Multipart file upload support (
POST /v1/files) - Bounded binary file-content retrieval (
GET /v1/files/:id/content) with truncation metadata - Compact MCP server discovery output for installed/enabled servers only
- Build/test CI and npm publish workflow
Implemented from missionsquad-docs/api/index.md and the following reference pages:
chat-completions.mdembeddings.mdproviders.mdmodels.mdagents.mdcore-utilities.mdcollections.mdvector-stores.mdfiles.mdconvenience.mdendpoint-index.md
Current implementation intentionally excludes Webhooks endpoints because the reference only lists routes without request/response contracts.
- Node.js
>=20 - Yarn
yarn install
yarn build
yarn startRun as CLI after install/publish:
mcp-msqCopy .env.example to .env.
| Variable | Required | Default | Description |
|---|---|---|---|
MSQ_API_KEY |
No | unset | MissionSquad API key fallback when hidden apiKey is not passed |
MSQ_BASE_URL |
No | https://agents.missionsquad.ai/v1 |
Base URL for v1 endpoints |
MSQ_HTTP_TIMEOUT_MS |
No | 30000 |
Request timeout in milliseconds |
MSQ_DEFAULT_FILE_CONTENT_MAX_BYTES |
No | 1048576 |
Default max bytes returned by msq_get_file_content |
Hidden Arguments
The following are intentionally not in tool schemas and should be passed as hidden extra args:
apiKey: MissionSquad API key for request authenticationbaseUrl: Optional base URL override
Resolution order per request:
- Hidden extra arg
- Environment fallback
If no API key is available, the tool returns a user-facing error.
msq_list_modelsmsq_get_model_mapmsq_chat_completionsmsq_embeddings
msq_list_providersmsq_add_providermsq_delete_provider
msq_discover_provider_modelsmsq_add_modelmsq_delete_model
msq_list_agentsmsq_add_agentmsq_delete_agent
msq_generate_promptmsq_list_workflowsmsq_get_workflowmsq_create_workflowmsq_update_workflowmsq_run_workflowmsq_get_workflow_run_statusmsq_get_workflow_resultmsq_list_factoriesmsq_get_factorymsq_create_factorymsq_update_factorymsq_delete_factorymsq_list_factory_runsmsq_run_factorymsq_get_factory_run_statusmsq_get_factory_resultmsq_list_factory_run_stepsmsq_get_factory_run_stepmsq_get_factory_run_step_hydratedmsq_pause_factory_runmsq_resume_factory_runmsq_cancel_factory_runmsq_list_factory_schedulesmsq_create_factory_schedulemsq_update_factory_schedulemsq_delete_factory_schedulemsq_toggle_factory_schedulemsq_get_core_configmsq_get_core_config_summarymsq_scrape_urlmsq_list_toolsmsq_list_tool_functionsmsq_list_serversmsq_list_server_tools
msq_list_core_collectionsmsq_search_core_collectionmsq_get_core_collection_diagnosticsmsq_recover_core_collection
msq_list_vector_storesmsq_create_vector_storemsq_get_vector_storemsq_delete_vector_storemsq_list_vector_store_filesmsq_add_vector_store_filemsq_get_vector_store_filemsq_cancel_vector_store_session
msq_list_filesmsq_upload_filemsq_get_filemsq_delete_filemsq_get_file_content
msq_list_user_collectionsmsq_get_vector_store_file_details
The original MissionSquad tools remain available with their raw API-aligned output shapes:
msq_get_core_configmsq_list_tools
For programmatic tool calling and other iteration-heavy consumers, use the compact tools instead:
Returns a compact summary with:
models: array of model recordsagents: array of agent summariessquadsmissionsembeddingModelsembeddedCollectionsvoicescounts
This tool is intended for iteration and discovery, not for retrieving the full raw config payload.
Returns a compact summary with:
tools: flat array of tool functions withserverName,name, anddescriptionserverNamescounts
This tool is intended for discovery and agent/tool selection workflows.
Returns a compact server list for discovery workflows:
servers: array of records with onlyname,displayName,transportType, anddescription
This tool filters out servers that are not installed or not enabled.
Returns the raw tool inventory for a single MCP server:
- input:
serverName - output: the same tool list structure returned by MissionSquad for that server only
Use this after msq_list_servers when you need detailed tool schemas for a specific server without loading the full global inventory.
Workflow management uses the persisted workflow config and workflow run endpoints rather than the deprecated legacy SSE workflow route.
Supported workflow operations:
- create a workflow config with
msq_create_workflow - update a workflow config with
msq_update_workflow - list workflow configs with
msq_list_workflows - fetch a single workflow config with
msq_get_workflow - start a workflow run with
msq_run_workflow - inspect helper/main status with
msq_get_workflow_run_status - fetch the final main-agent result with
msq_get_workflow_result
msq_run_workflow accepts:
workflowId(required)dataPayload(optional JSON string override for this run only)
When dataPayload is provided to msq_run_workflow, it overrides the saved workflow config payload for that execution without modifying the workflow config itself.
msq_get_workflow_run_status returns helper success/failure state without helper content. For queued or running workflow runs, it waits on the MissionSquad workflow SSE stream and returns once the run reaches a terminal state.
msq_get_workflow_result returns only the final main-agent response and will fail if the run is still in progress or did not complete successfully.
Factory management uses the persisted factory config, factory run, factory step, and factory schedule endpoints.
Supported factory operations:
- list factory configs with
msq_list_factories - fetch a single factory config with
msq_get_factory - create a factory config with
msq_create_factory - update a factory config with
msq_update_factory - delete a factory config with
msq_delete_factory - list recent runs for a factory with
msq_list_factory_runs - start a factory run with
msq_run_factory - wait for a run to complete or pause with
msq_get_factory_run_status - fetch the final carry payload with
msq_get_factory_result - inspect recorded step runs with
msq_list_factory_run_steps - fetch one step run with
msq_get_factory_run_step - fetch one step run plus linked workflow/chat details with
msq_get_factory_run_step_hydrated - pause, resume, or cancel runs with
msq_pause_factory_run,msq_resume_factory_run, andmsq_cancel_factory_run - list, create, update, delete, or toggle schedules with the
msq_*factory_schedule*tools
Recommended factory tool sequence:
- discover or select the factory with
msq_list_factoriesormsq_get_factory - start the run with
msq_run_factory - wait for completion or pause with
msq_get_factory_run_status - fetch the final output with
msq_get_factory_result - use the step tools only when you need debugging or execution detail
msq_run_factory accepts:
factoryConfigId(required)initialCarryPayload(optional string; if omitted, MissionSquad starts the run with an empty string payload)
msq_get_factory_run_status returns compact high-level run status and intentionally omits the final carryPayload. For queued or running runs, it waits on the MissionSquad factory SSE stream and returns once the run becomes completed, error, cancelled, or paused.
msq_get_factory_result returns only the final run output in result.carryPayload. That payload may be plain text or a JSON string, so callers must not assume a specific format.
Factory schedule notes:
timesToRunuses backend UTC storage shape:[{ "hour": 19, "minute": 15 }]msq_create_factory_scheduledefaults torepeatInterval: "once"andstatus: "enabled"when omitted by the caller and backend- weekly schedules require
daysOfWeek - monthly schedules require
dayOfMonth
msq_upload_file accepts:
filePath(required)purpose(required)relativePath(optional)collectionName(optional)filename(optional override)
msq_get_file_content returns:
contentTypecontentLengthbytesReadtruncatedbase64
If response content exceeds maxBytes (or MSQ_DEFAULT_FILE_CONTENT_MAX_BYTES), payload is truncated safely and reported via truncated: true.
All tool handlers return deterministic JSON text strings. Parse text content on the client side if structured access is needed.
When a compact summary tool is used, the MCP output contract documented in this README is the authoritative interface for tool callers.
JSON-RPC tools/call with hidden API key
{
"method": "tools/call",
"params": {
"name": "msq_list_models",
"arguments": {
"apiKey": "msq-..."
}
}
}{
"method": "tools/call",
"params": {
"name": "msq_chat_completions",
"arguments": {
"model": "my-gpt4",
"messages": [
{ "role": "user", "content": "Hello" }
],
"apiKey": "msq-..."
}
}
}await client.callTool('msq_embeddings', {
model: 'nomic-embed-text-v1.5',
input: ['First sentence', 'Second sentence'],
apiKey: 'msq-...',
})Create a workflow:
await client.callTool('msq_create_workflow', {
name: 'Research Workflow',
mainAgentId: 'agent_main_123',
mainPrompt: 'Summarize findings from <collector|#|sourceA> and <collector|#|sourceB>',
dataPayload: '{"sourceA":"https://a.example","sourceB":"https://b.example"}',
concurrency: 2,
delimiter: '|#|',
apiKey: 'msq-...',
})Start a workflow run:
await client.callTool('msq_run_workflow', {
workflowId: 'wf_123',
apiKey: 'msq-...',
})Get workflow status:
await client.callTool('msq_get_workflow_run_status', {
runId: 'run_abc',
apiKey: 'msq-...',
})Get the final result:
await client.callTool('msq_get_workflow_result', {
runId: 'run_abc',
apiKey: 'msq-...',
})Scripts:
yarn buildyarn startyarn devyarn inspectyarn testyarn test:coverage
.github/workflows/build.yaml: build + test on PR open/sync.github/workflows/publish.yaml: build + test + publish onmainpush (markdown-only changes ignored)
MIT