# Connect a tool to Claude Code with MCP

Name a tool and the data you need; Claude Code finds a trustworthy MCP server, shows the add command first, connects it and checks it with one read.

Paste into: **Claude Code**, started in your project folder

## Prompt template

How the builder on the page fills in this template, so you can do the same:

- `{{key}}` becomes the text entered for that field, exactly as typed. Empty text, or text that is only whitespace (spaces, tabs or line breaks), counts as empty: a required field then becomes `[fill in: <label>]` with its label, and an optional field becomes nothing.
- For a choice field, `{{key}}` becomes the text of the chosen option, or of the default when none is chosen.
- Text between `{{#key}}` and `{{/key}}` stays only when that field is not empty; a choice field always counts as filled. The markers themselves are removed, and a marker that stands alone on its line takes its line break with it.
- Each value is inserted once, as it is: `{{…}}` inside a value stays as typed.

```text
Connect {{server}} via MCP so you can read its {{data}} directly. Add it with {{scope}}.
{{#details}}
What I know about the setup: {{details}}
{{/details}}

Steps:
1. Find the MCP server for this tool. Prefer one published by the tool's vendor or listed in the Anthropic Directory, and tell me where it comes from before adding it. If you cannot find one you can trust, stop and tell me.
2. Show me the exact claude mcp add command and wait for my go-ahead before running it.
3. Never put a token or password in a command, a file or this chat. If the server needs one, tell me how to supply it myself, for example by signing in through /mcp.
4. Prefer read-only access. If the server also has tools that write or delete, list them.
5. Check the connection: run claude mcp list, or ask me to check /mcp, then make one small read of {{data}} to show it works.

Report: the command used, where the configuration was saved, the tools the server offers, the result of the test read, and anything I still have to do, such as signing in or approving the server.
```

## Fields

- `{{server}}` (required): Tool to connect.
- `{{data}}` (required): What Claude should read from it.
- `{{scope}}`: Who gets the connection. Choose one:
  - local scope, only for me in this project (default)
  - project scope, saved in .mcp.json so the team gets it once it is committed
  - user scope, for me in all my projects on this machine
- `{{details}}`: Setup details you have. Optional. A server URL or package name from the vendor. Never paste tokens or passwords here.

This site doesn't run Claude or show model output. Results depend on your input and the model you use.

## When to use this template

- You keep copying data from one tool into Claude Code, such as stack traces from an error tracker or tickets from an issue tracker, and want Claude to read it directly.
- The tool offers an MCP server, or you know where to find one, and you can sign in to it or create an access token yourself.
- You want the team to share the same connection, through a project-scoped .mcp.json file committed to the repository.

## When not to use it

- You already use the tool as a claude.ai connector. If you sign in to Claude Code with that claude.ai account, connectors appear in /mcp without extra setup.
- You need the data once. Paste it or export a file; a permanent connection is not worth setting up for one question.
- The server fetches content from outside your organization and you have not checked who publishes it. Untrusted servers can expose you to prompt injection, so verify the source first.

## Why this structure

- Naming the tool and the data you need gives Claude a concrete test at the end: one read of that data proves the connection works for your purpose.
- The scope choice maps onto the documented installation scopes: local and user stay private to you, project is shared through .mcp.json.
- Asking where the server comes from before adding it, and preferring a vendor or Directory source, lets you judge the source before anything is connected.
- Showing the add command first and keeping tokens out of commands, files and chat means credentials are handled by you, not written into the repository.
- The report lists the tools the server offers and any write or delete tools, so you know what Claude can now do in that system.

## Example input (fictional)

Tool to connect:

```
our error tracker
```

What Claude should read from it:

```
stack traces
```

Who gets the connection:

```
local scope, only for me in this project
```

Setup details you have:

```
The vendor documents a remote MCP URL that uses OAuth sign-in.
```

## Follow-ups to send Claude

- Using the new connection, show me the three most frequent errors from the last day with their stack traces.
- Add a line to CLAUDE.md saying when to use this server and which tools to avoid.
- Require my approval before any tool on this server that writes or deletes. How do I set that up?

## Common mistakes

- Pasting an API token into the chat or the command. Sign in through /mcp, or supply it yourself, so it does not end up in history or a committed file.
- Committing a project-scoped server that needs a personal credential. Teammates then get a failing server, or you share your access.
- Skipping the test read. A server can be added without being connected; check that it shows as connected and returns real data.

## Related templates

- [Query logs in plain English](https://awesomeclaudeprompts.com/prompts/query-logs-plain-english/): Ask Claude Code a question about your logs; it writes a read-only query, runs it, and shows the query, the results and what stands out.
- [Investigate a production incident](https://awesomeclaudeprompts.com/prompts/investigate-incident/): Give Claude Code the symptom and when it started; it checks logs, recent deploys and config changes, then names the most likely cause with evidence.
- [Turn a repeated task into a skill](https://awesomeclaudeprompts.com/prompts/turn-task-into-skill/): Describe a workflow you repeat and have Claude Code save it as a skill, so you or your team can run it later as a slash command.

## Sources

- [Claude Code docs: Prompt library](https://code.claude.com/docs/en/prompt-library) (Anthropic documentation)
- [Claude Code docs: Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp) (Anthropic documentation)
- [Claude Code docs: MCP installation scopes](https://code.claude.com/docs/en/mcp#mcp-installation-scopes) (Anthropic documentation)
- [Claude Code docs: Use MCP servers from claude.ai](https://code.claude.com/docs/en/mcp#use-mcp-servers-from-claude-ai) (Anthropic documentation)

---

Awesome Claude Prompts is an independent project. It is not affiliated with, endorsed by, or sponsored by Anthropic. Claude is a trademark of Anthropic, PBC.
