Search Documentation

Find and navigate to documentation pages and their content

Extend Codistry with MCP

Add purpose-built tools using the Model Context Protocol. You stay in control of what each tool can do.

What is MCP

MCP is a simple protocol for exposing tools that an AI assistant can call with explicit user approval. A tool can be local on your machine or remote inside your network. You decide what is exposed and where it runs.

MCP is available for all Codistry users. You will see MCP commands in the Command Palette for adding and managing tools.

Quick Start

Recommended Configuration Path

Configure MCP servers from Codistry Settings, not the Command Palette. This gives you a clear JSON file with full control and easy versioning.

  1. Open Codistry Settings

    VS Code → Settings → search for Codistry → open the Tools & Integrations section.

  2. Enable MCP & Open the Config

    Check Enable MCP Servers, then click Edit Global MCP (or Edit Project MCP to keep config in the workspace).

  3. Edit mcp.json

    You'll land in a JSON file. The base looks like:

    {
      "mcpServers": {}
    }

    Add servers under mcpServers (examples below), save the file, and the agent will load them automatically.

  4. Use Your Tools

    Prompt the agent normally and it will recognize that it has access to your MCP server. Tool calls will respect your approval settings.

Example: PostgreSQL via Docker

This example is adapted from the archived MCP servers repository.

{
  "mcpServers": {
    "postgres": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/postgres",
        "postgresql://0.0.0.0:5432/mydb"
      ]
    }
  }
}
Security Notes

Prefer Project MCP for per-repo config you can commit (e.g., .vscode/mcp.json), and keep secrets in your OS/keychain or env files, not in Git.

Review tool permissions. Keep read-only auto-approvals on; require manual approval for writes and run_shell_command.

Popular Integrations

Database Access

Let the agent run read-only SQL under your credentials.

Great for:

  • Generate queries from natural language
  • Summarize results and explain query plans
  • Propose indexes based on slow queries

File System Tools

Expose a safe subtree for read and write operations you approve.

Great for:

  • Project-wide search and batch edits
  • Generating reports and exporting artifacts
  • Structured refactors across folders

GitHub

Bring PRs, issues, and discussions into context with fine-grained scopes.

Great for:

  • Summarizing PRs and proposing review comments
  • Searching issues across repositories you permit
  • Mining release notes from merged work

Custom Scripts

Wrap your Python, Node.js, or shell scripts as callable tools.

Great for:

  • Build and release automation
  • Test orchestration and reporting
  • In-house APIs and back-office tasks

How it Works

Local Tools

Runs as a local process with stdio. Best for private data and fast iteration.

  • File access stays on your machine
  • No external relay servers
  • You control the command, args, and environment

Remote Tools

Connect over HTTP (SSE or streamable-http) inside your network.

  • Use service accounts and existing auth
  • Share tools across a team
  • Restrict to allow-listed endpoints

Configuration Options

Global or Project Scoped

Global

Available in all workspaces on this machine. Great for universal utilities.

Project

Loaded only when the project opens. Great for repo-specific tools and secrets.

Manage Tools from VS Code

  • Codistry: Add MCP Server - add a tool
  • Codistry: List MCP Servers - view active tools
  • Codistry: Remove MCP Server - remove a tool
  • Codistry: Restart MCP Server - restart a tool
  • Codistry: Open MCP Configuration - open the mcpServers JSON

Example Configurations

File System Access

Expose a read-write path you control.

Name: docs-fs
Type: Local Process (stdio)
Command: npx
Arguments: -y @modelcontextprotocol/server-filesystem /Users/me/Documents

GitHub

Limit scopes to the minimum your workflow needs.

Name: github
Type: Local Process (stdio)
Command: npx
Arguments: -y @modelcontextprotocol/server-github
Environment: GITHUB_TOKEN=ghp_...

Custom Python Script

Wrap internal logic behind a stable tool API.

Name: my-tools
Type: Local Process (stdio)
Command: python
Arguments: /path/to/my_mcp_server.py
Security

Only add tools you trust. Tools run with the privileges you give them. Confirm the command, arguments, environment variables, and any network destinations before enabling. Review and approve each action the agent proposes.

Ready to extend Codistry

Add your first tool now: Cmd or Ctrl + Shift + P Add MCP Server