Supercharge Your Local AI: A Guide to MCP and Goose
If you've been following the AI space, you've likely heard of MCP (Model Context Protocol). But how do you actually put it to work in your daily development workflow? Enter Goose, an open-source AI agent by Block that turns your terminal into a powerful, tool-aware assistant.
What is Goose?
Goose is a desktop agent that acts as a command center for your local environment. It leverages MCP to connect to your local files, databases, and system tools, allowing the AI to actually perform work rather than just generating text.
The MCP Advantage
By using MCP, Goose is essentially "plug-and-play." You don't need to write custom integration scripts for every new tool you want your AI to use. You simply install an MCP server (e.g., for SQLite, GitHub, or Postgres), and Goose automatically discovers it.
Getting Started with Goose
1. Installation
Goose runs directly from your terminal. Ensure you have Go installed, then:
# Install the Goose CLI
brew install block/tap/goose
# Initialize Goose in your project
goose init
2. Adding MCP Servers to Goose
Goose uses a configuration file to know which MCP servers to run. You can add them to your ~/.config/goose/config.yaml:
mcpServers:
sqlite:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-sqlite", "--dbPath", "/path/to/db.sqlite"]
github:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-github"]
3. Workflow: Letting the Agent Work
Once configured, you can start a session and give the AI access to your tools:
goose session
Inside the session, you can ask natural language questions like:
- "Search my GitHub issues for anything related to the authentication bug."
- "Query the
userstable in my local sqlite DB and report on the last 5 signups." - "Fix the code formatting in
main.goand run the tests."
Why This Combination Wins
- Contextual Awareness: Because Goose talks to your local filesystem via MCP, it isn't guessing your file structure. It reads it.
-
Agentic Capability: Instead of just outputting a diff, Goose can execute shell commands (
go test,git commit) to resolve tasks, providing a true "Agentic" experience. - Safety: Because the MCP servers run locally (usually via stdio), your data does not need to be uploaded to a third-party cloud service just to be "processed" by an AI.
Pro-Tips for Power Users
-
Environment Variables: You can pass API keys safely to your MCP servers via the
envblock in thegoose config.yaml. - Tool Filtering: If you have many tools, explicitly list the ones you want Goose to have access to in the configuration to keep the AI's context clean.
- Chain Commands: Use Goose to bridge tools—for example, fetching data from a database and piping it directly into a script that formats it for a GitHub pull request.
Conclusion
The marriage of MCP and local agents like Goose is the future of developer tooling. We are moving away from "chatting with code" to "collaborating with machines" that can actually execute the work. Set up your first MCP server today and watch how much faster your local iteration cycle becomes.
Top comments (0)