# Overview

What MCP configs are and how they give agents access to external tools.



An **MCP config** is a serialized Model Context Protocol server definition that tells an agent how to launch and talk to an external tool. MCP is the open protocol Anthropic introduced for connecting LLMs to data sources, APIs, and arbitrary services — Nairi stores each MCP server config as a reusable artifact you can attach to any agent.

Each config holds a JSON blob (the standard `{ "mcpServers": { ... } }` shape) plus metadata: `title`, `description`, and an `is_sensitive` flag. Sensitive configs (anything with API keys baked in) never have their `content` returned on `GET` — the field is omitted to prevent secret leakage.

## How it works [#how-it-works]

1. Create the config with `POST /artifacts/mcp-configs`, passing the JSON as a string in the `content` field. Set `is_sensitive: true` if the JSON contains secrets.
2. Attach it to an agent via [agent resources](/api/agent-resources/overview) (`entity_type: "agent_artifact_mcp_cfg"`).
3. Redeploy. The agent's MCP proxy will spin up the configured server and expose its tools to the agent.

## When to use it [#when-to-use-it]

* **Give agents real tools that touch real systems.** Connect them to your production database, GitHub, Slack, Linear, Notion — or your own internal APIs via a custom MCP server.
* **Define a tool once, attach it to many agents.** Rotate keys in one place and every agent using the config sees the new credentials.
