MCP REST Client

by vurtnec

398 downloads
Not rated
GitHub

About

MCP REST Client, can using REST API to integrate every agent, like cursor, vercel AI

Details

Author
vurtnec
Downloads
398
Categories
Developer Tools, Other

- Provides REST API endpoints for tool interaction
- Lists available tools via list-tools/{serverName}
- Calls tools via call-tool endpoint
- Logs all tool calls to .cursorrules file
- Configurable via mcp_config.json

Install Node.js (version 16 or higher) and pnpm, clone the repository, run pnpm install, copy mcp_config.json.example to mcp_config.json and modify it, then start the client with pnpm start. All configured servers register automatically. Use the list-tools HTTP API to list tools for a server and the call-tool HTTP API to call a specific tool with JSON arguments.

\# MCP Client

Overview

This is a Model Context Protocol (MCP) client project designed to facilitate advanced interactions with AI models and services.

Prerequisites

- Node.js (version 16 or higher) - pnpm (package manager)

Installation

1. Clone the repository \\\bash git clone https://github.com/your-username/mcp-client.git cd mcp-client \\\

2. Install dependencies
\\\bash
pnpm install
\
\\

Configuration

1. Copy \mcp\_config.json.example\ to \mcp\_config.json\ 2. Modify the configuration file with your specific server and tool settings

Usage

1. To run the client:
\\\bash
pnpm start
\
\\

2. All your own servers will be registered when you run the client.

3. You can use the \list-tools\ API to list all the tools available for a specific server.
\\\bash
curl --location 'http://localhost:3000/list-tools/{serverName}'
\
\\
4. You can use the \call-tool\ API to call a specific tool.
\\\bash
curl --location 'http://localhost:3000/call-tool' \\
--header 'Content-Type: application/json' \\
--data '{
"serverName": "server\_name",
"toolName": "tool\_name",
"args": {
// Arguments must match the inputSchema from the list-tools response
// Required fields must be included
// Optional fields can be omitted
// Example based on above schema:
// "issue\_key": "PROJ-123" // Required
// "expand": "..." // Optional
}
}'
\
\\

Cursorrules

All tool calls will be logged in the \.cursorrules\ file.

\\IMPORTANT:\\
- YOU MUST COPY CURSORRULES TO YOUR OWN REPO AND EDIT IT TO YOUR OWN NEEDS.
- YOU MUST COPY "mcp\_config.json" TO YOUR OWN REPO AND EDIT IT TO YOUR OWN NEEDS.
- YOU MUST USE COMPOSER WITH AGENT.

Contributing

1. Fork the repository 2. Create your feature branch (\git checkout -b feature/AmazingFeature\) 3. Commit your changes (\git commit -m 'Add some AmazingFeature'\) 4. Push to the branch (\git push origin feature/AmazingFeature\) 5. Open a Pull Request

License

Distributed under the MIT License. See \LICENSE\ for more information.

Contact

Your Name - your.email@example.com

Project Link: \https://github.com/your-username/mcp-client\

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.