what is MCP Servers Playground?
MCP Servers Playground is a project that implements a Model Context Protocol (MCP) server, providing tools to interact with the JSONPlaceholder API and basic calculator functions.
how to use MCP Servers Playground?
To use the MCP Servers Playground, clone the repository, install the dependencies, and run the servers using npm scripts. You can run the JSONPlaceholder server or the Calculator server as needed.
key features of MCP Servers Playground?
- Calculator Server: Provides basic arithmetic operations (add, subtract).
- JSONPlaceholder Server: Access to JSONPlaceholder API data including users, posts, comments, albums, and todos.
- VS Code Integration: Configuration for easy access to the MCP servers through VS Code settings.
use cases of MCP Servers Playground?
- Performing basic arithmetic calculations through the Calculator server.
- Accessing and manipulating mock API data for testing and development purposes.
- Integrating with development environments like VS Code for streamlined workflows.
FAQ from MCP Servers Playground?
- What are the prerequisites to run this project?
You need Node.js (v18.0.0 or later) and npm or yarn to install dependencies.
- How do I run the servers?
You can run the servers using npm scripts:
npm start
for the JSONPlaceholder server ornpm run start:calculator
for the Calculator server.
- Can I integrate this with my development environment?
Yes! The project includes configuration for VS Code integration.
JSONPlaceholder MCP Server
A Model Context Protocol (MCP) server implementation that provides tools to interact with the JSONPlaceholder API and basic calculator functions.
Features
- Calculator Server: Provides basic arithmetic operations (add, subtract)
- JSONPlaceholder Server: Provides access to the JSONPlaceholder API data:
- Users
- Posts
- Comments
- Albums
- Todos
Getting Started
Prerequisites
- Node.js (v18.0.0 or later for native fetch support)
- npm or yarn
Installation
- Clone the repository
- Install dependencies:
npm install
Running the Servers
You can run the servers using npm scripts:
# Run the JSONPlaceholder server (default)
npm start
# Run the Calculator server
npm run start:calculator
# Run the JSONPlaceholder server explicitly
npm run start:jsonplaceholder
VS Code Integration
This project includes configuration for VS Code integration. The MCP servers can be accessed through VS Code settings:
- In the
.vscode/mcp.json
file:
{
"servers": {
"my-calc": {
"command": "node",
"args": ["/path/to/servers/calculator.js"]
},
"my-mcp-server": {
"command": "node",
"args": ["/path/to/servers/jsonplaceholder.js"]
}
}
}
- Or in your VS Code settings.json:
"mcp": {
"servers": {
"my-calc": {
"command": "node",
"args": [
"/path/to/servers/calculator.js"
]
},
"my-mcp-server": {
"command": "node",
"args": [
"/path/to/servers/jsonplaceholder.js"
]
}
}
}