Skip to content

TogetherCrew/mcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcp-server

Install

npm i @togethercrew.dev/mcp-server
yarn add @togethercrew.dev/mcp-server
pnpm add @togethercrew.dev/mcp-server

Inspector

Try it using @modelcontextprotocol/inspector.

Note: The inspector timeout is set to 10 seconds by default. Our services can take several minutes to process a request, therefore you should extend the timeout. This can be done (soon) through the configuration settings. Or by adding the param timeout=600000 (10 minutes) to the url.

Client example

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { exit } from "process";

async function main() {
  const transport = new StdioClientTransport({
    command: "node",
    args: ["./src/index.ts"], // This will need to connect to the mpc server
  });

  const client = new Client({
    name: "TogetherCrew-Agent",
    version: "1.0.0",
  });

  await client.connect(transport);

  console.log("Client connected");

  const response = await client.callTool({
    name: "query-community-resources",
    arguments: {
      communityId: "TOGETHERCREW_COMMUNITY_ID",
      question: "YOUR QUESTION",
    },
  });

  console.log("Response:", response.content[0].text);
  exit(0);
}

main().catch(console.error);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published