Bible Network Crypto DeFi Onchain RWA AI Agent Stablecoin Chain SAFU CryptoTax DeFAI AGI Claude Me Claude Skill Claude Design Claude Cowork
Independent Media
Not affiliated with any project
Exploring the Frontier of AI Intelligence
claude-me.com
LATEST
What Are MCP Connectors: A Common Language That Lets Claude Talk to External Services  ·  Claude's Computer Use Capability: What It Can Actually Do, and Where the Real Limits Are  ·  When to Use Artifacts, and When Staying in the Chat Is Enough  ·  Cutting API Costs With Prompt Caching: An Overlooked Setting That Actually Saves Money  ·  Your First Claude Code Project: A Complete Walkthrough From Zero  ·  Anthropic's Responsible Scaling Policy: A Safety Framework That Tightens Automatically as Model Capability Grows
mcp

Build Your Own MCP Server: Safely Connect Claude to Your Internal Tools (With Permissions and Debugging)

30-Second Version · For the impatient
The one rule for building an MCP server: design it as a gatekeeper that distrusts external requests. Permissions go in server code, not in "telling Claude please don't delete data" - that's a request, not a restriction.

Full Explanation +
01 · Why did this happen?

Must I write the server myself, or are there ready-made ones?

Many common services (cloud drives, project management, messaging) already have official or community MCP servers you can connect directly without writing your own. You should write your own when connecting to a system that's internal to your company with no off-the-shelf option - your own database, internal API, private tools.

The principle: for standardized external services, prefer ready-made ones - faster and battle-tested; only when your need is specific enough that nothing existing fits is it worth building your own. Don't reinvent the wheel for a problem a ready-made option already solves.

02 · What is the mechanism?

Between stdio and SSE/HTTP transports, which should I pick?

Simple split: if the server runs on the same machine as Claude (e.g. your local desktop app), use stdio; if the server is elsewhere and connects over the network (e.g. deployed in the cloud for team use), use SSE/HTTP.

The deciding factor is "who uses it and from where." For solo local dev and testing, stdio is simplest - no networking or auth to handle. To serve a whole team or let a remote Claude reach it, you need HTTP, and then don't forget authentication, because once it's online anyone who can reach it could call your server, making permissions and identity verification even more important.

03 · How does it affect me?

Beyond making tools read-only, what else matters for permissions?

Read-only is the first layer but not enough. A few more to consider: one, "data scope" - even read-only, limit what's queryable, e.g. only one department's data, not the whole database wide open. Two, "input validation" - don't assume the parameters Claude brings are clean; check and filter them like any external input.

Three, "audit logging" - record who called which tool when and what they queried, so you can investigate if something goes wrong. Stack these layers and the core idea is the same: your server should assume requests may be wrong or malicious rather than defaulting to trusting them.

04 · What should I do?

Advanced: how should I write tool descriptions so Claude calls them correctly?

This is the invisible key to whether your server is usable, and it's often underrated. Claude relies on your tool descriptions to judge "when to use it and what parameters to pass." Write them vaguely and it guesses; guess wrong and you get those "called with odd parameters" problems.

Three keys to good tool descriptions: one, state the tool's purpose and fitting situations clearly so Claude knows when to choose it; two, annotate each parameter - what it is, what format, required or optional - so it doesn't fill blindly; three, if a parameter has constraints (date format, value range), write them right in the description.

A practical principle: treat the tool description as API documentation written for someone who can't see your internal system. They can only understand the tool through your words - the clearer you write, the more accurately Claude uses it.

Full Content +

When you want Claude to do more than chat - to actually look up data inside your company, like a customer database, an internal API, or private documents - what you need is an MCP Server. It's the translator and gatekeeper between Claude and your internal tools: Claude says, in a standard way, "I want to use a tool," and your server checks permissions, actually queries, and hands the result back.

This is for people who already code. The goal is to make clear the skeleton of a custom MCP server, where permissions belong, and how to debug when things break. It won't pin to line-by-line code in one language; it explains what each piece is responsible for.

Where the MCP server sits in the chain

The chain is: Claude to your MCP server to your internal system, then back the same way. Claude never touches your database directly; it only tells your server "please use the query_customer tool with these parameters." Your server, on receiving that, first validates whether the request should be allowed, queries the internal system only if it passes, then formats the data into something Claude can read and returns it.

The benefit of this design: your sensitive credentials (database passwords, API keys) live only in your server and are never handed to Claude. Claude always accesses through the tools you define and can't reach the underlying layer.

A server's three basic parts

First, tool definitions: you tell Claude which tools exist, what parameters each takes, and what they return. This is the "menu" you open to Claude - it can't order anything not on it. Second, the execution logic: the code that actually queries the database or calls the API when Claude picks a tool. Third, the transport: stdio for local, SSE/HTTP for remote, which determines how Claude talks to your server.

Where permissions belong: in the server, not the prompt

This is the easiest place to mess up. Never control permissions by "telling Claude please don't delete data" - that's a request, not a restriction. The real permission check must live in your server code: before executing any action, your code decides whether the operation is allowed. Make tools read-only, limit the data range queryable, reject dangerous operations outright. Put the gatekeeper in the server rather than hoping the model behaves.

How to debug when things break

Three common MCP debugging issues: one, "Claude can't see the tool," usually a tool definition not registered correctly or the transport not connecting; two, "the tool is called but with odd parameters," usually because your tool description wasn't clear enough and Claude guessed wrong; three, "Claude misreads what comes back," usually a messy return format. In practice, log every request and response on your server side first - nine out of ten problems are located just by reading the log.

What this means for you

If your team has piles of internal data scattered across systems and you want it queryable in natural language, a custom MCP server is the standard way to connect those tools to AI safely. The one guiding principle: design the server as a gatekeeper that distrusts external requests. Launch with read-only, low-risk tools first, confirm permissions and logging work, then gradually open more capability. Safety and control first, full features second - get the order wrong and the cost of an incident far exceeds the time you saved.

Diagram
How a custom MCP server bridges Claude and internal systemsAn architecture diagram showing Claude sending tool requests to a custom MCP server, which performs a permission check and queries an internal database or API, Your MCP server sits between Claude and your internal tools Claude asks to use a tool MCP Server (you build this) permission check here exposes tools + resources Internal tool DB / API / files request query data result Transport: stdio (local) or SSE/HTTP (remote). The server, not Claude, holds your credentials. Claude Me · claude-me.com
Feel free to share. Please credit the source.
Ask a Question
Please enter at least 10 characters
Related Articles
MCP vs Direct Claude API: What Is the Difference and When to Use Which
mcp · Jun 17
Notion MCP in Practice: Once Set Up, Claude Reads and Writes Your Notion — Manage Your Knowledge Base in Natural Language
mcp · Jun 29
What Is MCP? Connect Claude to Your Tools in One Afternoon
mcp · Jun 08
Claude Batch API in Practice: How to Cut Costs in Half on Bulk Tasks
tools · Jun 17
Related News
More Related Topics
Tool Use Mechanism Complete Breakdown: How AI Agents 'Act,' and Why This Design Determines Whether They Can Be Trusted
AI Agent Bible
An AI Agent's LLM doesn't actually execute any tool — it only outputs 'I want to do this' requests; your backend code does the real execution. This design is the foundation of all security: the execution layer is under your control, and security validation is added there. How well tools are designed determines whether an Agent can be trusted.
#automation#claude-code
How to Run Your First Crypto Agent: A Complete Beginner's Guide, and the Mistakes Most People Make
AI Agent Bible
The most common mistake running your first Crypto Agent isn't wrong code — it's giving the Agent too much authorization from the start. Real main wallet, no amount limits, skipping testnet: all three together is a recipe for regret. Read first, test next, real money last.
#automation#claude-code
What an Agent Task Really Costs: A Complete Cost Structure Breakdown, and Why Most People Underestimate It
AI Agent Bible
An auto-rebalancing DeFi Agent can cost $50–300 per month — but most people only count LLM API fees, forgetting tool call costs, Gas fees, and the fact that Gas can be 100x normal during network congestion. The Agent's gains must cover all three cost layers. Otherwise it's just a more expensive way to automate losses.
#automation#claude-code
What Is an On-Chain Agent? It Differs from Every AI Tool You've Used in One Key Way
AI Agent Bible
An on-chain Agent differs from every AI tool you've used in one thing: it can self-sign on-chain transactions and operate crypto protocols without your step-by-step confirmation. Your assets can be moved while you sleep — which is exactly why it's both powerful and dangerous.
#automation#claude-code