0.1.0 • Published 5 months ago

@amp-labs/mcp-server v0.1.0

Weekly downloads
-
License
-
Repository
github
Last release
5 months ago

Discord Documentation PRs welcome

Ampersand MCP server

Connect your agents to the 150+ connectors we offer at Ampersand via this multi-tenant MCP server. We expose the primitives we offer on the Ampersand platform as native tools here.

Connecting to the MCP server from an MCP Client

Add the following in your mcp.json in cursor IDE or claude_desktop_config.json when using Claude desktop.

When running the server in SSE mode

{
  "mcpServers": {
    "@amp-labs/mcp-server": {
      "url": "https://mcp.withampersand.com/v1/sse?apiKey=<AMPERSAND_API_KEY>&project=<AMPERSAND_PROJECT_ID>&integrationName=<AMPERSAND_INTEGRATION_NAME>&groupRef=<AMPERSAND_GROUP_REF>"
    }
  }
}

When running the server in stdio mode

{
  "mcpServers": {
    "@amp-labs/mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@amp-labs/mcp-server@latest",
        "--transport",
        "stdio",
        "--project",
        "<AMPERSAND_PROJECT_ID>",
        "--integrationName",
        "<AMPERSAND_INTEGRATION_NAME>",
        "--groupRef",
        "<AMPERSAND_GROUP_REF>"
      ],
      "env": {
        "AMPERSAND_API_KEY": "<AMPERSAND_API_KEY>"
      }
    }
  }
}

Building locally

Install dependencies

pnpm i

Build the MCP SSE server

pnpm build

Start the server

pnpm start

Debugging & troubleshooting

Use the MCP inspector tool to know more about the mcp server and debug tools, prompts, resources

pnpm inspect

Connect to local server from MCP client

SSE mode

If your MCP client supports headers:

{
  "mcpServers": {
    "@amp-labs/mcp-server": {
      "url": "http://localhost:3001/v1/sse?apiKey=<AMPERSAND_API_KEY>&project=<AMPERSAND_PROJECT_ID>&integrationName=<AMPERSAND_INTEGRATION_NAME>&groupRef=<AMPERSAND_GROUP_REF>",
      "headers": {
        "x-api-key": "<AMPERSAND_API_KEY>"
      }
    }
  }
}

If your MCP client does not support headers, you can pass the API key in the query param:

{
  "mcpServers": {
    "@amp-labs/mcp-server": {
      "url": "http://localhost:3001/v1/sse?apiKey=<AMPERSAND_API_KEY>&project=<AMPERSAND_PROJECT_ID>&integrationName=<AMPERSAND_INTEGRATION_NAME>&groupRef=<AMPERSAND_GROUP_REF>"
    }
  }
}

STDIO mode

    "@amp-labs/mcp-server": {
      "command": "node",
      "args": [
        "<PATH_TO_CODEBASE>/mcp-server/dist/index.js",
        "--transport",
        "stdio",
        "--project",
        "<AMPERSAND_PROJECT_ID>",
        "--integrationName",
        "<AMPERSAND_INTEGRATION_NAME>",
        "--groupRef",
        "<AMPERSAND_GROUP_REF>"
      ],
      "env": {
        "AMPERSAND_API_KEY": "<AMPERSAND_API_KEY>"
      }
    },