Circle MCP Server
Allows interaction with Circle.so communities, providing tools for comprehensive community management including managing posts, comments, members, spaces, and other community resources via the Circle API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Circle MCP Serverlist my communities and recent posts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Circle MCP Server
Production-grade Model Context Protocol (MCP) server for the Circle community platform. This server enables AI assistants to interact with Circle.so communities through Google OAuth 2.0 authentication and provides 20+ tools for comprehensive community management.
📋 Table of Contents
Related MCP server: Google Docs & Drive MCP Server
✨ Features
Core Capabilities
🔐 Google OAuth 2.0 Integration - Secure authentication via Google accounts
🔗 Circle API Integration - Seamless integration with Circle.so communities
🛡️ JWT Token Management - Automatic token refresh and secure storage
🚦 Rate Limiting - Built-in protection against API rate limits
🔄 Request Retry Logic - Exponential backoff for failed requests
📊 Comprehensive Logging - Winston-based structured logging
🎯 20+ Tools - Complete Circle API coverage
🔧 Type-Safe - Full TypeScript implementation with Zod validation
Security Features
✅ Secure credential storage
✅ Automatic token refresh
✅ OAuth 2.0 authorization code flow
✅ Read-only mode support
✅ Environment-based configuration
🏗️ Architecture
┌─────────────────┐
│ AI Assistant │ (Claude Desktop, VS Code, etc.)
└────────┬────────┘
│ MCP Protocol (stdio)
▼
┌─────────────────────────────────┐
│ Circle MCP Server │
│ ┌──────────────────────────┐ │
│ │ Integrated Auth Manager │ │
│ │ ├─ GCP OAuth 2.0 │ │
│ │ └─ Circle JWT Auth │ │
│ └──────────────────────────┘ │
│ ┌──────────────────────────┐ │
│ │ Circle API Client │ │
│ │ ├─ Rate Limiting │ │
│ │ ├─ Retry Logic │ │
│ │ └─ Error Handling │ │
│ └──────────────────────────┘ │
│ ┌──────────────────────────┐ │
│ │ 20+ MCP Tools │ │
│ └──────────────────────────┘ │
└─────────────┬───────────────────┘
│ HTTPS
▼
┌──────────────────┐
│ Circle.so API │
└──────────────────┘Authentication Flow:
User triggers
authenticate_with_googletoolOAuth server starts on localhost:3000
Browser opens for Google sign-in
User authorizes the application
Server receives OAuth callback with authorization code
Exchanges code for GCP access/refresh tokens
Retrieves user email from Google
Authenticates with Circle API using email
Stores both GCP and Circle tokens securely
📦 Prerequisites
Before you begin, ensure you have:
Node.js v18 or higher (Download)
npm v9 or higher (comes with Node.js)
TypeScript knowledge (helpful but not required)
Google Cloud Platform account (free tier works)
Circle.so community with headless access token
AI Assistant that supports MCP (Claude Desktop, VS Code with Cline, etc.)
🚀 Installation
1. Clone or Download the Project
cd /path/to/your/projects
# If you have this as a git repo:
git clone <repository-url> circle-mcp
cd circle-mcp
# Or if you already have the folder:
cd circle-mcp2. Install Dependencies
npm installThis installs all required packages:
@modelcontextprotocol/sdk- MCP protocol implementationgoogle-auth-library- Google OAuth 2.0googleapis- Google APIsexpress- OAuth callback serveraxios- HTTP clientwinston- Loggingzod- Schema validationAnd more...
⚙️ Configuration
1. Google Cloud Platform (GCP) Setup
Step 1.1: Create a GCP Project
Go to Google Cloud Console
Click "Select a project" → "New Project"
Enter project name (e.g., "Circle MCP Auth")
Click "Create"
Step 1.2: Enable Google+ API
In your project, go to APIs & Services → Library
Search for "Google+ API"
Click on it and press Enable
Step 1.3: Configure OAuth Consent Screen
Go to APIs & Services → OAuth consent screen
Choose External (unless you have a Google Workspace)
Fill in the required fields:
App name: Circle MCP Server
User support email: Your email
Developer contact: Your email
Click Save and Continue
Scopes: Skip this step (click Save and Continue)
Test users: Add your Google account email
Click Save and Continue
Step 1.4: Create OAuth 2.0 Credentials
Go to APIs & Services → Credentials
Click Create Credentials → OAuth 2.0 Client ID
Choose Web application
Configure:
Name: Circle MCP OAuth Client
Authorized redirect URIs: Add
http://localhost:3000/auth/google/callback
Click Create
Save your credentials:
Copy the Client ID (ends with
.apps.googleusercontent.com)Copy the Client Secret (starts with
GOCSPX-)
2. Environment Variables
Create a .env file in the project root:
# Create .env file
touch .envAdd the following configuration:
# Circle.so Configuration
CIRCLE_HEADLESS_TOKEN=your_circle_headless_token
CIRCLE_COMMUNITY_URL=https://your-community.circle.so
CIRCLE_HEADLESS_BASE_URL=https://app.circle.so
# Google Cloud Platform OAuth 2.0
GCP_CLIENT_ID=your-client-id-here.apps.googleusercontent.com
GCP_CLIENT_SECRET=GOCSPX-your-client-secret-here
GCP_REDIRECT_URI=http://localhost:3000/auth/google/callback
OAUTH_PORT=3000
# Server Configuration
READ_ONLY_MODE=false
LOG_LEVEL=infoHow to Get Circle Credentials:
Circle Headless Token:
Log in to your Circle community admin panel
Go to Settings → API
Generate a headless access token
Copy the token
Circle Community URL:
Your community's URL (e.g.,
https://learn.1to10x.ai)
Configuration Options:
Variable | Required | Description | Example |
| Yes | Circle API headless token |
|
| Yes | Your Circle community URL |
|
| Yes | Google OAuth Client ID |
|
| Yes | Google OAuth Client Secret |
|
| Yes | OAuth callback URL |
|
| No | OAuth server port (default: 3000) |
|
| No | Disable write operations (default: false) |
|
| No | Logging level (default: info) |
|
🔨 Building & Testing
Build the Project
npm run buildThis compiles TypeScript to JavaScript in the dist/ folder.
Verify Setup
node verify-setup.jsThis checks:
✅ All required files exist
✅ Dependencies are installed
✅ Environment variables are configured
✅ TypeScript compiles without errors
✅ Port 3000 is available
✅ GCP credentials are valid
Test OAuth Flow
# Configuration test
node test-oauth-flow.js
# Automated server test
node test-oauth-automated.js
# Interactive OAuth testing
node test-oauth-interactive.jsRun the Server
npm start🖥️ IDE Integration
1. Claude Desktop
Claude Desktop is Anthropic's official desktop app that supports MCP servers.
Step 1.1: Install Claude Desktop
Download from claude.ai
Step 1.2: Locate Configuration File
The configuration file location depends on your OS:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.jsonStep 1.3: Edit Configuration
Open claude_desktop_config.json and add:
{
"mcpServers": {
"circle": {
"command": "node",
"args": ["C:\\Users\\admin\\Desktop\\circle-mcp\\dist\\index.js"],
"env": {
"CIRCLE_HEADLESS_TOKEN": "your_circle_token_here",
"CIRCLE_COMMUNITY_URL": "https://your-community.circle.so",
"CIRCLE_HEADLESS_BASE_URL": "https://app.circle.so",
"GCP_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GCP_CLIENT_SECRET": "GOCSPX-your-secret",
"GCP_REDIRECT_URI": "http://localhost:3000/auth/google/callback",
"OAUTH_PORT": "3000",
"LOG_LEVEL": "info"
}
}
}
}Important Notes:
Replace
C:\\Users\\admin\\Desktop\\circle-mcp\\dist\\index.jswith your actual pathOn Windows, use double backslashes (
\\) or forward slashes (/)On macOS/Linux, use forward slashes (
/)Replace all credential placeholders with your actual values
Step 1.4: Restart Claude Desktop
Quit Claude Desktop completely
Relaunch Claude Desktop
The Circle MCP server will start automatically
Step 1.5: Verify Integration
In Claude Desktop, type:
Can you check if the Circle MCP server is connected?If connected, Claude can use tools like:
Please authenticate with Google so I can access Circle features.2. VS Code with Cline
Cline is a VS Code extension that supports MCP servers.
Step 2.1: Install Cline Extension
Open VS Code
Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
Search for "Cline"
Click Install
Step 2.2: Configure Cline
Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
Type "Cline: Open Settings"
Navigate to MCP Servers section
Click "Edit in settings.json"
Add this configuration:
{
"cline.mcpServers": {
"circle": {
"command": "node",
"args": ["/absolute/path/to/circle-mcp/dist/index.js"],
"env": {
"CIRCLE_HEADLESS_TOKEN": "your_token",
"CIRCLE_COMMUNITY_URL": "https://your-community.circle.so",
"GCP_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GCP_CLIENT_SECRET": "GOCSPX-your-secret",
"GCP_REDIRECT_URI": "http://localhost:3000/auth/google/callback"
}
}
}
}Step 2.3: Reload VS Code
Open Command Palette
Type "Developer: Reload Window"
Press Enter
Step 2.4: Use Circle Tools in Cline
Open Cline chat and try:
Authenticate with Google to access Circle community3. Other MCP Clients
MCP Inspector (Testing Tool)
For development and debugging:
npx @modelcontextprotocol/inspector node dist/index.jsThen open http://localhost:6274 in your browser.
Custom Integration
Any MCP-compatible client can connect using stdio transport:
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
const transport = new StdioClientTransport({
command: 'node',
args: ['/path/to/circle-mcp/dist/index.js'],
env: { /* environment variables */ }
});
const client = new Client({
name: 'my-client',
version: '1.0.0'
}, {
capabilities: {}
});
await client.connect(transport);🛠️ Available Tools
The Circle MCP server provides 20+ tools across multiple categories:
Authentication Tools
Tool | Description | Auth Required |
| Start Google OAuth flow | No |
| Check current authentication status | No |
| Logout and clear tokens | Yes |
Profile Tools
Tool | Description | Auth Required |
| Get your Circle profile | Yes |
| Update your profile | Yes |
Course Tools
Tool | Description | Auth Required |
| Get courses you're enrolled in | Yes |
| Get detailed course information | Yes |
Post Tools
Tool | Description | Auth Required |
| Get posts from community | Yes |
| Create a new post | Yes |
| Update an existing post | Yes |
| Delete a post | Yes |
| Like a post | Yes |
| Unlike a post | Yes |
Space Tools
Tool | Description | Auth Required |
| Get all community spaces | Yes |
| Get members of a space | Yes |
Event Tools
Tool | Description | Auth Required |
| Get upcoming events | Yes |
| Get event details | Yes |
| RSVP to an event | Yes |
Notification Tools
Tool | Description | Auth Required |
| Get your notifications | Yes |
| Mark notification as read | Yes |
Message Tools
Tool | Description | Auth Required |
| Get your direct messages | Yes |
| Send a direct message | Yes |
Feed Tools
Tool | Description | Auth Required |
| Get your personalized feed | Yes |
Comment Tools
Tool | Description | Auth Required |
| Get comments on a post | Yes |
| Create a comment | Yes |
| Update a comment | Yes |
| Delete a comment | Yes |
📚 Usage Examples
Example 1: Authenticate with Google
User prompt in Claude Desktop:
Please authenticate with Google so I can access Circle featuresWhat happens:
MCP server receives
authenticate_with_googletool callOAuth server starts on http://localhost:3000
Browser opens for Google sign-in
User signs in and authorizes
Tokens are exchanged and stored
Circle authentication completes
Example 2: Get Your Profile
User prompt:
Show me my Circle profileMCP tool called:
{
"name": "get_my_profile",
"arguments": {}
}Response:
{
"name": "John Doe",
"email": "john@example.com",
"bio": "Community member",
"member_since": "2024-01-15"
}Example 3: Get Your Courses
User prompt:
What courses am I enrolled in?MCP tool called:
{
"name": "get_my_courses",
"arguments": {}
}Example 4: Create a Post
User prompt:
Create a post in the General space with title "Hello World" and body "This is my first post!"MCP tool called:
{
"name": "create_post",
"arguments": {
"space_id": "12345",
"title": "Hello World",
"body": "This is my first post!"
}
}Example 5: Get Events
User prompt:
Show me upcoming events in the communityMCP tool called:
{
"name": "get_events",
"arguments": {}
}🐛 Troubleshooting
Issue: "GCP_CLIENT_ID not configured"
Solution:
Ensure
.envfile exists in project rootAdd
GCP_CLIENT_IDwith your actual Google OAuth Client IDVerify the Client ID ends with
.apps.googleusercontent.com
Issue: "redirect_uri_mismatch"
Error Message:
Error 400: redirect_uri_mismatchSolution:
Go to Google Cloud Console
Navigate to APIs & Services → Credentials
Click on your OAuth 2.0 Client ID
Under "Authorized redirect URIs", add exactly:
http://localhost:3000/auth/google/callbackClick Save
Wait 5 minutes for changes to propagate
Issue: "Port 3000 already in use"
Solution:
Change the port in .env:
OAUTH_PORT=3001
GCP_REDIRECT_URI=http://localhost:3001/auth/google/callbackRemember: Update the redirect URI in Google Cloud Console too!
Issue: "User not found in Circle community"
Error Message:
Circle authentication failed: User not foundSolution:
Ensure your Google account email is registered in the Circle community
Go to your Circle community and check your account email
Make sure it matches the Google account you're using to authenticate
Issue: Browser doesn't open during OAuth
Solution:
Check the terminal for the OAuth URL
Manually copy and paste the URL into your browser
Complete the authentication flow
Issue: TypeScript compilation errors
Solution:
# Clean and rebuild
rm -rf dist node_modules
npm install
npm run buildIssue: "Cannot find module" errors
Solution:
# Reinstall dependencies
npm installIssue: MCP Server not showing in Claude Desktop
Solution:
Check
claude_desktop_config.jsonsyntax (valid JSON)Verify the path to
dist/index.jsis absolute and correctEnsure the server builds successfully (
npm run build)Restart Claude Desktop completely (quit and relaunch)
Check Claude Desktop logs:
macOS:
~/Library/Logs/Claude/mcp*.logWindows:
%APPDATA%\Claude\logs\mcp*.log
Issue: OAuth authentication fails silently
Solution:
Check if you added your email as a test user in GCP OAuth consent screen
Verify your GCP project has Google+ API enabled
Check server logs for detailed error messages
Try the interactive test:
node test-oauth-interactive.js
👨💻 Development
Project Structure
circle-mcp/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # MCP server implementation
│ ├── config/
│ │ └── config.ts # Configuration management
│ ├── auth/
│ │ ├── gcp-auth.ts # Google OAuth 2.0
│ │ ├── integrated-auth-manager.ts # Auth orchestration
│ │ ├── oauth-server.ts # OAuth callback server
│ │ ├── token-manager.ts # Token refresh logic
│ │ └── user-storage.ts # User data persistence
│ ├── api/
│ │ ├── client.ts # Circle API client
│ │ └── endpoints.ts # API endpoints
│ ├── tools/
│ │ ├── auth-wrapper.ts # Authentication wrapper
│ │ ├── profile.ts # Profile tools
│ │ ├── courses.ts # Course tools
│ │ ├── posts.ts # Post tools
│ │ ├── spaces.ts # Space tools
│ │ ├── events.ts # Event tools
│ │ ├── notifications.ts # Notification tools
│ │ ├── messages.ts # Message tools
│ │ ├── feed.ts # Feed tools
│ │ └── comments.ts # Comment tools
│ ├── types/
│ │ └── circle.ts # TypeScript types
│ └── utils/
│ ├── error-handler.ts # Error handling
│ ├── logger.ts # Winston logger
│ └── validators.ts # Input validation
├── dist/ # Compiled JavaScript
├── test-oauth-flow.js # Configuration test
├── test-oauth-automated.js # Automated tests
├── test-oauth-interactive.js # Interactive OAuth test
├── verify-setup.js # Setup verification
├── package.json
├── tsconfig.json
├── .env # Environment variables (create this)
└── README.mdAvailable Scripts
# Development
npm run build # Compile TypeScript
npm run typecheck # Type check without building
npm start # Start the MCP server
npm run dev # Development mode with watch
# Testing
node verify-setup.js # Verify complete setup
node test-oauth-flow.js # Test OAuth configuration
node test-oauth-automated.js # Automated server tests
node test-oauth-interactive.js # Interactive OAuth testing
# Debugging
npx @modelcontextprotocol/inspector node dist/index.js # MCP InspectorAdding New Tools
Create a new file in
src/tools/your-tool.tsImport the authentication wrapper:
import { withAuthentication } from './auth-wrapper.js';Define your tool with authentication:
export function registerYourTools( server: McpServer, apiClient: CircleAPIClient, authManager: IntegratedAuthManager ) { server.registerTool( 'your_tool_name', { description: 'What your tool does', inputSchema: zodToJsonSchema(YourInputSchema) }, withAuthentication(authManager, async (params) => { const email = (params as any).authenticatedEmail; // Your implementation }) ); }Register in
src/server.ts
Environment Variables for Development
# Enable debug logging
LOG_LEVEL=debug
# Test with read-only mode
READ_ONLY_MODE=true
# Use different OAuth port
OAUTH_PORT=3001Running Tests
# Full test suite
npm run build
node verify-setup.js
node test-oauth-automated.js
node test-oauth-interactive.jsDebugging Tips
Enable debug logging:
LOG_LEVEL=debugCheck MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.jsMonitor server logs:
Logs are output to stderr
In Claude Desktop, check log files in the Claude logs directory
Test authentication separately:
node test-oauth-interactive.js
📄 License
MIT License - see LICENSE file for details
🤝 Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
📞 Support
If you encounter issues:
Check the Troubleshooting section
Review server logs for detailed error messages
Run
node verify-setup.jsto check configurationTest OAuth flow with
node test-oauth-interactive.jsCheck GCP OAuth consent screen configuration
Verify your email is added as a test user (if app is in testing mode)
🎉 Quick Start Summary
# 1. Install dependencies
npm install
# 2. Create .env file with your credentials
cp .env.example .env # Then edit with your values
# 3. Build the project
npm run build
# 4. Verify setup
node verify-setup.js
# 5. Test OAuth
node test-oauth-interactive.js
# 6. Add to Claude Desktop config
# Edit claude_desktop_config.json (see IDE Integration section)
# 7. Restart Claude Desktop and start chatting!Built with ❤️ using Model Context Protocol
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnantBisht07/Circle-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server