Skip to main content
Glama
ProfessorFess

AIE8-MCP-Server

AI Makerspace: MCP Session Repo for Session 13

This project is a demonstration of the MCP (Model Context Protocol) server, which utilizes the Tavily API for web search capabilities. The server is designed to run in a standard input/output (stdio) transport mode.

Related MCP server: Tavily Web Search MCP Server

Project Overview

The MCP server is set up to handle web search queries using the Tavily API. It is built with the following key components:

  • TavilyClient: A client for interacting with the Tavily API to perform web searches.

Prerequisites

  • Python 3.13 or higher

  • A valid Tavily API key

⚠️NOTE FOR WINDOWS:⚠️

You'll need to install this on the Windows side of your OS.

This will require getting two CLI tool for Powershell, which you can do as follows:

  • winget install astral-sh.uv

  • winget install --id Git.Git -e --source winget

After you have those CLI tools, please open Cursor into Windows.

Then, you can clone the repository using the following command in your Cursor terminal:

git clone https://AI-Maker-Space/AIE8-MCP-Session.git

After that, you can follow from Step 2. below!

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Configure environment variables: Copy the .env.sample to .env and add your Tavily API key:

    TAVILY_API_KEY=your_api_key_here
  3. 🏗️ Add a new tool to your MCP Server 🏗️

Create a new tool in the server.py file, that's it!

Running the MCP Server

To start the MCP server, you will need to add the following to your MCP Profile in Cursor:

NOTE: To get to your MCP config. you can use the Command Pallete (CMD/CTRL+SHIFT+P) and select "View: Open MCP Settings" and replace the contents with the JSON blob below.

{
    "mcpServers":  {
        "mcp-server": {
            "command" : "uv",
            "args" : ["--directory", "/PATH/TO/REPOSITORY", "run", "server.py"]
        }
    }
}

The server will start and listen for commands via standard input/output.

Usage

The server provides a web_search tool that can be used to search the web for information about a given query. This is achieved by calling the web_search function with the desired query string.

Activities:

There are a few activities for this assignment!

🏗️ Activity #1:

Choose an API that you enjoy using - and build an MCP server for it!

🏗️ Activity #2:

Build a simple LangGraph application that interacts with your MCP Server.

You can find details here!

Available Tools

8 tools
generate_passwordC

Generate a random password with specified length and character options

ParametersJSON Schema
NameRequiredDescriptionDefault
lengthNo
include_symbolsNo

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It says nothing about the character set actually used, whether the generator is cryptographically secure, whether results are reproducible/logged, or how the password is returned – all things an agent should know before generating a credential.

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

Conciseness4/5

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

A single front-loaded sentence with no filler; the key information (random password, length, character options) comes first. It is appropriately sized, though it could have added one useful clause about defaults without bloat.

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

Completeness3/5

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

The tool is simple (2 optional params, no output schema, no nesting), so little explanation is strictly required. Still, an agent cannot tell from the definition what alphabet is used or whether the default length of 12 and symbol inclusion apply, leaving a modest gap for a credential-generating tool.

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% for two parameters, so the description must compensate. It gestures at 'specified length and character options', which maps loosely to length and include_symbols, but does not explain the defaults (12, symbols on by default) or which characters are included. Partial compensation justifies a 3.

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 gives a specific verb ('Generate') plus resource ('random password') and names the two controllable axes (length, character options). It does not need to distinguish itself from siblings, all of which are card/dice/search tools in an unrelated domain, so a 4 rather than a 5.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus alternatives, nor any prerequisites or constraints (e.g., whether the output is for security-sensitive use). Usage is only implied by the tool name.

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

get_card_by_idB

Get a specific Magic: The Gathering card by its Scryfall ID

ParametersJSON Schema
NameRequiredDescriptionDefault
card_idYes

TDQS

B3.3/5.0
Behavior2/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 behavioral disclosure. 'Get' weakly signals a read-only lookup, but the description says nothing about failure behavior for an unknown ID, the shape of the returned card, or any API constraints, which is a meaningful gap for a 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.

Conciseness5/5

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

A single sentence with zero filler, and the resource plus its identifying key are both front-loaded. Nothing needs to be trimmed or reordered.

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

Completeness3/5

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

For a one-parameter read tool with no output schema, the description is minimally adequate. It is missing sibling routing (search_card_by_name/search_cards vs. by-ID lookup) and any not-found behavior, which an agent would need to call it confidently.

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 coverage is 0% and the schema only calls the field 'Card Id', so the description does add real value by specifying it must be a Scryfall ID. However, it gives no format details (UUID vs. other form) or validation expectations, so compensation for the coverage gap is only partial.

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?

States a specific verb (Get) and resource (a specific Magic: The Gathering card) plus the lookup key (Scryfall ID). This is clearly distinguishable in spirit from the search siblings, but the description never names them, so it stops short of full sibling differentiation.

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 phrase 'by its Scryfall ID' implies the precondition for use (you must already have an ID), which hints at when this should be chosen over search_card_by_name or search_cards. However, no alternative is named and no explicit when-not guidance is given, leaving usage only implied.

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

get_random_cardB

Get a random Magic: The Gathering card from Scryfall

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden. 'Get a random card' implies a read-only operation, but nothing is disclosed about whether repeated calls can return duplicates, whether results are cached, or anything about usage constraints on Scryfall.

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

Conciseness4/5

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

A single short sentence with no waste; the essential information (random, Magic card, Scryfall) is front-loaded. Nothing padded, though also nothing more than the minimum.

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

Completeness3/5

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

For a zero-parameter tool this is nearly adequate, but with no output schema the description gives no hint about the shape of the returned card object or whether the result is fully hydrated. Minor but real gap.

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 takes zero parameters, so there is nothing for the description to clarify beyond what the schema provides. Baseline 4 applies for a parameterless tool.

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?

States a specific verb (get), resource (Magic: The Gathering card), and qualifier (random) plus the data source (Scryfall). The 'random' semantics inherently distinguish it from siblings like get_card_by_id and search_cards, though the description never names an alternative explicitly.

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

Usage Guidelines2/5

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

No guidance on when to use this versus search_cards or get_card_by_id, no mention of rate limits or how often it's appropriate to call. The agent must infer usage entirely from the name.

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

get_set_infoC

Get information about a Magic: The Gathering set by its code

ParametersJSON Schema
NameRequiredDescriptionDefault
set_codeYes

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It implies a read-only lookup via "Get," but says nothing about what data is returned, how invalid set codes are handled, or any rate limits.

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?

A single front-loaded sentence with no filler; the verb, resource, and lookup key all appear immediately.

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

Completeness3/5

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

For a simple one-parameter lookup with no output schema, the description is minimally adequate, but it omits what information a set returns and error behavior for unknown codes.

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

Parameters2/5

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

Schema description coverage is 0% for the single required set_code parameter. The phrase "by its code" loosely signals the parameter's role, but adds no format, casing, or validity detail beyond what the parameter name already conveys.

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?

States a specific verb and resource ("Get information about a Magic: The Gathering set") and scopes it with "by its code." This clearly differentiates it from card-oriented siblings like get_card_by_id and search_cards, though it never names an alternative explicitly.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus siblings such as search_cards or get_card_by_id, nor any stated prerequisites or exclusions. The usage is only implied by the verb and resource.

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

roll_diceC

Roll the dice with the given notation

ParametersJSON Schema
NameRequiredDescriptionDefault
notationYes
num_rollsNo

TDQS

C2.3/5.0
Behavior1/5

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

No annotations are present, so the description must disclose behavioral traits. It only says 'Roll the dice,' which is a direct restatement of the tool name and adds no depth about random generation, validation, error handling, or return format. This is effectively a tautology with no added transparency.

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

Conciseness3/5

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

The description is a single concise sentence with no waste, which is positive. However, it is under-specified: it front-loads little useful information and does not structure any context for the parameters. It cannot be considered 'appropriately sized' because it omits essential detail.

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

Completeness1/5

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

For a tool with two parameters, no output schema, and no annotations, the description is severely inadequate. It does not explain dice notation, the meaning of num_rolls, or any behaviors/limitations. Even the sibling context (web_search) offers no help in situating this tool, making the description insufficient for reliable tool invocation.

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

Parameters2/5

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. 'Given notation' loosely aligns with the 'notation' parameter but fails to define its format or semantics. The 'num_rolls' parameter is entirely absent from the description, leaving its purpose unexplained. Overall, minimal added meaning beyond the schema titles.

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 clear verb ('Roll') and resource ('dice'), indicating the tool's primary action. However, it does not specify what 'notation' means (e.g., standard dice notation like '2d6'), which leaves some ambiguity. It is distinct from the sibling web_search, but not explicitly differentiated.

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

Usage Guidelines2/5

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 vs alternatives. The sibling list includes web_search, but the description gives no context for when dice rolling is appropriate or any exclusions. Users are left to infer usage from the name alone.

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

search_card_by_nameC

Search for a Magic: The Gathering card by name using Scryfall API

ParametersJSON Schema
NameRequiredDescriptionDefault
fuzzyNo
card_nameYes

TDQS

C2.7/5.0
Behavior2/5

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

No annotations, so the description carries the full burden. It doesn't disclose the default fuzzy-matching behavior, what happens on no match, rate limits, or return format. Naming the API source is a small plus but behavioral disclosure is thin.

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

Conciseness4/5

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

A single efficient sentence with no filler, front-loaded with the verb. Appropriately sized for a simple tool.

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

Completeness2/5

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

For a lookup tool with no annotations, no output schema, and 0% parameter documentation, the description should explain fuzzy matching and result behavior. It leaves the fuzzy param and matching semantics entirely unexplained.

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

Parameters2/5

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

Schema coverage is 0% and the description says nothing about the two parameters. Critically, the fuzzy parameter defaults to true and its semantics (substring/approximate matching) are never explained anywhere.

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?

States a specific verb (Search) and resource (MTG card by name), and names the data source (Scryfall API). It is distinguishable from get_card_by_id (lookup by ID) and search_cards (likely broader query), though it doesn't explicitly contrast with the near-identical search_cards sibling.

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

Usage Guidelines2/5

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

No guidance on when to use this versus search_cards or get_card_by_id. Given the presence of a very similar sibling search_cards, the absence of routing guidance is a real gap.

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

search_cardsC

Search for Magic: The Gathering cards using Scryfall's search API

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
queryYes

TDQS

C2.7/5.0
Behavior2/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. It does not disclose rate limits, pagination behavior, result limits, or return format, and 'using Scryfall's search API' only hints that external syntax/constraints apply without saying what they are.

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

Conciseness4/5

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

A single front-loaded sentence with zero padding. It is efficient, though its brevity reflects under-specification rather than disciplined editing.

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

Completeness2/5

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

With no annotations, no output schema, and 0% parameter documentation, the description is too thin for a tool whose main difficulty is query syntax and pagination. An agent cannot invoke it confidently from this text alone.

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

Parameters2/5

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

Schema coverage is 0% for both parameters, so the description must compensate and does not. Scryfall's query language is the critical semantic here, and neither the description nor the schema explains syntax, operators, or what 'page' controls.

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?

States a specific verb and resource ('Search for Magic: The Gathering cards') and names the backing API (Scryfall). However, it does not differentiate from the sibling search_card_by_name, leaving the agent to guess which search tool to pick.

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

Usage Guidelines2/5

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

No when-to-use guidance, no exclusions, and no mention of the obvious alternative search_card_by_name or get_card_by_id. The agent gets no criteria for choosing among the several card-retrieval siblings.

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.

  1. 8 tool updatesv0.1.0
    • First observedgenerate_password
    • First observedget_card_by_id
    • First observedget_random_card
    • First observedget_set_info
    • First observedroll_dice
    • First observedsearch_card_by_name
    • First observedsearch_cards
    • First observedweb_search

TDQS

B3.2/5.0

Scored across 8 tools

Disambiguation4/5

Most tools have clearly distinct resource/action targets, and the generic utilities are separate from the MTG tools. The only notable overlap is search_card_by_name versus search_cards, since a name query can be expressed as a Scryfall search, but the descriptions provide enough separation.

Naming Consistency4/5

All names use lowercase snake_case and mostly follow a verb_noun pattern. Minor deviations include web_search (noun_verb) and variation between search_card_by_name and search_cards, but the convention is still predictable.

Tool Count5/5

Eight tools is a well-scoped count for a mixed lookup/utility server. Each tool has a distinct purpose, and there is no obvious bloat or missing obvious companion tool.

Completeness4/5

The MTG surface covers core read operations: lookup by ID, lookup by name, general search, random card, and set info. Minor gaps include listing/searching sets broadly, card rulings, and set+number lookup, but these are workable around via search or web_search.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    C
    quality
    D
    maintenance
    A Model Context Protocol server that enables web search capabilities using the Tavily API, allowing AI models to retrieve current information from the internet through natural language commands.
    3
    -
  • F
    license
    B
    quality
    D
    maintenance
    Enables web search capabilities through the Tavily API. Allows users to search the web for information using natural language queries via the MCP protocol.
    4
    1
    -
  • F
    license
    C
    quality
    D
    maintenance
    Enables web search capabilities through the Tavily API via the Model Context Protocol. Allows users to perform web searches and retrieve information from the internet through natural language queries.
    5
    -
  • F
    license
    C
    quality
    D
    maintenance
    Enables web search capabilities through the Tavily API. Allows users to search the web for information using natural language queries through the MCP protocol.
    3
    -