> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/quickstart-guides/factory-terminal-ide-guide.md).

# Connect Factory Terminal/IDE to Snyk

How to connect Droid in a terminal or IDE to the local Snyk MCP server

Connect Droid in your terminal or IDE to the local Snyk MCP server. Use the same user-level MCP configuration as the Factory App: `~/.factory/mcp.json`.

## Connect Droid to Snyk

1. Follow the [Factory IDE integration instructions](https://docs.factory.com/ide-integrations) for your environment.
2. Follow [Install the Snyk MCP server in Factory](https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/quickstart-guides/factory-guide.md#install-the-snyk-mcp-server-in-factory) to add the Snyk entry to `~/.factory/mcp.json`. Use this shared configuration for the Factory App and Droid.
3. Run `snyk auth` as the developer who runs Droid. Open the repository and complete any Snyk repository-trust request.
4. In Droid, use `/mcp` to inspect the Snyk connection and tool list. Ask the assistant to scan the repository:

   ```
   Scan this repository for code and dependency vulnerabilities. Summarize the findings before making changes.
   ```

## Set up the Snyk MCP server

For the configuration example and troubleshooting handoff, visit [Connect Factory to Snyk](https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/quickstart-guides/factory-guide.md). This setup provides agent-invoked MCP tools. It does not install Studio Secure at inception hooks or Agentic Development Security (ADS) Agent Behavior Governance hooks for Factory.

## Secure at inception rules

Use the [Factory project instructions](https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/quickstart-guides/factory-guide.md#secure-at-inception-rules) to request scans during development. Rules rely on the model following the instructions and do not guarantee scan execution. For the generic rule text, visit [Rules for manual MCP integrations](https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/directives.md#rules-for-manual-mcp-integrations).

## Examples

Use the [Factory scanning example](https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/quickstart-guides/factory-guide.md#examples) and check the actual tool calls and scan results.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/quickstart-guides/factory-terminal-ide-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
