custom-mcp

このプロジェクトはTypeScriptで構築されたカスタムMCPですが、評価が低く、機能が明確でないため、MCPとしての基準を満たしていません。開発者向けのツールとしての可能性はありますが、さらなる改善が必要です。

GitHubスター

0

ユーザー評価

未評価

お気に入り

0

閲覧数

23

フォーク

0

イシュー

0

README
Universal Data MCP Server 🧠

Connect your LLM to real-world databases, files, and APIs using the Model Context Protocol.

This project provides a lightweight MCP (Model Context Protocol) server built in TypeScript that enables AI assistants (like Claude or Cursor) to query structured databases, fetch external APIs, and inspect local files — all via a clean MCP-compatible interface.


MCP Data Bridge

Key Features 🚀
  • 📦 Multi-Database Querying: Supports MongoDB, PostgreSQL, MySQL, and SQLite.
  • 📁 File Content Access: Read local files using getFileContent.
  • 🌐 JSON API Integration: Fetch and process external APIs with fetchAPI.
  • 🧠 LLM-Ready: Use natural language with AI tools like Claude or Cursor.
  • 🛠️ Zod-Schema Validation: Ensures reliable input/output via types.
Available Tools
  • queryMongo: Query MongoDB collections
  • queryPostgres: Run SQL queries on PostgreSQL
  • queryMySQL: Run SQL queries on MySQL
  • querySQLite: Query SQLite DBs from file
  • getFileContent: Read contents of a file
  • fetchAPI: Send GET requests to JSON APIs

How It Works 🤔

The system connects via stdin/stdout to a local MCP-compatible client:

[LLM Client] <-> [Universal MCP Server] <-> [Data Sources]

Installation ⚙️

Note: Requires Node.js 18+ and optionally access to databases or files you want to work with.

Prerequisites
Required Software
  • Node.js (v18+): Download
  • npm or yarn
  • MongoDB / PostgreSQL / MySQL / SQLite installed locally or accessible remotely
  • An MCP-compatible LLM Client:
Step 1: Clone and Install
git clone https://github.com/HrushiYadav/custom-mcp.git
cd custom-mcp
npm install
Step 2: Start the MCP Server
npm start

This will launch the MCP server and expose all tools via StdioServerTransport.


Configure Your MCP Client 🧠

Edit your LLM client’s configuration file to include:

{
  "mcpServers": {
    "UniversalMCP": {
      "command": "npm",
      "args": ["start"],
      "workingDirectory": "/absolute/path/to/custom-mcp"
    }
  }
}

Supported clients like Claude or Cursor will automatically detect and start this server.


Usage ▶️

Start your LLM client and try queries like:

Run `SELECT name FROM users WHERE age > 30` on PostgreSQL
Read the content of `package.json`
Fetch data from https://api.coindesk.com/v1/bpi/currentprice.json

Project Structure 🧱
src/
├── index.ts         # Main MCP server
├── tools.ts         # Tool registry
└── utils/           # Tool handlers
    ├── api.ts
    ├── files.ts
    ├── mongo.ts
    ├── mysql.ts
    ├── postgres.ts
    └── sqlite.ts

Contributing 🤝

We welcome all contributions to improve and extend the Universal Data MCP Server.

  1. Fork this repository.
  2. Create a branch (feature/your-idea or bugfix/your-fix).
  3. Make your changes and test them.
  4. Commit with a clear message (feat: Add Postgres schema tool).
  5. Open a pull request.

Troubleshooting ❓
Common Issues
  • Cannot start server?

    • Ensure Node.js 18+ is installed
    • Run npm install before npm start
  • Client not connecting?

    • Verify JSON path in your MCP config matches actual working directory
  • Database not responding?

    • Check DB credentials and network access
    • Test connection with your DB tool directly

Contact 👋

Acknowledgments 🙏