Custom MCP server development: AI agents securely in your stack

The Model Context Protocol (MCP) has quickly become the de facto standard for connecting AI agents to internal tools, data sources and business systems. Appfront builds custom MCP servers that give Claude, Cursor, Cline and your own agents standardised, secure and scalable access to your CRM, ERP, data warehouse, documents and operational actions, without writing a separate integration for every client.

Model Context Protocol JSON-RPC 2.0 Tools, resources, prompts OAuth 2.1 Python & TypeScript SDK
Schedule an MCP architecture session View use cases
MCP-host Claude / Cursor / Cline MCP-server tools · resources · prompts JSON-RPC CRM ERP Docs DWH

What exactly is an MCP server?

The Model Context Protocol is an open standard that Anthropic published in November 2024. MCP defines how an LLM application (the host) talks to external systems: in a structured, rediscoverable way, and without the host needing to know how those systems work under the hood.

An MCP server exposes three kinds of capabilities to the host. Tools are actions the model can call: creating a ticket, running a query, sending an email. Resources are read-only sources, comparable to REST GET endpoints: a document, a table row, a user profile. Prompts are reusable instruction templates that the server offers the host for common workflows.

The analogy often used in the MCP community is "USB-C for AI tooling": one standardised socket that hundreds of tools and hundreds of hosts can plug into without depending on each other. For organisations, this means a single well-built MCP server can serve you for years, even if you migrate from Claude to another LLM vendor or agent framework along the way. Read more in the official specification at modelcontextprotocol.io.

Communication runs over JSON-RPC 2.0. Local MCP servers usually run over stdio, with the host spawning the server process and communicating via standard input and output. Remote MCP servers use Server-Sent Events (SSE) or streamable HTTP, with OAuth 2.1 for authentication. Capability negotiation at the start of the session ensures that host and server only use features both support, so backwards compatibility is built into the protocol.

Why MCP, and not simply an API integration per agent?

Many teams start their AI journey by coding function calling directly into the prompt or by writing a LangChain tool for each integration. That works for a single agent, but becomes unmanageable as soon as you want to support multiple clients or multiple LLM providers.

One integration, many hosts

With MCP, you build your business logic once. Claude Desktop, Cursor, Cline, Continue.dev, Zed and custom agents all talk to the same server. A developer can use Cursor while a sales colleague uses Claude Desktop, and both see the same tools and data.

No vendor lock-in

Function-calling formats differ per LLM vendor. MCP is independent of the model provider. Are you migrating from Anthropic to another vendor, or adding a local open model? Your MCP server keeps running.

Security in one place

Authentication, authorisation, scopes, rate limiting and audit logging all live in the server. You don't have to monitor per agent which prompts can trigger which sensitive action; the server guards the gate.

Discoverable capabilities

The host doesn't need to know in advance which tools are available. The server publishes its capabilities via list_tools and list_resources, and the host adapts its behaviour automatically. New tools become available immediately, without a client update.

Scalable across teams

You can run a separate MCP server per domain (one for finance, one for HR, one for engineering) and let each user choose which ones their host loads. Composable, not monolithic.

Open standard

MCP is open source under the MIT licence. SDKs for Python, TypeScript, C#, Java and Kotlin are official; the community contributes SDKs for Go, Rust and other languages. No proprietary dependency on a single vendor.

Architecture: host, client and server

MCP follows a classic client-server model with a three-part structure that is worth understanding before you design an implementation.

The MCP host is the application the end user works with: Claude Desktop, Cursor, Cline or a custom agent. The host manages the LLM, the user interface and the user session. For every MCP server the host wants to use, it instantiates a separate MCP client. That client is the plumbing layer that serialises and deserialises JSON-RPC messages.

The MCP server, finally, is what Appfront builds for you. It is a process that publishes tools, resources and prompts and executes them on request. The server is stateless between requests, with all context included in the call, which makes horizontal scaling straightforward.

When a session starts, host and server perform a capability negotiation. Both parties state which protocol version and which features they support, such as tools, resources, prompts, sampling, roots or logging. Only then does the actual communication begin.

┌──────────────────────┐ │ MCP host │ │ (Claude / Cursor) │ │ ┌────────────────┐ │ │ │ MCP client │ │ │ └───────┬────────┘ │ └──────────┼───────────┘ │ JSON-RPC 2.0 stdio / SSE │ ┌──────────┼───────────┐ │ ┌───────▼────────┐ │ │ │ MCP server │ │ │ │ • tools │ │ │ │ • resources │ │ │ │ • prompts │ │ │ └────────────────┘ │ │ │ │ Auth · scopes · │ │ audit · rate-limit │ └──────────┬───────────┘ │ ┌───────┼───────┐ │ │ │ CRM Docs Data warehouse

What a custom MCP server can do for you

A well-designed MCP server is the bridge between your LLM front end and everything already running in your landscape. Below are six typical capability categories that we implement for clients.

Querying business data

Reading from your CRM, ERP, ticketing system, data warehouse or CMS. With scope-based permissions, query templates and row-level security, an agent can safely ask for department or customer data without any risk of overreach.

Opening up documents

A resource offering that serves back manuals, contracts, policy documents or Confluence pages. The agent only reads when it is relevant: no pre-filled context, no context-limit problems.

Operational actions

Creating tickets in Jira or ServiceNow, scheduling emails, booking calendar meetings, generating payment links, triggering deployments: write tools that work in line with your approval flow.

Legacy bridge

SOAP services, IBM mainframes, AS/400s and other older systems get a modern, AI-accessible face through a single MCP server. The server translates LLM-friendly calls into legacy protocols.

Workflow templates as prompts

Frequently used instruction patterns, such as an onboarding checklist, an incident-response flow or a sales-discovery script, can be published as MCP prompts. End users get them served up in the host UI.

Domain-specific calculations

Premium calculations, valuation models, procurement comparisons, capacity planning: anything you would rather handle in deterministic code than in an LLM prompt can be exposed as a tool.

How Appfront builds your MCP server

We work in iterative sprints, with a working prototype within a few weeks and a production deployment with monitoring within one to three months, depending on scope.

01
Use-case discovery
In a working session, we map out which tools, resources and prompts your agents need. We map the source systems, identify auth patterns and determine which actions are read and which are write.
02
Schema and security design
We define pydantic or zod schemas for every tool, define OAuth scopes and authorisation rules, and design the audit-log format. Rate limits and tool permissions are settled here too.
03
Build and integration
Implementation with the official MCP Python or TypeScript SDK (often FastMCP for a quick bootstrap), connected to your source systems. Includes unit tests, integration tests and end-to-end tests from Claude Desktop.
04
Deployment and monitoring
Container deployment on your cloud (Docker/Kubernetes) or on-premises. Logging via OpenTelemetry, observability in Grafana or Datadog, alerting on tool failures, and handover documentation for your operations team.
Not sure about a large project yet?

Test your idea first: a working prototype in 1 day

With OneDayBuild, we make your idea tangible in a single day for €1,150, so you know whether further development is worth the investment. Decide to go ahead with the full build? Then we deduct the cost in full.

View OneDayBuild →

Technology and SDKs

We work with the official MCP stack and additional libraries that cover the operational side of a production-grade server.

MCP server frameworks

MCP Python SDK FastMCP MCP TypeScript SDK Anthropic agent SDK pydantic-ai JSON-RPC 2.0 SSE / streamable HTTP stdio transport

FastMCP (part of the official Python SDK) speeds up bootstrapping a server to a few dozen lines of code for a first tool. For TypeScript projects, we use the official @modelcontextprotocol/sdk.

Operational stack

Docker Kubernetes OAuth 2.1 PKCE OpenTelemetry Grafana / Datadog PostgreSQL Redis GitHub Actions / GitLab CI FastAPI / Express

For remote MCP servers, we use OAuth 2.1 with PKCE, optionally via your existing identity provider (Auth0, Okta, Azure AD). We stream audit events to your SIEM or a dedicated logging bucket.

Real-world use cases

Four scenarios we regularly deliver, as inspiration for your own MCP roadmap.

Company Claude with internal wiki access

An MCP server on top of Confluence, Notion or your own DMS, so that Claude Desktop acts as a company AI for employees, with permanent access to policies, processes and manuals. Resources are scoped by department, and write tools are limited to draft creation.

DevOps AI: Kubernetes and GitHub via MCP

Tools for cluster status, pod logs, deploy rollouts and GitHub PR reviews. Engineers use Cursor or Cline as their operations cockpit. Write actions (deploys, rollbacks) sit behind a human-in-the-loop confirmation flow.

Customer service agent: tickets and CRM combined

A single MCP server connects Zendesk or Freshdesk to your CRM. The agent sees ticket history, customer status and contractual agreements in a single call, and can suggest personalised replies or create structured escalations.

Data warehouse MCP for analysts

An MCP server on top of Snowflake, BigQuery or Postgres with read-only query tools, schema resources and saved-query prompts. Business analysts ask Claude questions in natural language, and it safely generates SQL within the permitted scope.

Security and governance

An MCP server gives an AI agent access to production data. That deserves a security baseline on a par with your other critical integrations: no more, but certainly no less.

Authentication and authorisation

OAuth 2.1 with PKCE for remote servers, optionally via your identity provider. A separate scope per tool, and row-level or attribute-based access control per resource. Tokens expire automatically, and refresh flows follow the spec.

Audit logging

Every tool call and every resource read is logged with user ID, scope, timestamp, parameters (redacted where necessary) and outcome. Logs stream to your SIEM. Who did what and when can be reconstructed forensically.

Human-in-the-loop for write tools

Write actions with irreversible consequences get a confirmation step in the host by default. The LLM can make proposals, and the user confirms. For some flows we also provide async approval via a second channel.

Data residency and GDPR

MCP servers run in EU regions by default, or on your own infrastructure. Where possible, PII fields are only decrypted at the point of use. We include data processing agreements and DPIA input as standard at delivery.

Frequently asked questions about MCP servers

What exactly is the Model Context Protocol (MCP)?
MCP is an open protocol that Anthropic published in November 2024. It standardises how LLM applications (known as MCP hosts) connect in a structured way to external tools, data and knowledge sources via MCP servers. Communication runs over JSON-RPC 2.0, via stdio or Server-Sent Events. Think of it as a USB-C standard for AI tooling: one protocol, many clients.
Why build an MCP server instead of direct API integrations per AI agent?
With an MCP server, you build one integration that works for every MCP-compatible host. Claude Desktop, Cursor, Cline, Continue.dev and custom agents all get access to the same tools, resources and prompts without you having to integrate again for each client. This avoids vendor lock-in and fragmented authentication.
Which programming language does Appfront use for MCP servers?
We mainly work with the official Python SDK (mcp and FastMCP) and the TypeScript SDK. Which one fits best depends on your existing stack: a data warehouse MCP often runs better in Python with pydantic typing, while an integration with a Node microservice fits more naturally in TypeScript.
How is an MCP server secured?
An MCP server should never give unauthenticated access to company data. We implement OAuth 2.1 or API key flows, scope-based permissions per tool, audit logging of all calls, and rate limiting. For remote MCP servers we use TLS and, optionally, mutual TLS. Tool permissions are separate from resource permissions, so you can protect read-only and write actions independently.
Can an MCP server both read and write in our systems?
Yes. MCP distinguishes three primitives: tools (performing actions, including writing), resources (reading data, comparable to a REST GET) and prompts (reusable instruction templates). You decide which authorisation applies to each primitive. A common pattern: broad read access on resources and tightly scoped write tools behind explicit user confirmation.
Does an MCP server only work with Claude, or with other LLMs too?
The Model Context Protocol is open and LLM-agnostic. Besides Anthropic's Claude (Desktop and the API with the Agent SDK), MCP clients are supported by Cursor, Cline, Continue.dev, Zed and a growing number of open-source agent frameworks, among others. You build one server and connect multiple LLM front ends to it.
How does MCP compare to OpenAI function calling or LangChain tools?
Function calling and LangChain tools are vendor- or framework-specific. MCP is a transport and discovery protocol that is independent of any specific LLM provider. An MCP server can call function-calling handlers internally, but it exposes them in a standardised way so they show up in any MCP host.
How long does an MCP server implementation take?
A proof of concept with a few tools and a read resource is typically ready within one to two weeks. A production-grade MCP server with OAuth, audit logging, monitoring and integrations with multiple systems typically takes six to twelve weeks, depending on the number of tools and the complexity of the underlying systems.

Ready to build an MCP server for your stack?

Discuss your use case with our AI engineers. Together we'll outline which tools, resources and prompts your agents need, and which architecture and security baseline fit. No obligation.

Schedule an MCP architecture session

Edit content