FastMCP Demo
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., "@FastMCP Democalculate 15 plus 7"
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.
FastMCP Demo - TypeScript MCP Server
A demonstration project to understand the Model Context Protocol (MCP) using TypeScript. This project implements a basic MCP server with tools, resources, and prompts.
What is MCP?
The Model Context Protocol (MCP) is a standardized protocol that enables AI assistants to securely access external data sources and tools. It provides a way for AI models to:
Tools: Execute functions and operations
Resources: Access data and information
Prompts: Use predefined prompt templates
Related MCP server: Hello World MCP Server
Project Structure
fast-mcp/
├── src/
│ └── index.ts # Main MCP server implementation
├── dist/ # Compiled JavaScript (generated)
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
└── README.md # This fileFeatures
This demo server includes:
Tools
hello: A simple greeting tool that welcomes users
calculate: Performs basic arithmetic operations (add, subtract, multiply, divide)
Resources
demo://example: A simple text resource
demo://config: Server configuration in JSON format
Prompts
greet_user: Generates a greeting message for a user
explain_mcp: Provides an explanation of what MCP is
Setup
Install dependencies:
npm installBuild the project:
npm run buildRun the server:
npm startOr use the development mode with auto-reload:
npm run dev
How MCP Works
Server Initialization
The server is created with capabilities for tools, resources, and prompts:
const server = new Server(
{ name: "fast-mcp-demo", version: "0.1.0" },
{
capabilities: {
tools: {},
resources: {},
prompts: {},
},
}
);Transport
This server uses stdio (standard input/output) transport, which means it communicates via stdin/stdout. This is the most common transport for MCP servers.
Request Handlers
Each capability requires request handlers:
ListToolsRequestSchema- Lists available toolsCallToolRequestSchema- Executes a toolListResourcesRequestSchema- Lists available resourcesReadResourceRequestSchema- Reads a resourceListPromptsRequestSchema- Lists available promptsGetPromptRequestSchema- Gets a prompt with arguments
Testing with MCP Clients
To test this server, you'll need an MCP client. Popular options include:
Claude Desktop - Add the server to your MCP configuration
MCP Inspector - A debugging tool for MCP servers
Custom MCP Client - Build your own using the MCP SDK
Example Configuration (Claude Desktop)
Add to your Claude Desktop MCP settings:
{
"mcpServers": {
"fast-mcp-demo": {
"command": "node",
"args": ["/path/to/fast-mcp/dist/index.js"]
}
}
}Learning Path
This project was built incrementally to understand MCP concepts:
✅ Initial Setup - TypeScript configuration and dependencies
✅ Basic Server - Simple server with hello tool
✅ Resources - Added resource reading capabilities
✅ Prompts - Added prompt templates
✅ Advanced Tools - Added calculate tool with error handling
Key Concepts
Tools
Tools are functions that the AI can call. They have:
A name and description
An input schema (JSON Schema)
Execution logic that returns results
Resources
Resources are data sources that can be read. They have:
A URI identifier
A name and description
A MIME type
Content that can be retrieved
Prompts
Prompts are template messages that can be used to guide AI interactions. They have:
A name and description
Optional arguments
Message templates
Next Steps
To extend this demo, consider:
Adding file system resources
Implementing authentication
Adding more complex tools (API calls, database queries)
Using different transports (SSE, HTTP)
Adding logging and error handling middleware
Implementing caching for resources
Resources
FastMCP (Python) - The Python equivalent
License
MIT
Available Tools
2 toolscalculateC
Perform basic arithmetic calculations
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | The arithmetic operation to perform | |
| a | Yes | First number | |
| b | Yes | Second number |
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 performs calculations but doesn't mention any behavioral traits like error handling (e.g., division by zero), performance limits, or output format. This is a significant gap for a tool with potential side effects, scoring a 2 for inadequate transparency.
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 ('Perform basic arithmetic calculations') that is front-loaded and wastes no words. It directly conveys the core purpose without unnecessary elaboration, earning a 5 for optimal conciseness and structure.
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 complexity (basic arithmetic with three parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain return values, error cases, or behavioral constraints, leaving gaps that could hinder an agent's correct invocation. This scores a 2 for insufficient contextual detail.
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 input schema has 100% description coverage, clearly documenting all three parameters (operation, a, b) with enums and descriptions. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 for adequate but not enhanced parameter information.
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 'Perform basic arithmetic calculations' clearly states the tool's function with a specific verb ('perform') and resource ('calculations'), distinguishing it from siblings like 'echo' and 'get_system_info'. However, it doesn't specify the exact operations (add, subtract, etc.) or differentiate from potential alternative calculation tools, keeping it at 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.
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 doesn't mention any context, prerequisites, or exclusions, such as when to use it over other calculation methods or tools. This leaves the agent without usage direction, scoring a 2 for minimal guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
helloC
A simple greeting tool that says hello
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name to greet |
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 'says hello', which implies a read-only output operation, but doesn't disclose any behavioral traits like whether it has side effects, requires authentication, has rate limits, or what format the greeting takes. The description is too minimal to provide meaningful behavioral context.
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 at just 7 words in a single sentence. It's front-loaded with the core purpose and contains zero wasted words. Every element of the description earns its place by communicating the essential function of the tool.
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 that there are no annotations and no output schema, the description is incomplete for helping an agent understand how to properly use this tool. While the tool is simple (one parameter), the description doesn't explain what the tool returns, how the greeting is formatted, or any behavioral characteristics. For a tool with zero annotation coverage, this minimal description leaves significant gaps.
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 input schema has 100% description coverage, with the 'name' parameter clearly documented as 'The name to greet'. The description doesn't add any parameter semantics beyond what the schema already provides. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.
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 tool's purpose as 'A simple greeting tool that says hello', which specifies the verb ('says hello') and resource (greeting). It distinguishes from the sibling 'calculate' tool by focusing on greetings rather than calculations. However, it doesn't explicitly differentiate from potential other greeting tools beyond the sibling context.
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 doesn't mention any specific contexts, prerequisites, or exclusions. The only implied usage is for greeting purposes, but this is too vague to help an agent make informed decisions about tool selection.
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.
2 tool updates
- First observed
calculate - First observed
hello
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: 'calculate' handles arithmetic operations, while 'hello' provides a greeting. There is no overlap or ambiguity between these functions, making it easy for an agent to select the correct tool.
Both tool names follow a consistent pattern of using simple, descriptive verbs ('calculate', 'hello') without any mixing of conventions like camelCase or snake_case. The naming is straightforward and predictable.
With only two tools, the server feels thin and under-scoped for a general-purpose demo. While the tools are distinct, the count is too low to meaningfully cover a domain or provide a coherent set of operations, limiting utility.
The server lacks a clear domain, making it impossible to assess coverage meaningfully. The tools are trivial and unrelated (arithmetic and greeting), offering no cohesive workflow or lifecycle, which severely limits agent functionality.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol server that provides greeting tools, resources, and prompts, demonstrating client-server interaction using TypeScript.1-
- AlicenseDqualityDmaintenanceA minimal Model Context Protocol server in TypeScript that demonstrates MCP-compliant resources and tools for LLMs, featuring simple resources and a basic tool that echoes messages or returns greetings.15Apache 2.0
- -licenseBqualityNot gradedmaintenanceA boilerplate project for quickly developing Model Context Protocol (MCP) servers using TypeScript SDK. Includes example tools for calculations and greetings, plus system information resources.3-
- FlicenseBqualityDmaintenanceA boilerplate project for quickly developing Model Context Protocol (MCP) servers using TypeScript SDK. Includes example tools like calculator and greeting functions, plus system information resources.3-