Facebook Integration
Manage Facebook Page posts, comments, reactions, and insights via the Graph API
The Facebook integration provides access to manage Facebook Page posts, comments, reactions, and insights via the Graph API through the Integrate MCP server.
Installation
The Facebook integration is included with the SDK:
import { facebookIntegration } from "integrate-sdk/server";Setup
1. Create a Facebook OAuth App
- Go to Facebook Developer Portal
- Create a new OAuth application
- Configure your redirect URI
- Note your Client ID and Client Secret
2. Configure the Integration on Your Server
Add the Facebook integration to your server configuration. The integration automatically reads FACEBOOK_CLIENT_ID and FACEBOOK_CLIENT_SECRET from your environment variables:
import { createMCPServer, facebookIntegration } from "integrate-sdk/server";
export const { client: serverClient } = createMCPServer({
apiKey: process.env.INTEGRATE_API_KEY,
integrations: [
facebookIntegration({
scopes: ["public_profile", "email", "pages_show_list", "pages_read_engagement", "pages_manage_posts", "pages_read_user_content", "pages_manage_engagement"], // Optional
}),
],
});You can override the environment variables by passing explicit values:
facebookIntegration({
clientId: process.env.CUSTOM_FACEBOOK_ID,
clientSecret: process.env.CUSTOM_FACEBOOK_SECRET,
scopes: ["public_profile", "email", "pages_show_list", "pages_read_engagement", "pages_manage_posts", "pages_read_user_content", "pages_manage_engagement"], // Optional
});3. Client-Side Usage
The default client automatically includes all integrations. You can use it directly:
import { client } from "integrate-sdk";
await client.authorize("facebook");
const result = await client.facebook.getMe({});
console.log(result);If you're using a custom client, add the integration to the integrations array:
import { createMCPClient, facebookIntegration } from "integrate-sdk";
const customClient = createMCPClient({
integrations: [facebookIntegration()],
});Configuration Options
Prop
Type
Default Scopes
These defaults are applied unless you override scopes in the integration config:
public_profileemailpages_show_listpages_read_engagementpages_manage_postspages_read_user_contentpages_manage_engagement
Tools
facebook_get_me
Get me
Prop
Type
facebook_list_pages
List pages
Prop
Type
facebook_list_page_posts
List page posts
Prop
Type
facebook_get_object
Get object
Prop
Type
facebook_create_page_post
Create page post
Prop
Type
facebook_delete_object
Delete object
Prop
Type
facebook_list_comments
List comments
Prop
Type
facebook_publish_comment
Publish comment
Prop
Type
facebook_get_insights
Get insights
Prop
Type
facebook_set_comment_visibility
Set comment visibility
Prop
Type
facebook_like_object
Like object
Prop
Type
Notes
- Category: Social Media
- Authentication mode: OAuth