MCP Quick Start Server
by scriptstar
This project is a simple quick-start example of a Model Context Protocol (MCP) server built with TypeScript and the `@modelcontextprotocol/sdk`. It demonstrates how to define basic tools, resources, and prompts.
Last updated: N/A
What is MCP Quick Start Server?
This is a Model Context Protocol (MCP) server built with TypeScript, showcasing how to define tools, resources, and prompts for interaction with an MCP client, such as an AI assistant.
How to use MCP Quick Start Server?
To use this server, clone the repository, install dependencies using npm install
, build the server with npm run build
, and then run it using node build/index.js
or npm start
. Interact with the server by sending JSON-RPC messages to its stdin and receiving responses from its stdout, following the MCP protocol.
Key features of MCP Quick Start Server
Tool:
add
- Adds two numbers.Tool:
fetch-chuck-jokes
- Fetches a random Chuck Norris joke.Resource:
greeting
- Provides a personalized greeting.Prompt:
getGreetingAndJoke
- Instructs an AI client to greet a user and tell them a Chuck Norris joke.
Use cases of MCP Quick Start Server
Developing AI assistants that can interact with external tools and resources.
Creating development tools that leverage the Model Context Protocol.
Building servers that provide specific functionalities to AI clients.
Experimenting with different tool, resource, and prompt definitions for MCP.
FAQ from MCP Quick Start Server
What is the Model Context Protocol (MCP)?
What is the Model Context Protocol (MCP)?
MCP is a protocol for communication between AI clients and servers, enabling the AI to access tools, resources, and prompts.
What are tools in MCP?
What are tools in MCP?
Tools are functions that the server can execute on behalf of the client, such as adding numbers or fetching data from an API.
What are resources in MCP?
What are resources in MCP?
Resources are data sources that the client can access, such as a personalized greeting or information from a database.
What are prompts in MCP?
What are prompts in MCP?
Prompts are instructions or tasks that the client can use to guide the AI's behavior, such as greeting a user and telling a joke.
How do I interact with the server?
How do I interact with the server?
You interact with the server by sending JSON-RPC messages to its stdin and receiving responses from its stdout. The messages should conform to the MCP protocol.