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

Merged
merged 5 commits into from
Mar 11, 2025
Merged

Conversation

matt2e
Copy link
Collaborator

@matt2e matt2e commented Mar 7, 2025

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)

@alecthomas alecthomas mentioned this pull request Mar 7, 2025
@matt2e matt2e force-pushed the matt2e/goose/mcp-cli branch from b964daa to 0f5c6c5 Compare March 11, 2025 01:15
@matt2e matt2e marked this pull request as ready for review March 11, 2025 01:28
@matt2e matt2e requested review from a team and alecthomas as code owners March 11, 2025 01:28
@matt2e matt2e force-pushed the matt2e/goose/mcp-cli branch 2 times, most recently from cf8b319 to 5a1bd9c Compare March 11, 2025 01:49
@matt2e matt2e marked this pull request as draft March 11, 2025 01:54
@matt2e matt2e marked this pull request as ready for review March 11, 2025 02:33
@matt2e matt2e force-pushed the matt2e/goose/mcp-cli branch from 09a042c to f309cc9 Compare March 11, 2025 02:34
# Conflicts:
#	internal/terminal/interactive.go
@matt2e matt2e force-pushed the matt2e/goose/mcp-cli branch from f309cc9 to e05bb87 Compare March 11, 2025 02:36
@matt2e matt2e force-pushed the matt2e/goose/mcp-cli branch from 7637314 to fc0112b Compare March 11, 2025 02:57
@matt2e matt2e merged commit c54542d into main Mar 11, 2025
69 checks passed
@matt2e matt2e deleted the matt2e/goose/mcp-cli branch March 11, 2025 03:17
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