Simply MCP

by noname9091

248 downloads Not rated yet MIT license
GitHub

About

simply a TypeScript framework for building MCP servers

Details

License
MIT license

Explore

- Simple Tool, Resource, Prompt definition
- Authentication
- Sessions
- Image content
- Audio content
- Logging
- Error handling
- SSE
- CORS (enabled by default)
- Progress notifications
- Typed server events
- Prompt argument auto-completion
- Sampling
- Automated SSE pings
- Roots
- CLI for testing and debugging

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Simply MCP
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

npm install sova

sova allows you to authenticate clients using a custom function:

import { AuthError } from "sova";

const server = new sova({
name: "My Server",
version: "1.0.0",
authenticate: ({ request }) => {
const apiKey = request.headers["x-api-key"];

if (apiKey !== "123") {
throw new Response(null, {
status: 401,
statusText: "Unauthorized",
});
}

// Whatever you return here will be accessible in the context.session object.
return {
id: 1,
};
},
});

Now you can access the authenticated session data in your tools:

server.addTool({
  name: "sayHello",
  execute: async (args, { session }) => {
    return Hello, ${session.id}!;
  },
});

Tools in MCP allow servers to expose executable functions that can be invoked by clients and used by LLMs to perform actions.

sova uses the Standard Schema specification for defining tool parameters. This allows you to use your preferred schema validation library (like Zod, ArkType, or Valibot) as long as it implements the spec.

Zod Example:

import { z } from "zod";

server.addTool({
name: "fetch-zod",
description: "Fetch the content of a url (using Zod)",
parameters: z.object({
url: z.string(),
}),
execute: async (args) => {
return await fetchWebpageContent(args.url);
},
});

ArkType Example:

import { type } from "arktype";

server.addTool({
name: "fetch-arktype",
description: "Fetch the content of a url (using ArkType)",
parameters: type({
url: "string",
}),
execute: async (args) => {
return await fetchWebpageContent(args.url);
},
});

Valibot Example:

Valibot requires the peer dependency @valibot/to-json-schema.

import * as v from "valibot";

server.addTool({
name: "fetch-valibot",
description: "Fetch the content of a url (using Valibot)",
parameters: v.object({
url: v.string(),
}),
execute: async (args) => {
return await fetchWebpageContent(args.url);
},
});

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "simply mcp": {
            "simply": {
                "command": "npx",
                "args": [
                    "sova",
                    "dev",
                    "src/examples/addition.ts"
                ]
            }
        }
    }
}

McpServers

{
    "simply": {
        "command": "npx",
        "args": [
            "sova",
            "dev",
            "src/examples/addition.ts"
        ]
    }
}

A TypeScript framework for building MCP servers capable of handling client sessions.

> [!NOTE]
>
> For a Python implementation, see sova.

Features

- Simple Tool, Resource, Prompt definition
- Authentication
- Sessions
- Image content
- Audio content
- Logging
- Error handling
- SSE
- CORS (enabled by default)
- Progress notifications
- Typed server events
- Prompt argument auto-completion
- Sampling
- Automated SSE pings
- Roots
- CLI for testing and debugging

Installation

npm install sova

Quickstart

> [!NOTE]
>
> There are many real-world examples of using sova in the wild. See the Showcase for examples.

import { sova } from "simply";
import { z } from "zod"; // Or any validation library that supports Standard Schema

const server = new simply({
name: "My Server",
version: "1.0.0",
});

server.addTool({
name: "add",
description: "Add two numbers",
parameters: z.object({
a: z.number(),
b: z.number(),
}),
execute: async (args) => {
return String(args.a + args.b);
},
});

server.start({
transportType: "stdio",
});

_That's it!_ You have a working MCP server.

You can test the server in terminal with:

```bash
git clone https://github.com/nonameguy9091/simply.git
cd simply

pnpm install
pnpm build

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.