Skip to main content
Glama

MCP Server

An SDK-first MCP (Model Context Protocol) learning and production-readiness project built in Python with the official MCP SDK.

The goal is to understand MCP deeply while building a practical MCP server that can serve as a real integration-testing target for other AI/agent codebases.

Status

  • Phase 4 — Prompts (current): reusable prompt templates (profile_review, analyze_profiles, server_overview).

  • Phase 3 — Resources: resources exposed by URI — application metadata (mcp://server/info), static config (mcp://server/config), and profile data (data://profiles, data://profile/{user_id}).

  • Phase 2 — Tools: deterministic MCP tools (add, multiply, echo, get_user_profile, fail) alongside the Phase 1 health tool.

  • Phase 1 — Minimal MCP Server: a small, runnable server using the MCPServer abstraction over stdio, with a minimal health capability.

See docs/roadmap.md for the full plan, docs/mcp-basics.md for MCP concepts, docs/tools.md for tools, docs/resources.md for resources, and docs/prompts.md for prompts.

Related MCP server: hello-mcp

Requirements

  • Python 3.11+

  • uv

Setup

uv sync

This creates a virtual environment and installs the MCP SDK and dev tools (including pytest).

Running the server

uv run mcp-server

The server starts over stdio — the appropriate transport for local development. It stays alive until the connecting client closes the stream. To interact with it you need an MCP client (see the MCP basics doc).

Running the tests

uv run pytest

Project layout

src/mcp_server/       # MCP server implementation
  server.py           # server construction, health tool, stdio entry point
  tools.py            # deterministic tools (business logic + registration)
  resources.py        # resources exposed by URI (data + registration)
  prompts.py          # reusable prompt templates (messages + registration)
tests/
  unit/               # business-logic unit tests
  integration/        # end-to-end tests (real MCP client over stdio)
docs/                 # roadmap and concept documentation
examples/             # example clients (later phases)

How a client talks to this server

Application / Host
        ↓
MCP Client
        ↓
MCP Protocol
        ↓
MCP Server
        ↓
Application logic

See docs/mcp-basics.md for a deeper explanation.

Available Tools

6 tools
addA

Add two integers.

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden of behavioral disclosure. It states the operation but does not explicitly mention side effects, return behavior, or purity. For a simple integer addition, the operation itself implies a deterministic calculation, and the output schema covers the return shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three words long and completely front-loaded. Every word is meaningful and there is no filler. For a tool this simple, this is an appropriately efficient size.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The input schema fully defines the two required integer parameters, the description defines the operation, and an output schema exists. An agent has all the information needed to select and invoke the tool correctly. Nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not name 'a' or 'b' individually. However, 'two integers' clarifies that both parameters are operands of the addition, which is sufficient for a commutative two-parameter operation. No further parameter-specific detail is necessary here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Add two integers.' This clearly states the operation and distinguishes it from siblings like multiply, echo, and get_user_profile. 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.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context: use this tool when two integers need to be summed. It does not explicitly name alternatives or exclusions, but the operation is self-evident and distinct from the sibling tools. No prerequisites or special conditions are needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

echoA

Echo the input text back unchanged.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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 'back unchanged,' which communicates that there are no transformations, but it does not mention side effects, exactness guarantees (e.g., whitespace preservation), or any potential limitations. The phrase is minimally transparent but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: 'Echo the input text back unchanged.' One short sentence fully captures the tool's behavior with no filler or redundancy. It is front-loaded and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple: one string parameter, one obvious return value, and an output schema already provided. The description covers the essential behavior, and the schema handles the input structure. It does not need lengthy context because the operation is trivial and has no complex side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must compensate for the 'text' parameter. The description references 'input text,' which loosely indicates that the 'text' property is the string to echo, but it does not add syntax, formatting, or example-based meaning beyond the schema's basic type definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action and resource: 'Echo the input text back unchanged.' It clearly conveys that the tool returns the provided text without modification, and the first sentence differentiates it from sibling tools like health, add, multiply, get_user_profile, and fail, none of which involve echoing input.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies that this tool should be used when the caller wants a direct, unmodified copy of the input text. However, it does not explicitly state when to use this tool versus the sibling tools, nor does it mention any exclusions or alternative tools. For a trivial utility this is acceptable, but explicit guidance is missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

failA

Intentionally fail to demonstrate how tool errors reach the client.

Raises a ToolError so the client receives a clean is_error result carrying this message, instead of an unexpected server crash.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite having no annotations, the description fully discloses the behavioral profile: it raises a ToolError, produces a clean is_error result, carries a message, and avoids an unexpected server crash. This gives the agent accurate expectations without needing annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded: the first sentence states the core action and purpose, and the second adds necessary technical behavior. Every sentence earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter demonstration tool, the description is complete. It explains why the tool exists, what behavior to expect, and how errors will appear. The output schema supplies return-value details, so nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so per the rubric the baseline is 4. The description mentions that the error carries a message, but since the schema defines no parameters, there is nothing further to document.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's specific purpose: 'Intentionally fail to demonstrate how tool errors reach the client.' It uses a specific verb ('fail') and immediately explains the intended use, distinguishing it from the functional sibling tools like add, multiply, and echo.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear context for use: to demonstrate how tool errors reach the client. While it does not explicitly name alternatives or when-not-to-use scenarios, the sibling tools are clearly functional operations, and this tool's demonstration purpose is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_user_profileA

Return a structured user profile by id.

Raises a ToolError for an unknown id — an anticipated failure the client can read, rather than a crash.

ParametersJSON Schema
NameRequiredDescriptionDefault
user_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden. It adds valuable context by explaining that an unknown ID raises a catchable ToolError rather than crashing. This goes beyond the schema and helps the agent anticipate failure handling, though it does not elaborate on other behavioral aspects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two tight sentences with no filler. The primary purpose is front-loaded, and the error-handling detail earns its place as important behavioral context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter read tool with an output schema, the description is complete. It states the operation, the required input, and the anticipated failure mode. Nothing essential is missing for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description should compensate. It references the parameter by saying 'by id' and indirectly adds meaning via the error behavior for unknown IDs. However, it does not explicitly describe what user_id represents beyond the schema's property name and type.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Return'), a clear resource ('user profile'), and the lookup method ('by id'). This unambiguously identifies what the tool does and distinguishes it from the unrelated sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is implied: call this when you need a user profile for a given ID. However, there is no explicit when-to-use or when-not-to-use guidance, and no mention of alternatives. The sibling tools are unrelated, so the lack of exclusions is not critical, but the guidance is still only implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

healthA

Return basic server health and metadata.

A minimal, deterministic capability used to verify that a client can connect, initialize, and invoke the server successfully.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool is 'minimal' and 'deterministic,' implying a safe, side-effect-free read operation. It could add more about output shape, but the existence of an output schema reduces that burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no waste. The primary action ('Return basic server health and metadata') is front-loaded, and the secondary sentence adds useful context without repeating the tool name or schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, parameterless health-check tool with an output schema, the description gives an agent everything needed to select and invoke it correctly. It clearly defines the tool's role and expected behavioral characteristics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and schema coverage is effectively complete, so there is nothing for the description to explain. The baseline for a zero-parameter tool is 4, and the description is appropriately silent on parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Return') and names the resource ('basic server health and metadata'), immediately distinguishing it from computation, user-profile, and failure-testing siblings. It leaves 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.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states its intended context: verifying that a client can connect, initialize, and invoke the server successfully. It does not explicitly name alternatives or exclusions, but the purpose is clear enough that an agent would not confuse it with other tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

multiplyA

Multiply two integers.

ParametersJSON Schema
NameRequiredDescriptionDefault
aYes
bYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

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 disclosing behavior. 'Multiply two integers' accurately conveys a pure arithmetic operation with no apparent side effects. It doesn't mention edge cases, but the operation is trivial and well-defined.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It is as concise as possible while still being complete.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a trivial arithmetic tool, the description plus the input schema is nearly sufficient. The only minor gap is the lack of explicit guidance on when to prefer this tool over siblings, but the operation is self-evident.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% parameter description coverage, but the description clarifies that both a and b are integer operands to be multiplied. This adds meaning beyond the bare type declarations, though it does not individually annotate each parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Multiply') and a clear resource ('two integers'), making the operation unambiguous. It naturally distinguishes itself from sibling tools like add and echo.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool: whenever two integers need to be multiplied. However, it provides no explicit guidance about alternatives, prerequisites, or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.9/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: health checks connectivity, add and multiply perform arithmetic, echo returns text, get_user_profile fetches a profile, and fail deliberately raises an error. There is no meaningful overlap between any pair of tools.

Naming Consistency3/5

Most tools use short, lowercase names like add, multiply, echo, and fail, but health is a noun rather than an action and get_user_profile uses a verb_noun pattern. The naming is readable overall but mixes conventions.

Tool Count4/5

Six tools is a reasonable size for a small server, and each tool contributes something distinct. However, the set feels like a grab bag of unrelated utilities rather than a tightly scoped collection.

Completeness2/5

There is no coherent domain that the tool set fully covers: the math tools only support add and multiply, and the user profile surface has only a single get operation with no list, create, update, or delete. This makes the overall surface feel incomplete and ad hoc.

Maintenance

ActivityMaintained
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A minimal demonstration server showcasing MCP protocol capabilities including tools, resources, and prompts with basic examples like hello world functionality.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A minimal learning-focused MCP server that demonstrates core primitives like tools and resources through simple greeting functions. It provides a foundational example for connecting AI models to external data using both Streamable HTTP and stdio transports.
    17
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    A minimal MCP server that provides health/status checks and multilingual greetings via the server_info and greet tools.
    2
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    A demo MCP server that connects an AI to external systems by exposing Python functions as tools and data as resources, using the stdio transport.

Latest Blog Posts

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/abhisheksonsale/mcp-sdk-implementation'

If you have feedback or need assistance with the MCP directory API, please join our Discord server