Simple MCP POC

Simple MCP POC

A proof-of-concept MCP server that enables reading local files and performing basic arithmetic operations. It provides a simple foundation for understanding how tools are exposed to MCP clients.

Category
Visit Server

README

Simple MCP POC

A simple Model Context Protocol (MCP) server that exposes tools for:

  • Reading local files
  • Performing basic arithmetic operations

This project is intended as a proof of concept (POC) to understand how MCP servers work and how tools are exposed to clients.


Prerequisites

  • Node.js v18 or higher
  • npm (comes with Node.js)

node -v npm -v


---

## Installation

1. Clone or copy this repository
2. Open a terminal in the project directory
3. Install dependencies:

```bash
npm install

Running the Server

Start the MCP server using standard I/O (stdio):

node server.js

The server will start and wait for JSON-RPC messages on stdin/stdout.


Testing with MCP Inspector

The easiest way to test the server is using the MCP Inspector tool.

Windows (PowerShell)

$env:DANGEROUSLY_OMIT_AUTH="true"
npx mcp-inspector node server.js

macOS / Linux

DANGEROUSLY_OMIT_AUTH=true npx mcp-inspector node server.js

After running, open your browser to http://localhost:6274 to interact with the tools.


Available Tools

The server exposes two tools:

1. read_file

Reads the content of a local text file.

Arguments:

  • path (string): The relative or absolute path to the file.

Example usage:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "read_file",
    "arguments": {
      "path": "notes.txt"
    }
  }
}

2. calculator

Performs basic arithmetic operations.

Arguments:

  • a (number): First operand
  • b (number): Second operand
  • operation (string): One of add, subtract, multiply, divide

Example usage:

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "calculator",
    "arguments": {
      "a": 10,
      "b": 5,
      "operation": "add"
    }
  }
}

Manual Testing (JSON-RPC)

You can also test the server by sending raw JSON-RPC messages to the running server process.

Example: Read notes.txt

# Start server
node server.js

# In another terminal, send JSON-RPC request
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"read_file","arguments":{"path":"notes.txt"}}}' | node server.js

Project Structure

mcp-poc/
├── server.js          # Main MCP server entry point
├── package.json       # Project dependencies
└── README.md          # This file

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured