AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Add Mcp Server

skill-hazat-pi-config-add-mcp-server · by HazAT

Add an MCP server to pi. Use when asked to "add mcp server", "configure mcp", "add mcp", "new mcp server", "setup mcp", "connect mcp server", or "register mcp server". Handles both global and project-local configurations.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-hazat-pi-config-add-mcp-server

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-hazat-pi-config-add-mcp-server)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Add Mcp Server? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Add an MCP Server

Add an MCP server configuration to pi-mcp-adapter. Determine scope and server type, write the config, and verify the connection.

Step 1: Determine Scope

Ask the user if not obvious from context:

| Scope | Config File | When to Use | |-------|-------------|-------------| | Global | ~/.pi/agent/mcp.json | Server used across all projects | | Project | .pi/mcp.json (project root) | Server specific to one project |

Project-local configs override global ones. Both files use the same format.

Step 2: Determine Server Type

MCP servers connect via stdio (local process) or HTTP (remote URL).

Stdio server — runs a local command:

{
  "mcpServers": {
    "server-name": {
      "command": "npx",
      "args": ["-y", "package-name@latest"],
      "env": { "KEY": "value" }
    }
  }
}

HTTP server — connects to a URL:

{
  "mcpServers": {
    "server-name": {
      "url": "http://localhost:8080/mcp",
      "headers": { "Authorization": "Bearer token" }
    }
  }
}

Step 3: Gather Configuration

Collect only what's needed. All fields except command/url are optional.

| Field | Type | Description | |-------|------|-------------| | command | string | Executable to run (stdio) | | args | string[] | Command arguments (stdio) | | env | object | Environment variables (stdio) | | cwd | string | Working directory (stdio) | | url | string | Server URL (HTTP) | | headers | object | HTTP headers (HTTP) | | auth | "oauth" or "bearer" | Auth method (HTTP) | | bearerToken | string | Static bearer token | | bearerTokenEnv | string | Env var name for bearer token | | lifecycle | "lazy" / "eager" / "keep-alive" | Connection strategy (default: lazy) | | idleTimeout | number | Minutes before idle disconnect | | debug | boolean | Show server stderr |

Lifecycle modes:

  • lazy (default) — connects on first tool call, disconnects after idle timeout
  • eager — connects at session start, no auto-disconnect
  • keep-alive — connects at start, auto-reconnects if dropped

Step 4: Write the Config

  1. Read the target config file if it exists
  2. Merge the new server into the existing mcpServers object
  3. Write the updated JSON

If the file doesn't exist, create it with the full structure:

{
  "mcpServers": {
    "server-name": { ... }
  }
}

Warn if a server with the same name already exists and confirm before overwriting.

Step 5: Verify

  1. Run /reload to pick up the new config
  2. Use mcp({ connect: "server-name" }) to test the connection
  3. Use mcp({ server: "server-name" }) to list available tools
  4. Report success or troubleshoot connection errors

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.