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 "Install 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 toolsaddB
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?
No annotations are provided, so the description carries full burden. It states the action ('Add') but gives no behavioral details such as error handling, computational limits, or output format. The description is minimal and lacks transparency about how the tool behaves beyond the basic operation.
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 extremely concise with a single sentence ('Add two numbers.') that directly states the purpose without any wasted words. It is front-loaded and efficiently communicates the core function, earning full marks for brevity and clarity.
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?
Given the tool's low complexity (simple arithmetic), two parameters, and the presence of an output schema (which likely defines the result), the description is minimally adequate. However, with no annotations and 0% schema coverage, it lacks details on error cases or behavioral traits, making it incomplete for robust agent use.
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 descriptions. The description 'Add two numbers' implies parameters 'a' and 'b' are numbers to be added, adding basic semantics beyond the schema's type definitions. However, it doesn't specify constraints like integer vs. float or handling of large numbers, leaving gaps.
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 tool's function with a specific verb ('Add') and resource ('two numbers'). It distinguishes from siblings like 'multiply' by specifying addition, though it doesn't explicitly contrast with other mathematical operations beyond the name.
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 provides no guidance on when to use this tool versus alternatives like 'multiply' or non-mathematical siblings. It lacks context about use cases, prerequisites, or comparisons, leaving the agent to infer usage from the tool name alone.
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?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Multiply two numbers' implies a mathematical operation but does not disclose traits like error handling (e.g., for non-numeric inputs), performance, or side effects. It adds minimal context beyond the basic action.
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 zero waste. It is appropriately sized and front-loaded, directly stating the tool's function without unnecessary elaboration.
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?
Given the tool's low complexity (simple multiplication), two parameters with no schema descriptions, and the presence of an output schema (which handles return values), the description is mostly complete. However, it lacks usage guidelines and behavioral details, which are minor gaps for this straightforward tool.
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?
The description adds meaning beyond the input schema by specifying that the parameters are 'two numbers,' clarifying their purpose. With schema description coverage at 0% (parameters 'a' and 'b' have no descriptions in the schema), this compensates well, though it does not detail constraints like integer vs. decimal.
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 'Multiply two numbers' clearly states the specific verb ('multiply') and resource ('two numbers'), distinguishing it from sibling tools like 'add' (addition), 'delete_note' (deletion), and 'save_note' (saving). It is precise and unambiguous.
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 provides no guidance on when to use this tool versus alternatives. It does not mention use cases, prerequisites, or comparisons to sibling tools like 'add' for addition, leaving the agent to infer usage based on the tool name alone.
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. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
add - First observed
delete_note - First observed
multiply - First observed
save_note
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.-
- FlicenseNot 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.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/binodrajpandey/mcp-example'
If you have feedback or need assistance with the MCP directory API, please join our Discord server