MCP in 30 Minutes: Give Claude Real Tools
Learn how to build your first MCP server with fastMCP and connect it to Claude in under 30 minutes, giving your AI agent access to real external services, knowledge bases, and tools.
Key Takeaways
- Comprehensive strategies proven to work at top companies
- Actionable tips you can implement immediately
- Expert insights from industry professionals
What is MCP?
Model Context Protocol (MCP) is a standard protocol for connecting external services to AI applications. Think of it as USB-C for AI: one universal connector that lets any AI agent plug into any external tool or data source without custom wiring every time.
Before MCP, connecting Claude to an external service meant writing bespoke API integration code for every tool, managing separate authentication flows, and rebuilding the same plumbing every time you added something new. MCP standardises all of that into a single, reusable pattern.
An MCP server exposes a set of tools. Claude connects to the server and can call those tools as part of a conversation or an agentic workflow, accessing live data and performing real actions, not just generating text about them.
MCP vs direct API integrations
Direct API integrations work, but they create friction at every seam. MCP removes that friction in three concrete ways:
- Simplified authentication: Authentication is handled at the MCP server layer once. Claude doesn't need to manage credentials for every service it connects to.
- Easier configuration management: Add a new tool by registering it on the MCP server. Claude picks it up automatically without any changes to the agent code.
- Scales across agents: One MCP server can serve multiple AI agents simultaneously. Build the integration once, use it everywhere.
When MCP is most valuable: The more services you need to connect to your AI agents, the more MCP pays off. If you're connecting to one service, a direct integration is fine. If you're connecting to five or more, MCP is the right architecture.
Build your first MCP server in 30 minutes
Step 1: Install fastMCP
fastMCP is a Python library that makes building MCP servers fast and straightforward. Install it with pip:
pip install fastmcp
Step 2: Create your MCP server file
Create a new Python file for your server. The example Aki built in the session is a knowledge base that stores and retrieves information in memory:
from fastmcp import FastMCP
mcp = FastMCP("Knowledge Base")
knowledge_store = {}
@mcp.tool()
def store(key: str, value: str) -> str:
knowledge_store[key] = value
return f"Stored: {key}"
@mcp.tool()
def retrieve(key: str) -> str:
return knowledge_store.get(key, "Not found")
if __name__ == "__main__":
mcp.run()
Each function decorated with @mcp.tool() becomes a tool that Claude can call. The name, parameters, and return value are automatically exposed to the AI.
Step 3: Run the MCP server
Start the server in your terminal. It will listen for connections from Claude or any MCP-compatible client:
python knowledge_base.py
Step 4: Connect Claude to your MCP server
In Claude Desktop, open Settings and add your MCP server under the MCP section. Paste in the server path and Claude will detect the available tools automatically:
{
"mcpServers": {
"knowledge-base": {
"command": "python",
"args": ["/path/to/knowledge_base.py"]
}
}
}
Step 5: Test it in Claude
Start a conversation with Claude and ask it to use your tools. It will call them automatically based on context:
Example prompt
"Store the following as 'project-brief': We are building a customer feedback tool that clusters themes using Claude. Retrieve it when I ask about the project."
3 MCP servers you can build today
1. In-memory knowledge base
The exact server Aki built in the session. Store key-value pairs during a conversation and retrieve them later. Useful for giving Claude persistent context within a session without a database.
What it enables
"Remember that our launch date is July 15. Remind me of it when I ask about the project timeline."
2. Trello or Linear task manager
Expose your project board as an MCP server. Claude can read tasks, update statuses, and create new cards based on natural language instructions, without you opening the app.
What it enables
"What tasks are assigned to me this week? Mark the design review card as done and create a follow-up for the next sprint."
3. Internal documentation search
Point an MCP server at your Notion workspace, Confluence, or a folder of markdown files. Claude can search, summarise, and cross-reference your docs during any conversation.
What it enables
"Search our internal docs for the onboarding checklist and summarise the steps for a new engineer starting Monday."
4 things that make MCP servers work well
- Name your tools clearly. Claude reads the function name and docstring to decide when to call a tool. A function named
get_taskswith a clear description will be used correctly. A vague name likefetch_datawill confuse the model. - Keep tools focused. One tool, one job. Avoid multi-purpose functions that do different things depending on a parameter. Separate tools are easier for Claude to reason about and pick correctly.
- Return structured output. Return strings or simple JSON from your tool functions. Claude parses the return value and uses it in its next reasoning step, so clean output matters.
- Start with one server, one tool. Get a single tool working end-to-end before adding more. The connection, authentication, and tool-calling pattern will be the same for every tool you add after that.
Want to build this live with Aki?
Join a Lightning Lesson and build your own MCP server alongside Aki, with live Q&A and setup support for your specific use case. Browse upcoming sessions →
Aki Wijesundara
Expert team of AI professionals and career advisors with experience at top tech companies. We've helped 500+ students land internships at Google, Meta, OpenAI, and other leading AI companies.
Ready to Launch Your AI Career?
Join our comprehensive program and get personalized guidance from industry experts who've been where you want to go.
Table of Contents
Share Article
Get Weekly AI Career Tips
Join 5,000+ professionals getting actionable career advice in their inbox.
No spam. Unsubscribe anytime.