MCP Server Example
This server provides note management, basic arithmetic, and AI-driven content generation.
Tools:
add(a, b): Returns the sum of two numbers.multiply(a, b): Returns the product of two numbers.save_note(name, content): Saves a note with the given name and content.delete_note(name): Deletes a note by name.
Resources:
notes://list: Lists all saved notes.notes://{name}: Reads the content of a specific note.
Prompts:
summarize_notes: Summarizes all saved notes.brainstorm(topic): Brainstorms ideas on a specified topic.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server ExampleSave a note called 'ideas' with 'Build a custom MCP server'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server Example
A simple MCP (Model Context Protocol) server for learning the core primitives: Tools, Resources, and Prompts.
Setup
Prerequisites
Python 3.10+
Install
uv syncRelated MCP server: MCP AI Chat LangChain
Test
Option 1 — MCP Inspector (recommended)
uv run mcp dev server.pyOpens a browser UI at http://localhost:6274. From there you can:
Tools tab: call
save_note,delete_notewith custom inputsResources tab: read
notes://listornotes://{name}Prompts tab: run
summarize_notesorbrainstormwith arguments
Option 2 — CLI with mcp client
List all available tools:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | uv run python server.pyConnect to Claude Code (CLI)
Add the server to your Claude Code session:
claude mcp add learning-mcp -- uv run --directory /Users/binod/projects/mcp-example python server.pyVerify it's connected:
claude mcp listOnce added, Claude Code can call your tools directly in the chat — just ask it to, e.g. "save a note called 'ideas'".
Connect to Claude Desktop
Add this to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"learning-mcp": {
"command": "uv",
"args": [
"run",
"--directory", "/Users/binod/projects/mcp-example",
"python", "server.py"
]
}
}
}Then restart Claude Desktop.
Use programmatically (Python)
Use the mcp library to call tools, read resources, and fetch prompts from your own code:
from mcp import ClientSession
from mcp.client.stdio import stdio_client, StdioServerParameters
import asyncio
async def main():
server = StdioServerParameters(
command="uv", args=["run", "python", "server.py"]
)
async with stdio_client(server) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# Read a resource
notes = await session.read_resource("notes://list")
print(notes)
# Get a prompt
prompt = await session.get_prompt("brainstorm", {"topic": "side projects"})
print(prompt)
asyncio.run(main())To let Claude (via Anthropic API) call your tools, add anthropic[mcp] to your dependencies and convert the tools:
from anthropic.lib.tools.mcp import async_mcp_tool
import anthropic
client = anthropic.AsyncAnthropic()
tools = [async_mcp_tool(t, session) for t in (await session.list_tools()).tools]
runner = client.beta.messages.tool_runner(
model="claude-opus-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Save a note called ideas"}],
tools=tools,
)
async for message in runner:
for block in message.content:
if hasattr(block, "text"):
print(block.text)What's inside
File | Description |
| MCP server with tools, resources, and prompts |
| Project dependencies |
Tools (Claude can call these)
Tool | Description |
| Save a note |
| Delete a note |
Resources (Claude can read these)
URI | Description |
| List all saved notes |
| Read a specific note |
Prompts (reusable templates)
Prompt | Description |
| Summarize all saved notes |
| Brainstorm ideas on a topic |
Available Tools
4 toolsaddA
Add two numbers.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. 'Add two numbers' fully describes the behavior for a pure arithmetic operation with no side effects, hidden state, or special requirements. The simplicity of the operation makes this sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, ultra-concise sentence with no wasted words. It is perfectly front-loaded and every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a trivial two-number addition with an output schema and no nested objects, the description is complete. The simplicity of the tool means no further context is required.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It mentions 'two numbers' which maps to parameters a and b, but does not provide individual parameter detail. Since addition is commutative, order is irrelevant, and the description is minimally adequate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Add two numbers' clearly states the specific verb 'Add' and the resource 'two numbers', which unambiguously distinguishes this from sibling tools like subtract, multiply, and divide.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives, but the purpose itself implies usage: use when you need to add two numbers. No exclusions or alternative recommendations are provided, so it relies on the obviousness of the operation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_noteC
Delete a note by name.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool deletes a note, implying a destructive mutation, but doesn't cover critical aspects like permissions needed, whether deletion is reversible, error handling, or confirmation requirements. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly, which is ideal for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive tool with no annotations, 0% schema coverage, and an output schema (which helps but isn't described), the description is incomplete. It lacks details on behavior, parameters, and usage context, making it inadequate for safe and effective tool invocation by an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description only mentions 'by name' without explaining what 'name' refers to (e.g., note title, ID, filename), its format, or constraints. With one undocumented parameter, the description fails to compensate for the lack of schema details, providing minimal semantic value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Delete') and resource ('a note'), making the purpose unambiguous. It doesn't distinguish from siblings like 'save_note', but it's specific enough to understand the basic function without being tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'save_note' or other sibling tools. The description only states what it does, not when it should be selected, leaving the agent without context for decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
multiplyA
Multiply two numbers.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description carries the full burden for behavioral disclosure. 'Multiply two numbers' accurately describes the core operation, but does not disclose edge cases, error handling, or return behavior. However, for a trivial arithmetic operation, this minimal description is acceptable and not misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, 'Multiply two numbers,' with no filler words or redundant information. It is effectively front-loaded and maximally concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-number multiply tool with an existing output schema, the description covers the essential purpose. It lacks details on return values or edge cases, but these are not critical given the tool's triviality and the presence of an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the lack of parameter details. It confirms that both parameters are numbers and are to be multiplied, but does not explain individual roles. Since multiplication is commutative, the symmetry reduces the need for further clarification.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the specific verb 'Multiply' and the resource 'two numbers', which clearly distinguishes it from sibling tools like add, subtract, divide, power, square_root, and percentage. There is no ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus the sibling arithmetic operations. The description does not mention any alternatives, exclusions, or context for when multiplication is preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save_noteC
Save a note with a given name.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| content | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a write operation ('save') but doesn't specify permissions, whether it overwrites existing notes, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It's appropriately sized for a simple tool, though it could be more informative without sacrificing brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 2-parameter mutation tool with no annotations and 0% schema coverage, the description is incomplete. It lacks details on behavior, parameters, and usage context. While an output schema exists, the description doesn't address key aspects like what 'save' entails or how it differs from siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the schema provides no parameter details. The description mentions 'name' but doesn't explain its role or format, and omits 'content' entirely. It adds minimal value beyond the schema, failing to compensate for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Save a note with a given name' clearly states the action (save) and resource (note), but it's vague about scope and doesn't distinguish from siblings like 'add' or 'delete_note'. It doesn't specify whether this creates new notes or updates existing ones, which limits clarity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'add' or 'delete_note'. The description lacks context about prerequisites, such as whether a note must exist or if this creates new notes, leaving usage unclear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
add - First observed
delete_note - First observed
multiply - First observed
save_note
TDQS
Scored across 4 tools
The tools fall into two unrelated domains (arithmetic and note management) with no overlap within each domain, but the set as a whole is confusing because add/multiply and delete_note/save_note serve completely different purposes. An agent might struggle to understand why these tools are grouped together, though individual tools are distinct.
Naming is inconsistent across the set: add and multiply use simple verbs without objects, while delete_note and save_note follow a verb_noun pattern. This mixed convention lacks a predictable pattern, making the tool set harder to navigate.
With 4 tools, the count is reasonable for a small server, but it feels thin and poorly scoped because it covers two unrelated domains. For either arithmetic or note management alone, 4 tools would be appropriate, but combined, it suggests an incomplete or mismatched purpose.
For arithmetic, basic operations like subtraction and division are missing, leaving gaps. For note management, there's no way to list or retrieve notes, creating dead ends. The server lacks a clear domain, making completeness hard to assess, but obvious gaps exist in both inferred areas.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA sample implementation of Model Context Protocol server demonstrating core functionality with simple arithmetic tools and greeting resources.-
- FlicenseNot gradedqualityDmaintenanceA basic Model Context Protocol server implementation that demonstrates core functionality including tools and resources for AI chat applications.-
- FlicenseNot gradedqualityDmaintenanceA demonstration implementation of a Model Context Protocol server that provides simple mathematical tools (add, subtract) and personalized greeting resources.-
- AlicenseNot gradedqualityNot gradedmaintenanceA demonstration MCP server that provides calculator tools for arithmetic operations, personalized greeting resources, and code review prompt templates. Enables users to perform basic math calculations, generate dynamic greetings, and access reusable code review templates through the Model Context Protocol.MIT