sim icon indicating copy to clipboard operation
sim copied to clipboard

RFC: Sim MCP - Model Context Protocol Server for Sim

Open PlaneInABottle opened this issue 8 months ago • 5 comments

Hey team,

I'm building an MCP (Model Context Protocol) stdio server that exposes Sim workflow operations to MCP clients. Wanted to share what I've got and get your thoughts.


What is this?

The sim-mcp server allows AI assistants (like Claude Desktop, Cursor) to interact with Sim workflows programmatically. It's a TypeScript CLI server that forwards MCP requests to the Sim backend API.


Current Tools (~30)

Workflow Lifecycle:

  • list_workflows, get_workflow, create_workflow, delete_workflow
  • get_workflow_status, get_deployed_workflow_state
  • deploy_workflow, undeploy_workflow

Deployment Versions:

  • list_deployment_versions, get_deployment_version
  • activate_deployment_version, revert_workflow_to_deployment_version

Execution:

  • execute_workflow, run_workflow_until_block, run_from_block
  • run_block, cancel_execution
  • get_execution_logs, get_execution_log_detail

Graph Editing:

  • get_block, add_blocks, remove_blocks
  • update_block_name, toggle_block_enabled, update_block_parent
  • add_edge, remove_edge
  • add_variable, remove_variable
  • update_subflow

Workspace Assets:

  • list_custom_tools, get_custom_tool, upsert_custom_tools
  • list_skills, get_skill, create_skill, update_skill, delete_skill

Auth

Uses API key auth via x-api-key header:

  • SIM_API_BASE_URL
  • SIM_API_KEY

Questions

  1. Any missing operations you'd like to see?
  2. Any concerns with the auth approach?
  3. Open to featuring this anywhere?
  4. Any upcoming API changes I should know about?

Cheers

PlaneInABottle avatar Mar 13 '26 19:03 PlaneInABottle

I also take care of the output size. It won't bloat the ai with too long redundant response, except for the get log operations. I am actively using it to develop workflows and it looks great actually. I also believe it would help the publicity of the sim project, especially among developers.

PlaneInABottle avatar Mar 13 '26 20:03 PlaneInABottle

I did develop some endpoints without plan, I am planning to open prs for those as well, but I am not sure about the architecture since sim has some admin endpoints which normal api keys wouldn't work. Let me know what do you think about this. Maybe I could introduce 2 different api keys one for admin endpoints if user is admin etc. However I suspect the project is improving quickly so it could break often. Idk, just some thoughts.

PlaneInABottle avatar Mar 13 '26 20:03 PlaneInABottle

Hey! This seems pretty cool. We already have an mcp server for sim here, which handles workflow building and a variety of other operations across sim, and we're adding a lot to it soon too. Your approach seems pretty cool though, so happy to discuss further. Just wanted to link the current MCP in case you hadn't gotten a chance to check it out yet

Sg312 avatar Mar 13 '26 21:03 Sg312

@Sg312 I didn't know you could use your copilot as a mcp server, alas it's a paid service.

PlaneInABottle avatar Mar 14 '26 09:03 PlaneInABottle

This is great timing — AgentCost ships as an MCP server too (14 cost governance tools). If Sim gets an MCP interface and AgentCost is already MCP-native, the two could talk to each other with zero glue code. Happy to explore a proof-of-concept.

agentcostin avatar Mar 21 '26 18:03 agentcostin