Skip to main content
Glama
fran2018-ctrl

My MCP Server

README.md
# My MCP Server

A shareable MCP (Model Context Protocol) server for Claude.ai.

## What's included

| Tool | What it does |
|------|-------------|
| `echo` | Echoes back a message — good for testing |
| `get_datetime` | Returns current UTC date/time |
| `calculate` | Evaluates basic math expressions |

---

## Deploy to Railway (recommended — free tier)

1. Push this folder to a GitHub repo
2. Go to [railway.app](https://railway.app) → New Project → Deploy from GitHub
3. Select your repo — Railway auto-detects Node.js and deploys
4. Once deployed, copy your public URL (e.g. `https://myapp.railway.app`)

Your MCP endpoint will be:
```
https://your-app.railway.app/sse
```

---

## Deploy to Render (also free)

1. Push to GitHub
2. Go to [render.com](https://render.com) → New Web Service
3. Connect your repo, set:
   - Build command: `npm install`
   - Start command: `npm start`
4. Deploy — your URL will be `https://your-app.onrender.com/sse`

---

## Run locally

```bash
npm install
npm start
# Server runs at http://localhost:3000
# MCP endpoint: http://localhost:3000/sse
```

---

## Share with others

Send them this URL:
```
https://your-deployed-app.railway.app/sse
```

They add it in Claude.ai:
1. Profile icon → Settings → Integrations
2. Click "Add integration"
3. Paste the URL → Save
4. The tools appear immediately in their Claude chats

---

## Add your own tools

Edit `index.js` and add a new tool after the comment block:

```js
server.tool(
  "my_tool_name",
  "Description of what this tool does",
  {
    input_param: z.string().describe("What this parameter is"),
  },
  async ({ input_param }) => ({
    content: [{ type: "text", text: `Result: ${input_param}` }],
  })
);
```

Then redeploy — tools are live immediately.