MCP Server v1.0

AppWrite
MCP Server 👋🏻

Seamlessly integrate powerful database operations into your applications with our Model Context Protocol server.

Copy the server URL:

https://mcp.ramx.in/mcp
Lightning Fast
Secure
Easy Setup
MCP Server Console
$ mcp-server --live-demo
Database Operations
7 Tools
Response Time
~50ms
Success Rate
99.9%
Source Code

Sneak Peek into the Code

Here's a sneak peek into the code that powers the MCP Server.

Project Structure
src
route.ts
appwrite.ts
package.json
route.ts

import { createMcpHandler } from "@vercel/mcp-adapter";
import { z } from "zod";
import { appwriteTools } from "../../lib/tools/appwrite";

const handler = createMcpHandler(
  (server) => {
    // Creator Info Tool
    server.tool(
      "creatorInfo",
      "Get detailed information about Ramkrishna Swarnkar - Full Stack Developer and Open Source Contributor",
      {},
      async () => ({
        content: [
          {
            type: "text" as const,
            text: "Creator info",
          },
        ],
      })
    );

    // Appwrite Get Document Tool
    server.tool(
      "getDocument",
      "Get a document by its unique ID from the Appwrite database",
      {
        documentId: z
          .string()
          .describe("The unique ID of the document to retrieve"),
        collectionId: z
          .string()
          .optional()
          .describe("The collection ID (defaults to 'company_names')"),
      },
      async ({ documentId, collectionId }) => {
        return await appwriteTools.getDocument.handler({
          documentId,
          collectionId,
        });
      }
    );

    // Appwrite List Documents Tool
    server.tool(
      "listDocuments",
      "List all documents from the companies collection",
      {
        collectionId: z
          .string()
          .optional()
          .describe("The collection ID (defaults to 'company_names')"),
        limit: z
          .number()
          .optional()
          .describe("Maximum number of documents to return (defaults to 25)"),
      },
      async ({ collectionId, limit }) => {
        return await appwriteTools.listDocuments.handler({
          collectionId,
          limit,
        });
      }
    );

    // Appwrite Create Document Tool
    server.tool(
      "createDocument",
      "Create a new document in the Appwrite database",
      {
        company_name: z.string().describe("The name of the company"),
        company_id: z
          .number()
          .describe("The unique identifier for the company (integer)"),
        documentId: z
          .string()
          .optional()
          .describe(
            "Optional custom document ID (auto-generated if not provided)"
          ),
        collectionId: z
          .string()
          .optional()
          .describe("The collection ID (defaults to 'company_names')"),
      },
      async ({ company_name, company_id, documentId, collectionId }) => {
        return await appwriteTools.createDocument.handler({
          company_name,
          company_id,
          documentId,
          collectionId,
        });
      }
    );

    // Appwrite Update Document Tool
    server.tool(
      "updateDocument",
      "Update an existing document in the Appwrite database",
      {
        documentId: z
          .string()
          .describe("The unique ID of the document to update"),
        company_name: z
          .string()
          .optional()
          .describe("The name of the company (optional)"),
        company_id: z
          .number()
          .optional()
          .describe("The unique identifier for the company (optional integer)"),
        collectionId: z
          .string()
          .optional()
          .describe("The collection ID (defaults to 'company_names')"),
      },
      async ({ documentId, company_name, company_id, collectionId }) => {
        return await appwriteTools.updateDocument.handler({
          documentId,
          company_name,
          company_id,
          collectionId,
        });
      }
    );

    // Appwrite Delete Document Tool
    server.tool(
      "deleteDocument",
      "Delete a document from the Appwrite database",
      {
        documentId: z
          .string()
          .describe("The unique ID of the document to delete"),
        collectionId: z
          .string()
          .optional()
          .describe("The collection ID (defaults to 'company_names')"),
      },
      async ({ documentId, collectionId }) => {
        return await appwriteTools.deleteDocument.handler({
          documentId,
          collectionId,
        });
      }
    );

    // Appwrite Upsert Document Tool
    server.tool(
      "upsertDocument",
      "Create or update a document in the Appwrite database (upsert operation)",
      {
        documentId: z
          .string()
          .describe("The unique ID of the document to create or update"),
        company_name: z.string().describe("The name of the company"),
        company_id: z
          .number()
          .describe("The unique identifier for the company (integer)"),
        collectionId: z
          .string()
          .optional()
          .describe("The collection ID (defaults to 'company_names')"),
      },
      async ({ documentId, company_name, company_id, collectionId }) => {
        return await appwriteTools.upsertDocument.handler({
          documentId,
          company_name,
          company_id,
          collectionId,
        });
      }
    );
  },
  {
    capabilities: {
      tools: {
        creatorInfo: {
          description:
            "Get detailed information about Ramkrishna Swarnkar",
        },
        getDocument: {
          description:
            "Get a document by its unique ID from the Appwrite database",
        },
        listDocuments: {
          description: "List all documents from the companies collection",
        },
        createDocument: {
          description: "Create a new document in the Appwrite database",
        },
        updateDocument: {
          description: "Update an existing document in the Appwrite database",
        },
        deleteDocument: {
          description: "Delete a document from the Appwrite database",
        },
        upsertDocument: {
          description:
            "Create or update a document in the Appwrite database (upsert operation)",
        },
      },
    },
  },
  {
    sseEndpoint: "/sse",
    streamableHttpEndpoint: "/mcp",
    verboseLogs: true,
    maxDuration: 60,
  }
);

export { handler as GET, handler as POST, handler as DELETE };

  
Live Demo

MCP Server in Action

Watch the AppWrite MCP Server handle database operations in real-time

MCP Server Demo Terminal
$ AppWrite MCP Server Demo
$creatorInfo
$getDocument
$listDocuments
$createDocument
$updateDocument
$deleteDocument
$upsertDocument
Video Demo

See It In Action

Watch a comprehensive walkthrough of the AppWrite MCP Server features and capabilities

AppWrite MCP Server Demo

Watch the Demo

Learn how to integrate and use the MCP Server

Open Source

Ready to Get Started?

Explore the source code, contribute to the project, and start building with the AppWrite MCP Server

GitHub Repository

Access the complete source code integrate
MCP Server into your projects.

Built with ❤️ by Ram

© 2025 Ramxcodes. All rights reserved.