Skip to content

Blog Article

MCP Server Examples for AI Agents

Survey of production MCP server implementations — file system, GitHub, PostgreSQL, Linear, Slack, and AppHandoff — with architecture patterns and setup guides.

By AppHandoff Team · Published · 8 min read

TutorialMCP

The Model Context Protocol ecosystem has grown rapidly since its introduction. Dozens of MCP servers now exist, each giving AI agents structured access to a different tool or data source. But with so many options, it is hard to know which servers matter, how they differ architecturally, and when to use one over another. This guide surveys the most important MCP server implementations in production today, with real configuration examples and guidance on building your own.

File System MCP Server

The file system MCP server is the simplest and most widely used. It exposes local file operations — read, write, list, search — as MCP tools. Agents use it to navigate codebases, read configuration files, and write generated code. It runs locally (no network calls), responds in milliseconds, and requires minimal configuration. Most MCP-compatible editors include a built-in file system server, so you may already be using one without explicit setup.

The architecture is straightforward: the server watches a configurable set of directories, exposes tools like read_file, write_file, list_directory, and search_files, and enforces path-based access controls to prevent agents from reading outside the project root. Some implementations add glob-based filtering (only expose .ts and .tsx files) and gitignore-aware directory listings.

GitHub MCP Server

GitHub's official MCP server exposes the GitHub API as MCP tools. Agents can read repository contents, search code across repos, create and manage issues, open and review pull requests, and read workflow run status. It is essential for any agent workflow that involves version control — which is nearly all of them.

The server authenticates via a GitHub personal access token or OAuth app. It translates MCP tool calls into GitHub REST API requests, handles pagination transparently, and returns structured JSON. For teams with multiple repos, agents can cross-reference code and issues across repositories in a single session. The guide to connecting a GitHub MCP server to Cursor covers the full configuration, and the GitHub MCP page shows how AppHandoff layers architecture context on top of it.

// MCP server examples — editor config (.cursor/mcp.json)
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "./src"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "ghp_xxxxxxxxxxxx" }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": { "DATABASE_URL": "postgresql://reader:pass@localhost:5432/mydb" }
    }
  }
}

PostgreSQL MCP Server

The PostgreSQL MCP server gives agents schema awareness and read-only query execution. It connects to your database using a read-only role and exposes tools for listing tables, describing columns and constraints, viewing foreign key relationships, and running SELECT queries. This is critical for any agent task that involves database interactions — building API endpoints, writing migrations, or debugging data issues.

The key architectural decision is read-only enforcement. Production PostgreSQL MCP servers use a database role that can only execute SELECT statements. This is enforced at the database level (GRANT SELECT ONLY), not just in the MCP server code, because agents can be creative with tool parameters. Our detailed guide at /blog/postgresql-mcp-server covers setup, security, and best practices.

Linear MCP Server

The Linear MCP server connects agents to your issue tracker. Agents can read issues with full metadata (status, labels, assignee, linked PRs), search across projects, create sub-issues, and update ticket status. It transforms agents from code-only assistants into project-aware collaborators that know what to build, not just how to build it.

Linear's GraphQL API maps cleanly to MCP tools. Each tool corresponds to a Linear query or mutation, with structured input parameters and typed JSON responses. The server handles authentication, pagination, and rate limiting. For a deep dive into Linear MCP workflows, see /blog/linear-mcp-server.

Slack MCP Server

The Slack MCP server gives agents access to team communication. Agents can read channel messages, search conversation history, post updates, and read thread replies. The primary use case is context gathering — an agent working on a feature can search Slack for discussions about requirements, design decisions, and known edge cases that never made it into the ticket.

The architecture uses Slack's Web API with bot tokens. The MCP server scopes access to specific channels (agents should not read #random) and enforces rate limits to avoid Slack API throttling. Message formatting is normalized from Slack's mrkdwn to plain text so agents process content without parsing markup. Write access (posting messages) is typically restricted to specific channels like #agent-updates.

AppHandoff MCP Server

AppHandoff's MCP server is purpose-built for AI agent coordination across the full development lifecycle. Unlike single-service servers that expose one tool or data source, AppHandoff aggregates coordination state — handoff tickets, claims, milestones, published contracts, ticket history — into a unified tool surface. Agents get exactly nine tools from tools/list — four reads, four writes and an approval click (clients without approval-card support see eight) — covering project context, ticket management, contracts, evidence, and agent session coordination.

The server uses Streamable HTTP and is stateless per request. Clients on the 2026-07-28 protocol can subscribe to resource-update notifications when tickets change; older clients get no live push but can replay missed notifications through message. AppHandoff does not stream ticket updates over SSE. Authentication is OAuth 2.1 — you sign in through the browser once and the client manages tokens from there; a headless agent can use a personal access token as a bearer header. Requests stand alone, but the server remembers the project an agent resolved with bootstrap, so later reads can leave it out. The full tool reference is at /mcp-server.

// AppHandoff MCP server — production config
{
  "mcpServers": {
    "apphandoff": {
      "url": "https://api.apphandoff.com/mcp"
    }
  }
}

// The nine tools:
// - Session start: bootstrap
// - Reads: get (by ref), find (cards by type), read_skill
// - Tickets, contracts, evidence: ticket
// - Plans and milestones: plan
// - Thread posts: message
// - Projects: project
// - Human approval click: decide_lifecycle_proposal (not listed to clients without approval-card support)

Architecture Patterns Across MCP Servers

Despite their different data sources, production MCP servers share common patterns. Transport is overwhelmingly Streamable HTTP (replacing the earlier stdio-based approach for remote servers). Authentication uses bearer tokens or OAuth. Tool responses are JSON with consistent error shapes. Servers implement capability negotiation during the handshake so agents know which tools are available before calling them.

The biggest architectural divide is between local servers (file system, local database) that run as child processes of the editor, and remote servers (GitHub, Linear, AppHandoff) that run as hosted services. Local servers use stdio or localhost HTTP, start instantly, and have zero latency. Remote servers use HTTPS, require authentication, and add network latency but provide access to shared team data that local servers cannot. For how an MCP server differs from the API it wraps, see MCP vs API.

Building Your Own MCP Server

If your team uses a tool that does not have an MCP server, building one is straightforward. The @modelcontextprotocol/sdk package provides the server framework. You define tools as functions with typed input schemas (Zod), register them with the server, and expose the server over HTTP. A basic MCP server with three tools can be built in under 100 lines of TypeScript. Once it runs, MCP Inspector lets you list its tools and call them before you connect an agent.

// Minimal custom MCP server (TypeScript)
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { z } from 'zod';

const server = new McpServer({ name: 'my-server', version: '1.0.0' });

server.tool(
  'get_status',
  'Get current system status',
  { service: z.string().describe('Service name') },
  async ({ service }) => ({
    content: [{ type: 'text', text: JSON.stringify({ service, status: 'healthy' }) }]
  })
);

// Expose over Streamable HTTP transport
// See @modelcontextprotocol/sdk docs for transport setup

Choosing the Right MCP Servers

Start with the servers that match your daily workflow. If you use GitHub, add the GitHub MCP server. If you use PostgreSQL, add the PostgreSQL server. If you manage work in Linear, add the Linear server. Each server you add gives agents one more layer of context, and the compounding effect is significant — an agent with access to your code, database, tickets, and team communication writes meaningfully better code than one with just file access. If your database runs on Supabase, the Supabase MCP setup for Claude Code is the place to start.

For teams building AI-first products with Lovable or similar tools, AppHandoff's MCP server provides the coordination layer that ties everything together. It combines the coordination context into a single interface and adds contract publishing, ticket workflows, and deployment tools that standalone servers do not provide. Explore the MCP server page at /mcp-server for the complete tool catalog.

Frequently asked questions

What are the most useful MCP server examples for AI coding agents?

The most impactful MCP servers for AI coding agents are the file system server for local file operations, the GitHub server for repository and issue management, a PostgreSQL server for database schema context, a project tracker server like Linear for ticket-aware development, and a coordination server like AppHandoff for shared tickets, claims, and published API contracts. Each adds a distinct layer of context that reduces the likelihood of agents producing plausible but wrong code.

How do you run multiple MCP servers simultaneously in Cursor?

Add multiple named entries to the mcpServers object in .cursor/mcp.json. Each entry has a unique name and either a url for remote servers or a command and args array for local servers. Cursor connects to all configured servers during startup and makes all their tools available to the agent simultaneously. The agent discovers all available tools through the MCP handshake and can call tools from any server during a single coding session.

Should I use local MCP servers or remote hosted ones?

Local servers like the file system and PostgreSQL MCP server are best for data that lives on your machine or local network, where latency and security matter most. Remote hosted servers like GitHub, Linear, and AppHandoff are better for shared team data that needs to be consistent across all developers and agents. Most production setups combine both: local servers for file and database access, remote servers for project management and architecture context.

How difficult is it to build a custom MCP server?

Building a basic MCP server is straightforward. The @modelcontextprotocol/sdk package provides a McpServer class where you register tools with Zod-typed input schemas and async handler functions. A server with three tools can be built in under 100 lines of TypeScript. The main complexity comes from scaling considerations like session management, SSE for long-running operations, and multi-tenant authentication, which matter once you are building a production hosted server for team use.

What transport should a new MCP server use?

New MCP servers should use Streamable HTTP transport, which is the current standard for remote servers. The client sends JSON-RPC requests as HTTP POST bodies and the server responds with either direct JSON or an SSE stream for long-running operations. Stdio transport is only appropriate for local servers that run as child processes of the editor. Avoid SSE-only transport since the Streamable HTTP spec supersedes it and provides better compatibility with current MCP clients.