Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose some cli commands through MCP server #4806

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

matt2e
Copy link
Collaborator

@matt2e matt2e commented Mar 7, 2025

TODO:

  • Figure out how to run Goose without it getting confused about which MCP server to use each time we give it a user prompt

Changes:

  • Refactor child command execution into a shared place so ftl mcp and interactive console can both execute child commands
  • MCP declares tools for specific CLI commands that we want exposed
    • Optional args/flags are ignored by default. Can be opted in when adding the command as an MCP tool.
    • args/flags can also be given regex patterns. Refs are automatically given a pattern.
  • Remove ftl dump-help as goose no longer needs to be taught about FTL CLI
  • Add test to confirm if MCP server can be built from CLI commands (panics if commands or expected options are missing)

# Conflicts:
#	cmd/ftl/cmd_dev.go
#	cmd/ftl/cmd_interactive.go
#	cmd/ftl/cmd_mcp.go
#	internal/terminal/interactive.go
#	internal/terminal/status.go
@alecthomas alecthomas mentioned this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant